Support Center | Administration | Technical Guide

Technical Guide

This page contains technical information for experienced Salesforce Administrators who are looking for a deeper explanation of the key jobs that run as part of the Campaign Monitor for Salesforce application.

API Usage

Salesforce has strict governor limits around the use of API calls. The Campaign Monitor for Salesforce application does not use any API calls when syncing.

There are two types of API calls. Inbound and Outbound. Outbound calls from Salesforce do not count against governor limits.

All syncing to and from Campaign Monitor are done via outbound calls. For example, if you are sending 100K emails to Campaign Monitor via any of our syncing methods (e.g. Subscriber Rules, Import Wizard, List Views etc), these do not count against your salesforce API limit.

The only time the Campaign Monitor for Salesforce application uses inbound API calls is when you:

a) Use a Salesforce List View to perform a bulk operation. E.g. If you select Add Contacts to Subscriber List when working from a List View or via the Import Wizard. This will use up just 1 inbound API call.

b) Navigate to the Sync Settings page. This will use up just 1 inbound API call.

In general, you should not need to worry about the Campaign Monitor application using up your Inbound API limits.

Background Jobs

The following table provides a list of Campaign Monitor for Salesforce batch jobs that can run in the background within Salesforce.

CMBatchCampaign

Pulls in Email History from Campaign Monitor into Salesforce. The records are stored in Email Tracking History (E.g. opens, clicks etc) (wbsendit__Campaign_Activity__c). This table may contain a large number of rows. See: Storage. This job runs as part of the primary sync between Salesforce and Campaign Monitor.

CMBatchCampaignStats

Updates any linked Salesforce campaigns with statistics from the related Campaign Monitor campaign (E.g. number of clicks, bounces, unsubscribed etc). This job optionally runs as part of the primary sync between Salesforce and Campaign Monitor. It runs if the following setting is set to active Update Salesforce Campaign statistics with Campaign Monitor statistics. See: Manage Campaign Settings

CMBatchDeleteSubscribers

Run as part of the Import Wizard job if the Replace subscribers on list option is enabled under advanced settings. It removes any subscribers from Campaign Monitor that were not in the Import Wizard report or list view. If there are a large number of subscribers to remove from Campaign Monitor, this job can take a long time to complete (if this is the case, you could also consider creating a completely separate Subscriber list for the import and deleting the old list - as this could be more efficient).

CMBatchEmailOptOut

This batch updates the standard Salesforce email opt-out field on the Contact and Lead records based on the subscriber status. It will opt out any subscribers that are unsubscribed from all subscriber lists within Campaign Monitor. This job optionally runs as part of the primary sync between Salesforce and Campaign Monitor. It runs when the following setting (in the General Settings → Options) is enabled: ‘Set Email Opt to true when a contact or lead is Unsubscribed or Deleted in all lists’ and a Contact or Lead is unsubscribed or deleted in all lists

CMBatchSubscriber

Updates Salesforce with the status of any subscribers it finds in Campaign Monitor. If the Create Rule is enabled it may create and link new subscribers as Contacts or Leads in Salesforce along with any mapped fields. This job runs as part of the primary sync between Salesforce and Campaign Monitor. If it is unable to update Salesforce (due to restricted fields etc), then a message will be logged under Maintenance Messages.

CMBatchSubscriberStats

Updates Salesforce subscriber lists with statistics from the related Campaign Monitor subscriber list (E.g. number of clicks, bounces, unsubscribed etc). This job runs as part of the primary sync between Salesforce and Campaign Monitor.

CMConfigBatch

Syncs Campaign Monitor configuration data with Salesforce. This includes syncing any Campaign Monitor lists, clients and users with Salesforce. For example, if a user has created a list directly in Campaign Monitor, then this job needs to have run before it will appear in Salesforce. This job runs as part of the primary sync between Salesforce and Campaign Monitor.

CMScheduleSubscribers

This is a schedulable job that is called from sendItScheduleSubscriptions when the sync is enabled. It starts the primary sync between Salesforce and Campaign Monitor.

ImportListViewBatch

Called from the Import Wizard,etails from a Salesforce List View into paign   Monitor. It can ru Import Wizard). The process runs under the scheduled user and as such will only have access to the Salesforce records that user can see.

ImportScheduler

Scheduler for running Import Wizard jobs. It runs hourly under the Salesforce user who requested the scheduled import jobs. This is to ensure the import wizard runs under the owner of the person who started the job (and therefore can only see records available to them).

ProcessAsyncRecords

Scheduler for running Import Wizard jobs. It runs hourly under the Salesforce user who requested the scheduled imThis is a queuable job that runs if it needs to send Salesforce data to Campaign Monitor (typically for a single CRUD operation on an Account, Lead or Contact). It can be invoked from a trigger or process builder action.
port jobs. This is to ensure the import wizard runs under the owner of the person who started the job (and therefore can only see records available to them).

It will typically only run if there are a) any mapped fields for the subscriber list that the Contact or Lead is associated with, or b) if there are automatic subscription rules that meet the criteria for a Contact or Lead, c) there is an email change on the Contact or Lead.

You can prevent the ProcessAsyncRecords from being called by setting 'Disable Salesforce account, contact and lead triggers' to active under Sync Settings.

ProcessAsyncRecordsBatch

This is a batch job that runs if it needs to send Salesforce data to Campaign Monitor. It is similar to ProcessAsyncRecords in that it can be invoked under the same conditions. The difference is that it will run when a) there are multiple records that need to be processed or b) if the ‘Enable support for Nonprofit Success Pack (NPSP)’ is active (this is the equivalent of running the job in sequence rather than in parallel). It works by processing items held in a custom object called Queue_Item__c. It will continue to process these records in atomic transactions. If there are still more items to be processed in the Queue_Item__c object when the batch job completes, it will re-spawn itself.

N.B. If you are running multiple Salesforce Process flows that update the same Salesforce object, this can result in multiple ProcessAsyncRecordsBatch jobs running at the same time. To reduce the chance of this happening, where possible, structure your Salesforce Process flows to update the same Salesforce object.

You can reduce the number of ProcessAsyncRecordsBatch from being run by setting 'Disable bulk triggers for account, contact and lead triggers' to active under Sync Settings. This will result in only the first record in a transaction being processed.

RefreshCampaignHistory

Manages the space used by the ‘Email Tracking History’ object. See: Storage. This job can take a long time to run if a full re-import Campaign Monitor data into Salesforce has been requested. See: Maintenance

RefreshSubscribers

Clears out the Subscriber List Member (wbsendit__Subscription__c) object. It’s called when a full refresh is requested a full re-import Campaign Monitor data into Salesforce. See: Maintenance

ReportToListBatch

Called as part of the Import Wizard, this imports subscriber details from a Salesforce report into Campaign Monitor. It can run as a once off manually initiated job or via a scheduled process (if the user has configured this via the Import Wizard).

SmartEmailBatch

Updates Salesforce with smart email template details fetched from Campaign Monitor. This job runs as part of the primary sync between Salesforce and Campaign Monitor. See: Transactional

SmartEmailDetailsBatch

Updates Salesforce with smart email template variable details fetched from Campaign Monitor. This job runs as part of the primary sync between Salesforce and Campaign Monitor.

SmartEmailTaskDetailsBatch

Updates tasks in Salesforce that were sent as part of a smart email. It pulls in the actual text that was sent to the subscriber. This job runs as part of the primary sync between Salesforce and Campaign Monitor.

Process Builder Invokable Action

The Salesforce Process builder is a powerful tool and when combined with Campaign Monitor for Salesforce, it provides fine grain control over sending targeted transactional emails to subscribers.

The trade off comes with the complexity of setting up and debugging processes. To help troubleshooting emails not sending, you can test the last step in the process builder action with the code below (E.g. try running the code in the Salesforce Developer Console). This is essentially the code that is called when you use the smart email invokable action in the process builder. If the code below works, then any problems are likely to be related to the fact that the invokable action is not being triggered (E.g. a status on a field used in your Salesforce process builder logic may not be correct etc).

You can also test your Salesforce process by creating a dummy task or updating a value on an object. The code below will help check if the correct Ids were used in the Smart Email Invokable Action in the process builder.

There are two main variables you need to find and use:

  1. RootObject (Record Id) - This is the Id of the Salesforce record (E.g. Contact Id, Lead Id etc.).

  2. SmartEmailId (Smart Email Mapping Id) - This is the Id found on the Smart Email Mapping record.

When selecting the object to base the process on in Process Builder, avoid checking "Recursion - Allow process to evaluate a record multiple times in a single transaction?" - this can cause issues with Salesforce governance limits as the action may be called multiple times.

Salesforce Domain Name

The Salesforce Process builder is a powerful tool and when combined with Campaign Monitor for Salesforce, it provides fine grain control over sending targeted transactional emails to subscribers.

If you are using Salesforce Lightning but don't have a Domain set up, you may receive the error similar to this: No CONTROLLER named js://wbsendit.pagination found

Salesforce requires a domain to be set up in order to use Lightning Components (which are used as part of the Campaign Monitor for Salesforce application). See here:

Setting up a Salesforce Domain will remove this message.

This video walks you through setting up a Domain Name.

Was this article helpful?

Thank you. Your feedback has been received!
Oops! Something went wrong while submitting the form.

If you have any questions please click here

© 2017 Beaufort 12 Limited is a company registered in England and Wales with company number 8174703
Privacy Policy | Terms & Conditions | Cancellation Policy