Business Problem

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 7 of how to setup the Mailchimp to Salesforce integration where we will show you how to solve the following business challenge we ran into while implementing Mailchimp for Salesforce. Check out our Mailchimp How To section for additional tips on how to extend this integration.
- Delete Campaign Member from Salesforce Campaign Automation – When a MailChimp subscriber unsubscribes from an audience, we want to delete the campaign member from a Campaign in Salesforce.
How to Instructions
Delete Campaign Member from Salesforce Campaign if they Unsubscribe
Our objective here is to automatically delete the Campaign Member from a Salesforce Campaign when a MailChimp Subscriber unsubscribes from an audience in MailChimp. If you completed the steps in MailChimp to Salesforce Integration - Part 2 -Update Unsubscribes you already have the flow in place that we will build off of for this automation. If you have not, please review this article and complete the setup of the flow for at least the Unsusbcribed path.
- First, we need to create a new checkbox field on the Campaign object called MC Delete Unsubscribes. This checkbox will allow us to control which Campaigns should have the campaign members deleted when the Contact unsubscribes from Mailchimp.
- Next, we need to create a formula checkbox field on the Campaign Member object called MC Delete Unsubscribes = Campaign.MC_Delete_Unsubscribes__c
- This field is just pulling over the value from the related Campaign onto the Campaign Member to help us later in the automation.
- Click Activate - we are ready to test it!
How to Test the Flow
- Create two contact records with the same email address in Salesforce. Make sure the email address for these contacts is also an active MailChimp Subscriber.
- Create a Salesforce Campaign and add these two contacts to the Campaign.
- Update the MC Delete Unsubscribes checkbox on the Campaign to be true
- Confirm the flow is active
- Go to one of the Contact's pages in Mailchimp and click Unsubscribe
- Check your campaign and confirm the Contacts were deleted from the Campaign. If they are gone, congratulations!! Now you are ready to let it rip with the entire audience!

Any comments, questions, concerns – let us know in the comments! We would love to hear from you!