How to Synchronize Zoho CRM Contacts with Mailchimp Subscribers

In this tutorial, we will show how to create a synchronization package that synchronizes 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 package 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:

  1. Click +NEW in the top menu.
  2. Click the Connection button in the menu on the left.
  3. 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).
  4. The default name of a new connection is Untitled. Click it to rename the connection, for example, to Zoho CRM1.

    Connection Editor window

  5. Click Sign In with Zoho.
  6. In the opened window, enter your Zoho CRM email and click the Next button.

    Zoho Sign In window

  7. In the opened window, enter your Zoho CRM password and click the Sign In button.

    Zoho Sign In window

  8. In the opened window, choose the Org you want to access (if you have several ones) and click Submit.
  9. In the next window, click Accept to allow Skyvia to access data in your Zoho account.
  10. The authentication token is generated.

    Connection Editor window 2

  11. 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.
  12. Click Create Connection.

To create a connection to Mailchimp, perform the following steps:

  1. Click +NEW in the top menu.
  2. Click the Connection button in the menu on the left.
  3. 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).
  4. The default name of a new connection is Untitled. Just click it to rename the connection, for example, to Mailchimp1.

    Connection Editor window

  5. Click Sign In with Mailсhimp.
  6. In the opened window, enter your Mailchimp credentials and click the Log In button.

    Log In window

  7. Click the Allow button.
  8. Optionally select values for the Merge Fields Behavior and Metadata Cache parameters.
  9. 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 Package 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.

  1. Click +NEW in the top menu.
  2. In the Integration column, click Synchronization. The sync package details page will open.
  3. Rename your package by clicking and editing the package name. The default package name is Untitled. Please note, if you omit this step, the package name will remain Untitled in the list of created packages.
  4. Under Source, in the Connection drop-down list, select the Zoho CRM connection.

    Source Connection

  5. 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.

    Target Connection

  6. Click the Add new link.
  7. In the Source list, select Contacts.
  8. In the Target list, select ListMembers.

    Source and Target Lists

  9. Click Next step.
  10. 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 package 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:

    1. Click ListId in the list of target fields.
    2. Click Column and then select Constant from the drop-down list.
    3. Paste the Id value (without quotes) to the box below.
    4. 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.

      ListId field

  11. 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.
  12. 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.
    1. Click Email Opt Out in the list of the source fields.
    2. Click Column and then select Expression in the drop-down list.
    3. 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.

      Email Opt Out field

      If you want to use an expression for the new runtime (in case the Use new runtime checkbox is selected in the package), 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.

  13. 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:

  1. Click Schedule on the left side of the toolbar.
  2. Under Run every, select Week.
  3. Under Days of week, select checkboxes with all the workdays.

    Schedule screenshot 1

  4. Click Occur once at and select Recur every.

    Schedule screenshot 2

  5. Enter “1” (without quotes) into the Recur every box and click the Set time restrictions link.

    Schedule screenshot 3

  6. Enter 09:00 and 18:00 to the corresponding boxes.

    Schedule screenshot 4

  7. 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.

    Schedule screenshot 5

  8. Click Save to schedule package execution.

After this our package will run automatically every hour between 09:00 and 18:00 of every workday.

You can also visit Scheduling Packages to get more detailed information on setting a package schedule.