MailChimp is great. Salesforce is great. And it's not that MailChimp's tools for syncing to Salesforce's data isn't great, it's just not what my clients need. So the goal is to build a simple a sync as is possible, and keep a very
clear seperation between areas of concern. MailChimp will worry about sending emails and keeping track of those analytics, Salesforce will be the 'repository of truth' in terms of the CRM data. And that's it.
This code package is fairly large, and is being deployed into a few of my client's instances as I write this. If it's something that you're interested in chatting about, please let me know.
Username + password + token = nope. We use an OAuth2 connection between the systems, with instructions about how to set this up as part of the install. If you're not sure about the what/where/how for OAuth2, you can check here. One important note is that while the Sync application is Aura/Lightning, this connection mechanism requires a VisualForce page to call back to. Taht said, this page doesn't need to exposed via a public site, since you are already logged in to Salesfoce! After connection, the process will let you know which MailChimp API endpoint that you'll have to open up in Salesforce.
Once we're 'locked' to MailChimp, we then need to 'lock' to one list/audience. One list, and one list only. All Salesforce Contacts and Leads will up in thist list.
Pretty standard for this type of application, we need to able to 'map' our Salesforce fields to the proper fields in MailChimp. You can create the fields in MailChimp, or create them in Salesforce, no matter.
Data isn't synced instanteously between the two systems, and it shouldn't be. This issue isn't in changing a piece of data in Salesforce, and needing to tell MailChimp. It's when you change one piece of data on 50,000 records,
and then try to talk to MailChimp 50,000 times really quickly. We have to 'bulkify' our calls.
This app looks at two types of data: the CRM data (Contacts and Leads), and the data about which campagins these folks are in. Make a change to either data type, and it gets 'Flagged' for an update when the next job runs. Since there are two types of data, there are two jobs, and they can run anywhere from once a day to once an hour. And just in case you really do need to update right away, you can force the sync jobs to run right away.
The unfortunate part of MailChimp's syncing tool for Salesforce, is that when a contact unsubscribes or a messages bounces, that critical information stays with MailChimp only. That's not what we want,
because Salesforce is supposed to our 'repository of truth', not MailChimp. We need a way to allow MailChimp to talk to Salesforce, to tell us right away when those unsubs or bounced messages happen.
This is several thousands of lines of code, and I'm not sure where this application is going, or what it is going to become. I'm not releasing the Source for this yet until some of those questions get figured out. If it something that
you are interested in, or if your organziation is looking for an implementation similar to this, feel free to reach and let me know.
+1 (647) 367-1601
Port Hope, Ontario, Canada
Gutemala City, Guatemala