How do I sync new data from Zoho CRM to Zoho Subscriptions instantly?
The Zoho Subscriptions-Zoho CRM integration syncs new data every two hours by default. You can also initiate a manual instant-sync by clicking the Instant Sync button from Zoho Subscriptions > Settings > Integrations > Zoho CRM.
However, if you’d like all new data (Accounts and Contacts) from Zoho CRM to be synced to Zoho Subscriptions immediately, you can automate the process by creating a Workflow Rule in Zoho CRM. This rule is essentially a Custom Function, which will sync new Accounts and Contacts to Zoho Subscriptions as soon as they have been created in Zoho CRM.
First, you will need to create a Connection between Zoho Subscriptions and Zoho CRM. This Connection serves to authenticate the communication between Zoho CRM and Zoho Subscriptions. To create this Connection:
- Log in to Zoho CRM.
- Go to Setup > Developer Space > Connections.
Select Zoho Subscriptions.
Insight: If you’ve already created other Connections in Zoho CRM, then click + Add Connection in the top right and select Zoho Subscriptions.
zohosubscriptionsconnectionas both the Connection Name and the Connection Link Name.
ZohoSubscriptions.fullaccess.allas the Scope.
Click Create and Connect.
Click Proceed in the pop-up that follows.
Click Accept to finish creating the Connection.
Now the Connection will be created and its status will be Connected, if it was set up properly.
Next, you will have to create a Workflow Rule by following the steps below:
- Go to Zoho CRM > Setup > Automation > Workflow Rules.
- Click + Create Rule.
Select the Module as either Accounts or Contacts, based on the type of data that you want to sync instantly with Zoho Subscriptions.
Enter any Rule Name and Description for the rule.
Select On a record action, for WHEN the rule has to be triggered.
Select Create or Edit.
In CONDITION 1, select Accounts matching certain conditions and provide the necessary conditions, if you only want certain types of Accounts to be synced automatically. Select All Accounts if you’d like all new Accounts to be synced automatically.
Insight: This step assumes that you selected Accounts as the module when creating this rule. If you had selected Contacts, then the options shown in Condition 1 would be Contacts matching certain conditions and All Contacts.
Select Function under the Instant Actions drop-down.
Select Write your own function in the pop-up, or click + New Function if you’ve already created a function before.
Provide any Function Name, Display Name, and Description.
Click Edit Arguments from the top of the Deluge editor.
referenceIDas the Key.
Place your cursor in the Param Value field and enter
Select the Module as Accounts in the drop-down that appears, and select the Field as Account Id.
Insight: If you are creating this rule for Contacts, then you will have to select the Module as Contacts and the Field as Contact Id.
Click Done and then click Save.
Now copy and paste one of the following scripts into the Deluge editor, based on the Module that you selected.
Deluge Script for Contacts:
orgID = ""; url = "https://subscriptions.zoho.com/api/v1/crm/contact/import?reference_id=" + referenceID + "&organization_id="+orgID; response = invokeurl [ url :url type :POST connection:"zohosubscriptionsconnection" ]; info response;
Deluge Script for Accounts:
orgID = ""; url = "https://subscriptions.zoho.com/api/v1/crm/account/import?reference_id=" + referenceID + "&organization_id="+orgID; response = invokeurl [ url :url type :POST connection:"zohosubscriptionsconnection" ]; info response;
Enter your Zoho Subscriptions’ organization ID in the first line of this script within the quotes. You can find your organization ID by going to Zoho Subscriptions and clicking the name of your organization in the top right corner.
Click Save in the top right corner and click Save again in the screen that follows.
Now, new Accounts/Contacts will be synced instantly with Zoho Subscriptions as soon as they are created in Zoho CRM.