Skip to main content

Integration

Salesforce and Mailchimp Integration

Custom API integration syncing Salesforce contacts and campaign data to Mailchimp audiences with field mapping, segment sync, and unsubscribe handling.

Salesforce
Mailchimp

Integration

What This Integration Does

This integration synchronises Salesforce contact and lead data into Mailchimp audiences, keeping your email marketing lists aligned with your CRM records. It maps Salesforce fields to Mailchimp merge fields, translates Salesforce report or campaign membership into Mailchimp tags, and handles the ongoing sync so that your Mailchimp audiences are always a current reflection of your Salesforce data.

Mailchimp offers a native Salesforce integration, but it has well-documented limitations — it struggles with custom objects, cannot map complex field relationships, and provides limited control over how contacts are added to or removed from audiences. This custom integration gives you precise control over every aspect of the sync: which Salesforce records qualify, how their fields map to Mailchimp, and what happens when records are updated or removed in either system.

The sync is bidirectional for engagement data. Mailchimp campaign engagement (opens, clicks, bounces, unsubscribes) is written back to Salesforce as campaign member status updates, giving your sales team visibility into email engagement without leaving the CRM.

The Workflow

The integration authenticates with Salesforce via the OAuth 2.0 JWT bearer flow and with Mailchimp via API key. It reads from Salesforce using SOQL queries that target specific reports, campaign memberships, or filtered views of Contact and Lead objects.

On a scheduled basis, the integration runs the configured SOQL queries to pull the qualifying records. Each record is mapped to a Mailchimp subscriber record with the configured merge fields and tags. New records are added to the Mailchimp audience. Existing records are updated if their Salesforce field values have changed. Records that no longer appear in the Salesforce query results are flagged for removal or untagging in Mailchimp, depending on the configured behaviour.

For engagement data flowing back to Salesforce, the integration polls Mailchimp’s Reports API after each campaign send. Open, click, and bounce events are matched to Salesforce records by email address, and the corresponding Salesforce campaign member statuses are updated. This gives the sales team a timeline of email engagement on each contact record.

The scheduled sync runs at configurable intervals — hourly for high-volume teams, daily for most. Each run is logged with a summary of records added, updated, removed, and any errors encountered.

Before and After

Before: The marketing team maintains Mailchimp lists manually, exporting Salesforce reports to CSV files and importing them before each campaign. The process takes half a day for a large list. Contacts who have left a Salesforce segment are still receiving campaigns. Engagement data from Mailchimp campaigns never makes it back into Salesforce, so the sales team has no visibility into which contacts are engaging with email content.

After: Mailchimp audiences update automatically based on Salesforce data. The marketing team builds campaigns against lists they can trust are current. Contacts who no longer qualify are removed or retagged without manual intervention. Campaign engagement data flows back into Salesforce, giving the sales team email open and click data alongside their CRM activity timeline.

Who Needs This

This integration is for organisations that manage their pipeline in Salesforce and run email campaigns through Mailchimp. It is the right fit if:

  • You send regular email campaigns in Mailchimp to audiences derived from Salesforce reports or campaigns
  • Your team spends significant time each month on CSV exports and imports to keep Mailchimp lists updated
  • You need Mailchimp campaign engagement data (opens, clicks, bounces) visible on Salesforce contact records
  • You use Salesforce campaigns to track marketing touchpoints and want Mailchimp sends reflected there
  • Mailchimp’s native Salesforce integration does not support your field mapping needs, custom objects, or complex segmentation logic

How We Build This

We begin with your Salesforce report structure and Mailchimp audience organisation. We identify which Salesforce queries define each Mailchimp audience, map every relevant Salesforce field to a Mailchimp merge field or tag, and define the rules for record addition, update, and removal.

On the Salesforce side, we use SOQL queries with the Bulk API for large datasets and the REST API for incremental updates. The JWT bearer flow handles authentication without requiring an interactive login session. We scope the connected app’s permissions to the minimum required objects and fields.

On the Mailchimp side, batch operations handle the bulk of the sync work. The Batch endpoint processes up to 500 operations per call, and we chain multiple batches for large audiences. Merge field updates and tag assignments are included in the batch operations for efficiency.

The engagement data writeback uses Mailchimp’s Reports API to pull post-send engagement data. We match engagement events to Salesforce records using email address, then update Salesforce campaign member records through the CampaignMember API. This runs after a configurable delay post-send to capture the majority of engagement before writing back.

Testing covers the full sync cycle: initial bulk sync from Salesforce to Mailchimp, incremental updates for changed records, removal handling for records that no longer qualify, unsubscribe protection, and engagement data writeback to Salesforce campaign members.

Start Syncing Your CRM Data Into Your Email Campaigns

If your Mailchimp audiences are assembled from manual exports, they are out of date before the first email is sent. We build the integration that keeps Salesforce and Mailchimp aligned so your campaigns always target the right people.

Get in touch to discuss your Salesforce and Mailchimp integration.


Related pages:

Ready to Connect Your Systems?

We build custom API integrations that handle your data reliably at scale. No Zapier, no workarounds.

Discuss Your Integration View All Integrations