Explore How to Sync Data between two Zoho CRM Organization using Self Client via API

Explore How to Sync Data between Two Zoho CRM Organizations using Self Client via API

Requirement Overview

The user wants to synchronize records between two Zoho CRM organizations, so that any record created or updated in Org A is automatically reflected in Org B. i.e., whenever a record is added or modified in Zoho CRM Org A, the same changes should be synced in Org B.

Use Case

A Company maintains multiple Zoho CRM Orgs due to regional operations, different business units, or external partner collaboration. In such cases, syncing data between these Orgs ensures consistency, collaboration, and visibility across teams.
  1. Example Business Use-Cases
Global + Regional Orgs
      -> A company has a Global Zoho CRM Org for central reporting and multiple Regional Zoho CRM Orgs for local sales teams.
      -> Leads captured in the Regional Org must sync to the Global Org for centralized tracking.
      -> Global Org may push back updates like “Qualified Lead” or “Closed Won Deal” to Regional Orgs.

Parent Company + Subsidiary
      -Parent company manages corporate accounts and enterprise deals in one Org.
      -> Subsidiary companies manage local sales in their own Orgs.
      -> Sync ensures parent company has visibility into subsidiary sales progress.

Vendor–Partner Collaboration
      -> A vendor uses one Zoho CRM Org, while resellers/partners use another Org.
      -> Syncing allows partners to push deals/opportunities to the vendor Org for approvals, fulfillment, or invoicing.
      -> Vendor Org may push product/pricing updates back to partners’ Orgs.
  1. Current Challenges to achieve this directly

As of now, we do not have a direct option to setup an integration between two Zoho CRM accounts. Though, users can manually Export/Import. However, this requires continuous manual intervention. Whereas, the user is looking to sync records automatically without any manual work.

Solutions - Step-by-Step Implementation Guide

Users can use CRM APIs to create/update records in other CRM Org using Self-Client method. This helps you to setup the seamless integration between two CRM Organizations. 
  1. Learn how to communicate with Zoho CRM across data centres?

-> Here, there are two Zoho CRM accounts. One is in US DC, and another one is in IN DC. To communicate with US DC CRM, the user with Zoho CRM API Access permission in US DC should generate a Grant Token using the Self Client method. 

-> Using a Grant Token, the user can generate Access and Refresh tokens. So, these tokens, Access and Refresh are the ones that are going to be useful for communicating with the US DC CRM account. 

-> An 
Access Token is a key to communicate with the respective CRM account, and the Refresh Token is used to generate a new access token, as the Access Token will expire within an hour.
  1. Permissions and Availability

Info
1) The users profile should have Zoho CRM API Access enabled.
2) The users profile should have Manage Automation enabled.
  1. Prerequisites from Zoho CRM under US DC
    1) Grant Token
    2) Access Token
    3) Refresh Token

Notes
Refer to the Overview and all the Steps related to OAuth Authentication in this Help Link, which will guide you in detail about how authentication works in Zoho which includes Grant, Access and Refresh Tokens.

      Configuration Setup

Step 1: Users from US DC CRM accounts with Zoho CRM API Access permission should navigate to Zoho Developer console to generate a Grant Token via the self-client method.

Step 2: Choose the Client Type as Self Client.

Step 3: Enter the required scope, time duration as 10 and scope description.

Step 4: Upon clicking Create, you will find Grant Token.

Step 5: Either you could use the other API execution console (i.e., Postman, Insomnia, etc.) to generate an Access and Refresh Token or you could use the code1 shared below to generate an Access and Refresh Token from CRM.

Notes
Generate an Access and Refresh Token within 10 minutes with the help of Grant Token, as Grant Token is valid only for 10 min maximum.
  1. Sample Deluge Script - Code1:

  1. accesstokenmp = Map();
  2. accesstokenmp.put("grant_type", "authorization_code");
  3. accesstokenmp.put("client_id", "1000.CHZ74KIIK1LFMZJ7K6073ZSD9TQ8RT");
  4. accesstokenmp.put("client_secret", "616dcf2104dc5e6a5e5921b9ad828b20308be5547c");
  5. accesstokenmp.put("code", "1000.fa1d4da1df80805c1a9a0dffe3e76af3.3898323428c16839635fb42c082cd300");
  6. response = invokeUrl [
  7. url: "https://accounts.zoho.com/oauth/v2/token"
  8. type: POST
  9. parameters: accesstokenmp
  10. ];
  1. Grant Token Video

  1. Different ways to generate Access and Refresh Tokens

            1) Developer Tools - eg., Postman, Insomnia
            2) Zoho Deluge Invoke URL task 
      -> Generating Access Token via Developer Tool (i.e. Postman, Insomnia, etc)



      -> Generating Access Token via Zoho Deluge Invoke URL Task


  1. Steps to deploy the custom solution in Zoho CRM IN DC

Create a Workflow in CRM IN DC account by providing the required details.

Set a trigger on Record Creation, provide a condition (if any) and use the below code2 in the Instant Actions of the Workflow.


      Sample Deluge Script - Code2:

  1. void automation.TBSolution()
  2. {
  3. refreshtoken = Map();
  4. refreshtoken.put("refresh_token", "1000.c10f1746037754011ed558e92f558f70.6a1c309c4c3715efca7************");
  5. refreshtoken.put("client_id", "1000.O466EKV1NQT0ZKHATWA***********");
  6. refreshtoken.put("client_secret", "1b74110de0dfc1156e00a3003037a2471*********");
  7. refreshtoken.put("grant_type", "refresh_token");
  8. //Refreshing the Access Token
  9. response = invokeUrl [
  10. url: "https://accounts.zoho.com/oauth/v2/token"
  11. type: POST
  12. parameters: refreshtoken
  13. ];
  14. accesstoken = response.get("access_token");
  15. mp = Map();
  16. datamp = Map();
  17. datalist = List();
  18. mp.put("Last_Name", name);
  19. datalist.add(mp);
  20. datamp.put("data", datalist);
  21. headersMap = Map();
  22. headersMap.put("Authorization","Zoho-oauthtoken " +accesstoken);
  23. //Creating a Leads record in US DC CRM account whenever a new Leads record created in IN DC
  24. response1 = invokeurl
  25. [
  26. url :"https://www.zohoapis.com/crm/v7/Leads"
  27. type :POST
  28. parameters:datamp.toString()
  29. headers:headersMap
  30. ];
  31. }
  1. Working Demo - Screencast





Quote
Custom Solution Created By Hemanth Kumar L M

If you need any further clarifications, please don’t hesitate to contact partner-support@zohocorp.com.

Notes
Additionally, we kindly ask all Europe and UK Partners to reach out to partner-support@eu.zohocorp.com.

      Create. Review. Publish.

      Write, edit, collaborate on, and publish documents to different content management platforms.

      Get Started Now


        Access your files securely from anywhere

          Zoho CRM Training Programs

          Learn how to use the best tools for sales force automation and better customer engagement from Zoho's implementation specialists.

          Zoho CRM Training
            Redefine the way you work
            with Zoho Workplace

              Zoho DataPrep Personalized Demo

              If you'd like a personalized walk-through of our data preparation tool, please request a demo and we'll be happy to show you how to get the best out of Zoho DataPrep.

              Zoho CRM Training

                Create, share, and deliver

                beautiful slides from anywhere.

                Get Started Now


                  Zoho Sign now offers specialized one-on-one training for both administrators and developers.

                  BOOK A SESSION







                              Quick LinksWorkflow AutomationData Collection
                              Web FormsEnterpriseOnline Data Collection Tool
                              Embeddable FormsBankingBegin Data Collection
                              Interactive FormsWorkplaceData Collection App
                              CRM FormsCustomer ServiceAccessible Forms
                              Digital FormsMarketingForms for Small Business
                              HTML FormsEducationForms for Enterprise
                              Contact FormsE-commerceForms for any business
                              Lead Generation FormsHealthcareForms for Startups
                              Wordpress FormsCustomer onboardingForms for Small Business
                              No Code FormsConstructionRSVP tool for holidays
                              Free FormsTravelFeatures for Order Forms
                              Prefill FormsNon-Profit

                              Intake FormsLegal
                              Mobile App
                              Form DesignerHR
                              Mobile Forms
                              Card FormsFoodOffline Forms
                              Assign FormsPhotographyMobile Forms Features
                              Translate FormsReal EstateKiosk in Mobile Forms
                              Electronic Forms
                              Drag & drop form builder

                              Notification Emails for FormsAlternativesSecurity & Compliance
                              Holiday FormsGoogle Forms alternative GDPR
                              Form to PDFJotform alternativeHIPAA Forms
                              Email FormsFormstack alternativeEncrypted Forms

                              Wufoo alternativeSecure Forms

                              TypeformWCAG

                                All-in-one knowledge management and training platform for your employees and customers.

                                            Create. Review. Publish.

                                            Write, edit, collaborate on, and publish documents to different content management platforms.

                                            Get Started Now




                                                              You are currently viewing the help pages of Qntrl’s earlier version. Click here to view our latest version—Qntrl 3.0's help articles.




                                                                  Manage your brands on social media


                                                                    • Desk Community Learning Series


                                                                    • Digest


                                                                    • Functions


                                                                    • Meetups


                                                                    • Kbase


                                                                    • Resources


                                                                    • Glossary


                                                                    • Desk Marketplace


                                                                    • MVP Corner


                                                                    • Word of the Day


                                                                    • Ask the Experts


                                                                      Zoho Sheet Resources

                                                                       

                                                                          Zoho Forms Resources


                                                                            Secure your business
                                                                            communication with Zoho Mail


                                                                            Mail on the move with
                                                                            Zoho Mail mobile application

                                                                              Stay on top of your schedule
                                                                              at all times


                                                                              Carry your calendar with you
                                                                              Anytime, anywhere




                                                                                    Zoho Sign Resources

                                                                                      Sign, Paperless!

                                                                                      Sign and send business documents on the go!

                                                                                      Get Started Now




                                                                                              Zoho TeamInbox Resources





                                                                                                        Zoho DataPrep Demo

                                                                                                        Get a personalized demo or POC

                                                                                                        REGISTER NOW


                                                                                                          Design. Discuss. Deliver.

                                                                                                          Create visually engaging stories with Zoho Show.

                                                                                                          Get Started Now








                                                                                                                                Wherever you are is as good as
                                                                                                                                your workplace

                                                                                                                                  Resources

                                                                                                                                  Videos

                                                                                                                                  Watch comprehensive videos on features and other important topics that will help you master Zoho CRM.



                                                                                                                                  eBooks

                                                                                                                                  Download free eBooks and access a range of topics to get deeper insight on successfully using Zoho CRM.



                                                                                                                                  Webinars

                                                                                                                                  Sign up for our webinars and learn the Zoho CRM basics, from customization to sales force automation and more.



                                                                                                                                  CRM Tips

                                                                                                                                  Make the most of Zoho CRM with these useful tips.



                                                                                                                                    Zoho Show Resources