Mailchimp to Salesforce Integration - Part 5
[ARCHIVED - See New Article]

We have learned a lot implementing Mailchimp over the past couple of years and have updated all of our articles. Check out our new Mailchimp How To section for more ways to extend the integration.

Business Problem

Mailchimp - Logo

Mailchimp is a great tool for people who are just starting out with email marketing and they currently use Salesforce as their CRM. We have done several implementations of Mailchimp and Salesforce and wanted to provide you with our best practice approach of how to set it up right the first time.

This is Part 5 of how to setup the Mailchimp to Salesforce integration will show you how to solve the following business challenge we ran into with implementing Mailchimp for Salesforce. Check out Mailchimp to Salesforce Integration - Part 1 and Mailchimp to Salesforce Integration - Part 2 for additional tips.

  • Automatic Sync Between Mailchimp & Salesforce  - We wanted a faster way to sync certain groups of people between Mailchimp and Salesforce without having to go through all of the steps in Part 1 of this guide. Our client was sending out one email per week and they did not care about seeing the campaign or campaign member information in Salesforce. We wanted to create an automatic, set-it-and-forget-it solution. This section will outline the steps we took to set this up and some limitations we ran into with Mailchimp Member Queries.

Note: The video tutorial is more updated and has a lot more details than this arcticle.

How to Instructions

Automatic Sync Between Mailchimp & Salesforce - Not Using Campaigns

Our objective here is to setup Mailchimp and Salesforce to automatically sync people to certain groups in Mailchimp without anyone having to do anything in between email sends. Follow these steps for how to complete this process:

First, determine which groups of people you want to sync to Mailchimp. Your groups of people should be easily segmented using fields from the Lead or Contact records. Here are some of examples of groups we setup:

  • People in the United States with an Email Address, Undeliverable Email Address = False, Email Opt Out = False, Status = Active, Industry = Technology OR Industry = Professional Services
  • People in Canada with an Email Address, Undeliverable Email Address = False, Email Opt Out = False, Status = Active, Industry = Technology OR Industry = Professional Services.

Next, we need to create checkbox formula fields on the Lead or Contact objects - we will use these formula fields in our Mailchimp Query. The reason we are setting up formula fields is because the Mailchimp Query writer is very limited. Here is a list of the issues we ran into:

  • Cannot use ANDs or ORs when writing queries - all of the queries are joined with an AND
  • Cannot look for multiple values in multi-select picklist fields
  • Cannot look for multiple values in picklist fields. We would have had to write a query for each combination of filters we were looking for.
  • Could not use fields from the Account in the filters
Here are examples of the formulas:
AND( MailingCountry = 'United States',
NOT(ISBLANK(Email)),
HasOptedOutOfEmail = FALSE,
ISPICKVAL(Status__c, 'Active'),
Undeliverable_Email_Address__c = FALSE,
OR(ISPICKVAL( Account.Industry, 'Technology'),
ISPICKVAL( Account.Industry, 'Professional Services')
)
)
AND( MailingCountry = 'Canada',
NOT(ISBLANK(Email)),
HasOptedOutOfEmail = FALSE,
ISPICKVAL(Status__c, 'Active'),
Undeliverable_Email_Address__c = FALSE,
OR(ISPICKVAL( Account.Industry, 'Technology'),
ISPICKVAL( Account.Industry, 'Professional Services')
)
)

Now, we are ready to setup the Mailchimp queries using our formula fields.

  • Go to the MC Setup tab in the Mailchimp for Salesforce app and click New Query.

  • Choose your Audience. Then click Create a new tag, name the tag and click Add.

  • Make sure there is a checkbox next to the tag you want to use. Click Next.

  • Select the object where you built your formula field.
  • Choose your formula field from the dropdown, set operator = Equals and value = True.

  • Review your query results and confirm it is working.
  • Click Next.

  • Name and schedule your query to run daily.
  • Click Save and run.

Great work! Now any new contact added to Salesforce with the correct criteria will automatically sync to Mailchimp with the appropriate tag.

For any questions, comments, concerns – let us know in the comment section below!
We would love to hear from you!

Share This Story, Choose Your Platform!

About the Author

Cheryl Fernandes

Cheryl is a certified Salesforce Application Architect and is the Founder and Lead Salesforce Consultant at Blu Ninjas. She has been working with Salesforce for 12 years and has helped companies in financial services, insurance and beauty industries implement solutions on the platform. Flow is her favorite Salesforce declarative tool, it is a game changer for anyone who does not know how to code.

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to Top