How to Synchronize Zoho CRM Contacts with Mailchimp Subscribers
In this tutorial, we will show how to create a synchronization that syncs Zoho CRM contacts with Mailchimp subscribers.
In this tutorial, we suppose that there are no corresponding records present both in Zoho CRM and Mailchimp already. This is because when a synchronization is performed the first time, it copies all the source data to target and all the target data to source without any check if the corresponding records are already present in the opposite source. If some of the records were present in both sources, Skyvia will create duplicate data. That’s why it’s better to perform the first synchronization when one of the sources is empty or at least does not contain records present in the other source. When performing next synchronizations, Skyvia already knows how the records in the source and target correspond to each other and loads only the changed data between sources.
Creating Connections
In order to synchronize Zoho CRM contacts with Mailchimp subscribers, first we need to create connections to Zoho CRM and Mailchimp. If you have already created the necessary connections, you may skip these steps. To create a connection to Zoho CRM, perform the following steps:
- Click +NEW in the top menu.
- Click the Connection button in the menu on the left.
- In the opened Select Connector page, select Zoho CRM. To quickly find it, you can either use the Type to filter box or filter connectors by categories using the All list (for Zoho CRM, select the CRM category).
-
The default name of a new connection is Untitled. Click it to rename the connection, for example, to Zoho CRM1.
- Click Sign In with Zoho.
-
In the opened window, enter your Zoho CRM email and click the Next button.
-
In the opened window, enter your Zoho CRM password and click the Sign In button.
- In the opened window, choose the Org you want to access (if you have several ones) and click Submit.
- In the next window, click Accept to allow Skyvia to access data in your Zoho account.
-
The authentication token is generated.
- Optionally change the Metadata Cache parameter value. It determines how often to update cached metadata for the connection. By default, Skyvia caches metadata of available objects for cloud sources. You can configure how often the cache is refreshed automatically or reset it manually on the details page of the corresponding connection by clicking the Clear now link next to the Metadata Cache parameter.
- Click Create Connection.
To create a connection to Mailchimp, perform the following steps:
- Click +NEW in the top menu.
- Click the Connection button in the menu on the left.
- In the opened Select Connector page, select Mailchimp. To quickly find it, you can either use the Type to filter box or filter connectors by categories using the All list (for Mailchimp, select the Email Marketing category).
-
The default name of a new connection is Untitled. Just click it to rename the connection, for example, to Mailchimp1.
- Click Sign In with Mailсhimp.
-
In the opened window, enter your Mailchimp credentials and click the Log In button.
- Click the Allow button.
- Optionally select values for the Merge Fields Behavior and Metadata Cache parameters.
- Click Create Connection.
Creating Synchronization
When loading subscribers to Mailchimp, you need to specify the Mailchimp list to load subscribers to by mapping the ListId field of the Mailchimp ListMembers table. You can either find out the id of the list (with an Export or with Query or directly via Mailchimp interface) and specify it via the Constant Mapping or use the Lookup Mapping to get the list Id, for example, by its name, like we will do in this tutorial. We will synchronize Zoho CRM contacts with a list, having the name ‘Sync Test List’ in this tutorial.
- Click +NEW in the top menu.
- In the Integration column, click Synchronization. The sync integration details page will open.
- Rename your integration by clicking and editing the integration name. The default integration name is Untitled. Please note, if you omit this step, the integration name will remain Untitled in the list of created integrations.
-
Under Source, in the Connection drop-down list, select the Zoho CRM connection.
-
Under Target, in the Connection list, click Select target and select Mailchimp connection from the drop-down list. You can use the Type to filter box to quickly find the necessary connection.
- Click the Add new link.
- In the Source list, select Contacts.
-
In the Target list, select ListMembers.
- Click Next step.
-
Now we need to map target fields to source fields. As we can see, some of the columns that have the same names in Mailchimp ListMembers table and Zoho CRM Contacts table, are already mapped automatically. We need to map only the ListId column. It is marked as Required, which means, it must be mapped in order for the integration to be valid. If you know the Id of the necessary list, use Constant Mapping and specify this Id as a constant (See Mailchimp documentation on how to find the list ID). To configure such a mapping, perform the following steps:
- Click ListId in the list of target fields.
- Click Column and then select Constant from the drop-down list.
- Paste the Id value (without quotes) to the box below.
-
Select the Use this value as filter of target records checkbox. This means that when synchronizing data in the reverse direction (from Mailchimp to Zoho CRM) only records with the corresponding ListId value are synchronized, subscribers from other lists are ignored.
- Now let’s configure mapping in the opposite direction. In synchronization tasks you need to specify mapping for both directions - from source to target and from target to source. Click Target to Source under task editor header.
- Here, the First Name, Last Name, and Email Zoho CRM fields are already mapped. Let’s also map the Email Opt Out field so that when Mailchimp subscriber unsubscribes, it will be automatically set. We will use the Expression Mapping for this.
- Click Email Opt Out in the list of the source fields.
- Click Column and then select Expression in the drop-down list.
-
Enter the following expression to the box below:
1
Status == "Unsubscribed" ? true : false
Please note that this expression is valid only for the old runtime. The expression checks the status of the subscriber in Mailchimp, and if the status is “Unsubscribed”, it returns the true boolean value, which is assigned to the Email Opt Out field in Mailchimp. Otherwise, false is assigned.
If you want to use an expression for the new runtime (in case the Use new runtime checkbox is selected in the integration), please enter it like this:
1
Status == 'Unsubscribed' ? true : false
You can read more about the main syntax differences between old and new runtimes here.
- Click Save.
Scheduling Automatic Execution
After we have created the synchronization, we want to keep the data in sync automatically. For this, we will configure the integration to run every hour during workdays.
Note that since we used Zoho CRM connection as the source, its changes have a priority, and if a record was changed both in Zoho CRM and Mailchimp database, Zoho CRM changes are applied.
Perform the following actions to set the schedule:
- Click Schedule on the left side of the toolbar.
- Under Run every, select Week.
-
Under Days of week, select checkboxes with all the workdays.
-
Click Occur once at and select Recur every.
-
Enter “1” (without quotes) into the Recur every box and click the Set time restrictions link.
-
Enter 09:00 and 18:00 to the corresponding boxes.
-
Click Now to put the schedule into action immediately or select At a specific time in the Starting list and specify the necessary date and time you want the schedule to be enabled from.
- Click Save to schedule integration execution.
After this our integration will run automatically every hour between 09:00 and 18:00 of every workday.
You can also visit Scheduling Integrations to get more detailed information on setting a schedule.