Force Sync Contact/Account from CRM to Books

Force Sync Contact/Account from CRM to Books

Hi all. This might not be a common issue to the large portion of the user base here, but for those who dabble and use CRM and Books integration, they know how painful it is that we have to wait for the 2-hour intervals for the records to sync; especially from CRM to Books.

Sure, you can 'force' the contact/account to be synced to Books by creating SO/Estimate/Invoice manually, but sometimes, you have automations, buttons, etc to handle the creation of these records and in that case, normally, we don't have any way to do so.

So, I searched and searched, and lo and behold, a way to do it. Now, the method was documented here:

However, it was not mentioned that this can be used to 'force' sync a particular record. So, its application, basically. With this, you can ensure that the contact/account exists first in Books before you create any SO/Estimate/Invoice for the respective record. Might not seem big, but it is from a developer's point of view. So, what you want to do is create a custom function/button, and use this script:
  1. orgId = "78213211";
  2. mp = Map();
  3. createsync = invokeurl
  4. [
  5. url :"https://books.zoho.com/api/v3/crm/contact/" + contactId + "/import?organization_id=" + orgId
  6. type :POST
  7. parameters: mp
  8. connection:"zbooks"
  9. ];
  10. info createsync;
Please note that "contactId" has been mapped to the Contact Id of the record, and "orgId" has also been defined in the first line. "zbooks" is the connection name I use and it's simple to create one. In CRM, Go to Developer Space > Connections > Create New > Find Zoho Books app > choose zohobooks.fullaccess scope to be able to use this connection for nearly everything regarding Zoho Books. Remember, the connection name is up to you, mine happens to be "zbooks".

To use this code to force sync an account record, simply change "/contact" in the url shown to "/account", and put the account Id in place of the "contactId".

You can use this upon the creation of the contact/account, or at any point you desire, really. But that's the critical point in my opinion at least.

Good luck!


      • 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