Technical Guide

This page contains technical information for experienced Salesforce administrators who are looking for a deeper explanation of the key jobs.

API usage

Salesforce imposes strict governor limits on API usage, which can impact various operations. However, it's important to note how these limits apply when syncing with Mailchimp:

Types of API Calls:
Salesforce categorizes API calls as either inbound or outbound:
Inbound API Calls: These are calls made to Salesforce from an external system.
Outbound API Calls: These are calls made from Salesforce to an external system.

Impact on Governor Limits:
Outbound Calls:
Crucially, outbound calls from Salesforce do not count against the governor limits. This is significant when syncing with Mailchimp.
Inbound Calls: Only these calls count against your Salesforce API limits.

Syncing with Mailchimp:
All syncing operations to and from Mailchimp are performed using outbound calls. For example, sending 100,000 emails to Mailchimp through various syncing methods (like subscriber rules, import wizard, list views, etc.) will not impact your Salesforce API limits. The only scenarios where inbound API calls are used, and thus count against your limits, are:
a) When using a Salesforce list view for bulk operations, such as adding contacts to a subscriber list. This will consume just 1 inbound API call.
b) When navigating to the sync settings page, which also uses up just 1 inbound API call.

In general, you should not need to worry about the Mailchimp application using up your inbound API limits.

Custom Objects

When the installation has been completed, the Salesforce objects below will be created in your Salesforce Org. These objects contain either records or settings required for our application to work. Our product has been designed to be self-contained, not to impact standard objects.

  • Mailchimp Account
  • Mailchimp Campaigns
  • Mailchimp Email Activity
  • Mailchimp Group
  • Mailchimp Group Category
  • Mailchimp Import
  • Mailchimp List
  • Mailchimp List History
  • Mailchimp Member

Our object structure should not be customized as it may stop our application from working correctly or stop automated upgrades.

Background jobs

The list below are the batch jobs that can run in the background within Salesforce.

McCampaignBatch
Imports Mailchimp Campaigns into Salesforce. This includes high-level statistics and metadata optionally used when syncing and storing detailed email activity (se: McEmailActivityBatch). The records are stored in the Salesforce object Mailchimp_Campaign__c.

McConfigBatchSyncs
Mailchimp configuration data with Salesforce. It loops through each connected Mailchimp Account and collects metadata around Mailchimp Audiences (Lists). If an Audience has been deleted directly from Mailchimp, this batch will also delete the Audience from Salesforce.

McEmailActivityBatch
If the sync is configured to store detailed Email Activities (such as Opens, Clicks, etc.), this job will call Mailchimp and store the details in Salesforce. Storing detailed Email Activities is only required if the data is used for Salesforce reporting on the individual opens, clicks, etc. The data can use up a significant amount of Salesforce storage and greatly add to the time it takes for the sync to run. It’s not required for use in the Lightning Components. The records are stored in the Salesforce object Mailchimp_Email_Activity__c.

McGroupBatchSyncs
Mailchimp Group (Interest) records with Salesforce. Any group records deleted directly in Mailchimp will be deleted from Salesforce as part of this batch job. The records are stored in the Salesforce object Mailchimp_Group__c. More information on Mailchimp groups can be found here Getting Started with Groups | Mailchimp

McListHistoryBatchSyncs
Mailchimp Audience growth history records with Salesforce. These records provide a month-by-month summary of a specific Audience’s growth activity. The records are stored in the Salesforce object Mailchimp_List_History__c.

McMemberBatchSyncs
Mailchimp Member records with Salesforce. This includes status information about a Member. E.g. email john.smith@beaufort12.com is Active. etc. If the sync is configured to store detailed Email Activities, this batch job will also collect detailed recent unsubscribed and bounced stats. Collecting these details stats can significantly increase the time it takes for the primary sync to run.

McMemberCountBatchCollects
Mailchimp metadata used in subsequent batches. It also syncs Mailchimp Category Group records to Salesforce. Mailchimp categories group together related groups/interests. More information on Mailchimp groups can be found here Getting Started with Groups | Mailchimp

McProcessAsyncRecords
BatchProcesses records that have been triggered due to an update on a Salesforce record. This can occur when a Salesforce user triggers an update on a contact, which in turn checks if there is a linked Mailchimp Member. It then attempts to update Mailchimp with the mapped Salesforce details. Most of the time, the trigger action is completely unrelated to Mailchimp, but if the fields are mapped, we always need to check if the data needs to be synced from Salesforce to Mailchimp.

McProcessBatch
Bulk removes Mailchimp records from Salesforce that are no longer required. For example, if a Mailchimp Account is disconnected from Salesforce, this batch will remove all related data in Salesforce.

McRuleBatch
Rules are used to process Mailchimp records in Salesforce. For example, you may have configured the Rule to create a Salesforce contact for new Mailchimp Members. This batch processes those rules.

McWizardReportBatch
Pushes Salesforce records to Mailchimp in bulk. This is used when a Data Wizard job has been configured to push records from a Salesforce report to Mailchimp.

McWizardSoqlBatch
Pushes Salesforce records to Mailchimp in bulk. This is used when a Data Wizard job has been configured to push records from a Salesforce List View, SOQL or Salesforce Campaign to Mailchimp.

Sandboxes

You can install our integration in one or more sandboxes. You can also refresh a sandbox and our application will be copied across below is some more detailed information.

How to install in a sandbox

  1. Go to our Salesforce AppExchange listing.

  2. Click the Get it now button.

  3. If you are not already logged in you will be prompted to do so.

  4. Choose Sandbox.

  5. Select I have read and agree to the terms and conditions, then click Confirm and Install.

  6. Choose whether to install for admins only, all users or specific profiles.  We recommend you select Admins only and once installed give users access via our permission sets.

  7. Click Install.

  8. Select Yes, grant access to these third-party websites then click Continue.

Sandbox refresh

When you start a sandbox refresh a copy of your installed applications will also be copied. This will include Mailchimp for Salesforce and there are some important points below to consider.

  • We do not recommend you connect any sandbox to your live Mailchimp account.
  • When a sandbox refresh happens we use a standard Salesforce process to disconnect Mailchimp from Salesforce.
  • You can also manually run a process before or after the sandbox refresh to clear out connection settings.
  • When performing a refresh, whether for a full or partial sandbox, data from our objects can be copied from the production environment.

We don't recommend connecting a sandbox to your live Mailchimp  account. Changes made in a sandbox can incorrectly update your Mailchimp data.

Sandbox conflicts

As mentioned above when refreshing a Salesforce sandbox, there may be some settings carried across from production. It is worth noting we do have some code that runs as part of the refresh to avoid this.  But in very rare scenarios, the code can be conflicted with. So to help we have two options to return settings to their default state.

Before starting the sandbox refresh
When refreshing the Salesforce sandbox, there is now an option to run a post-installation script. You can enter the value McSandboxPostCopy this will execute our code to clear out the settings. Ater performing these steps you will need to connect to M

How to test in a sandbox

When you have our product in a sandbox we recommend connecting it to a test Mailchimp account. The best way to setup a test account is to create a new Mailchimp account that is pay-as-you-go. This will allow you to test features in a dedicated account.

How to Uninstall

If you have purchased our product and have an active subscription you will need to contact us first. Once your subscription is canceled or you are in trial follow these steps:

1. Go to our Settings Tab.
2. Click on Maintenance.
3. Click Remove Layouts.
4. Once the layouts have been removed click User Security.
‍5. Select All Users that have one of our permission sets
6. Click Edit Permissions.
7. Select None.8. Click Assign Permission Set.
‍9. Finally click here and select uninstall next to Email Made Easy (Mailchimp).

You need to be a Salesforce system administrator to peform the uninstall process.

In this article