Download Statement from Zoho Books and upload to Zoho CRM
Hi everybody! I don't know who needs to know this, but if you do, then here it is.
This code:
- Searches for Contact in Books based on the Account ID in CRM
- Download the statement of account of the Contact in Books
- Upload as an attachment in Account record in CRM
By default, if you do not specify "start_date" and "end_date", it will download the current year's statement. Also, "accId" is mapped to "Account ID" in Zoho CRM. This function is for the Accounts module in CRM.
- //search for account in books
- orgId = {enter your Zoho Books Organization ID here as a string. e.g: "78634343"};
- booksCust = invokeurl
- [
- url :"https://www.zohoapis.com/books/v3/contacts?organization_id=" + orgId + "&zcrm_account_id=" + accId.toString()
- type :GET
- connection:"{your zoho books connection name, I'd choose full scope}"
- ];
- // check if there's a contact in Zoho Books with the Zoho CRM account ID
- if ( booksCust.get("code") == 0 && booksCust.get("contacts").size() > 0 )
- {
- contactId = booksCust.get("contacts").get(0).get("contact_id");
- //get statement
- getStatement = invokeurl
- [
- url:"https://www.zohoapis.com/books/v3/contacts/" + contactId + "/statements?organization_id=" + orgId
- type: GET
- connection: {your zoho books connection name, I'd choose full scope}"
- ];
- info getStatement;
- if ( getStatement != null )
- {
- getStatement.setParamName("file");
- //upload to crm
- uploadStatement = invokeurl
- [
- url: "https://www.zohoapis.com/crm/v6/Accounts/" + accId.toString() + "/Attachments"
- type: POST
- files: getStatement
- connection: "{your zoho crm connection name}"
- ];
- info uploadStatement;
- }
- }
Good luck!
Nik, aplikasi.us
Zoho Premium Partner
Access your files securely from anywhere
Zoho Developer Community
Deliver unforgettable customer experiences
Deliver unforgettable customer experiences
New to Zoho Marketing Plus?
Everything you need to run your marketing
New to Zoho Marketing Plus?
Everything you need to run your marketing
Zoho Desk Resources
-
Desk Community Learning Series
-
-
-
-
-
-
-
-
-
Sticky Posts
Free Webinar - Digital signatures for digital contract management with Zoho CRM
Hi, Did you know you can seamlessly send and collect signatures on important business documents like business proposals, vendor agreements, sales contracts, invoices, and other inventory documents with Zoho Sign’s extension for Zoho CRM? Join our upcoming
New User Interface for your Email integration in Zoho CRM
Hello folks, As most of you may already know, Zoho Mail recently got a new user interface that's a lot better and easier to use. As a result, this change will affect your email integration with your Zoho CRM account**. If you have your email integration in Zoho CRM set up through POP, your Emails UI in CRM will be moved to the new Zoho Mail UI. We hope that you like the new and improved Emails interface inside Zoho CRM. Feel free to share your feedback by commenting below. **Please note that,
Fetching leads from Zoho CRM into Zoho Creator, automatically
I'd like to pull new leads from the CRM system, into Creator, on a daily basis. Is this possible? Yes, it is possible. Zoho Creator and Zoho CRM are integrated with each other, enabling you to synchronize data between them. This is done by fetching records from CRM into a Zoho Creator form. In order to achieve this, you'll have to configure a workflow alert in Zoho CRM. For instance, you can maintain the lead details in CRM on a separate form in Zoho Creator by fetching the details automatically
Zoho TeamInbox Resources
Zoho DataPrep Resources
Zoho CRM Plus Resources
Zoho Books Resources
Zoho Subscriptions Resources
Zoho Projects Resources
Zoho Sprints Resources
Qntrl Resources
Zoho Creator Resources
Zoho Campaigns Resources
Zoho CRM Resources
Zoho Show Resources
Writer Get Started. Write Away!
Writer is a powerful online word processor, designed for collaborative work.