7. Mailchimp to Salesforce Integration - Delete Campaign Member
IMPORTANT UPDATE:
As of June 2024, we learned Mailchimp delisted their AppExchange package - BUT you are still able to download the free app if you have the link. In its place is a new paid app branded as the "OFFICIAL MAILCHIMP SALESFORCE INTEGRATION". This article is about the old free app from Mailchimp, not the new paid app. Also, be advised that any enhancements, flows, custom fields, etc that you add to the objects in the free app will not 'transfer' over to the new paid app. The paid app uses all new custom objects and everything will have to rebuilt on these objects. Check out Blu Tiger Academy for the latest information we have on the apps.
Business Problem
![Mailchimp - Logo Mailchimp - Logo](https://bluninjas.com/wp-content/uploads/2022/03/mailchimp-logo-300x87.png)
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.
Or continue on for a short tutorial below.
Note: The video tutorial goes way more in depth.
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!
![MailChimpSubcriptionUnsubscribefromSalesforce MailChimpSubcriptionUnsubscribefromSalesforce](https://bluninjas.com/wp-content/uploads/2021/03/MailChimpSubcriptionUnsubscribefromSalesforce-1024x439.jpg)
For any questions, comments, concerns – let us know in the comment section below!
We would love to hear from you!