About Reset Campaign Members¶
The step in the Salesforce campaign membership synchronization process where existing campaign memberships are reset is needed due to the way campaign membership is read.
A simplified description of the logic is:
- Read all campaigns.
- For each campaign, get the contacts who are associated with the campaign.
- For each contact, add the campaign to the collection of campaigns on the contact.
An example is helpful to understand why the reset is necessary. Consider when a contact is a member of multiple campaigns:
Step | Contact value (before) | Contact value (after) |
---|---|---|
Update with Campaign A | - | Campaign A |
Update with Campaign B | Campaign A |
Campaign A, Campaign B |
Update with Campaign C | Campaign A, Campaign B |
Campaign A, Campaign B, Campaign C |
What happens if the contact is removed from Campaign C
?
The next time the synchronization process runs, Salesforce
reports the contact is associated with Campaign A
and
Campaign B
. How does Campaign C
get removed from
the xDB contact?
The reset campaign membership step ensures that the contact value is empty before the Salesforce data is applied:
Step | Contact value (before) | Contact value (after) |
---|---|---|
Reset Campaigns | Campaign A, Campaign B, Campaign C |
- |
Update with Campaign A | - | Campaign A |
Update with Campaign B | Campaign A |
Campaign A, Campaign B |
What happens if the reset campaign membership step does not run? The values from the previous synchronization remain:
Step | Contact value (before) | Contact value (after) |
---|---|---|
No Reset Campaign | Campaign A, Campaign B, Campaign C |
Campaign A, Campaign B, Campaign C |
Update with Campaign A | Campaign A, Campaign B, Campaign C |
Campaign A, Campaign B, Campaign C |
Update with Campaign B | Campaign A, Campaign B, Campaign C |
Campaign A, Campaign B, Campaign C |
Note
Why is this approach used to read campaign membership? In a word: performance.
We found that the alternatives (such as reading the campaign membership for a contact at the same time you read the other contact data) are much slower when dealing with more than a couple dozen contacts.
It is fully within your control to change how any synchronization process works. If you prefer to use a different approach, you can implement it.
Caution
This step is not selective in which contacts are reset. If you are synchronizing with multiple Salesforce accounts, or if you are using filters to limit the contacts that you are synchronizing, this part of the synchronization process may not work as expected.
Note
Future versions of Salesforce Connect will allow you to assign a filter to the step that reads contacts from xDB so that only contacts that have been synchronized with a specific Salesforce account will be selected.