If salesforce marketing cloud is connected with SFDC. When contacts are pushed from SFDC to SFMC and email is sent to contacts from SFMC, contacts are saved in all subscribers in SFMC.

What is some contacts changes their email in SFDC, then those contacts will end up in marketing cloud as new contact. How can this problem be resolves so duplicate contacts with different email addresses are not being created in marketing cloud?

Example use-case:

  1. Company Website is linked with SFDC (service cloud)
  2. Customers are constantly going to profile page and update email address
  3. Updated email address does to SFDC (service cloud)
  4. Data from SFDC is pushed to SFMC in syncronished data extention (Customers)
  5. Email is updated in the data extention
  6. When email goes out, SFMC creates a new subscriber since email is new. Hence we end up with duplicate contacts - same contacts with old and new email address.

2 Answers 2


My suggestion is:

  • Do not allow email changes in the relevant field directly;

  • Set up a separate "changeToAddress" field to enter a new email address; Consider this a change request, not a change.

  • When that field is filled out, send a transactional email to this "new email" address using a dummy key in Marketing Cloud (use GUID() / newId() functions) with a button for the recipient to confirm the change. It makes sense to include the contact ID in order to be able to never lose the connection to the "right" contact in the next step.

  • set up a handler page that handles the confirmation of the change request. you can directly change the "real" email address field in this step using updateSingleSalesforceRecord and the contact Id. On this page you can also update the record on all subscribers, to prevent that it could get out of synch with SFSC, as this is not directly tied, which leads to the effects you describe.

  • after some time , delete the dummy key that was used for the transactional send using Contact Deletion framework.

If nochange confirmation was given, you can also empty the email address from the "changeToAddress". The request is basically declined or invalid, as no one confirmed it, which could be due to fraudulent / invalid email etc. In this case, the system can and should remove all traces of the attempted change, especially since email Address is PII. All that stays is an anonymous sendout statistic. +You have not created a permanent (billable) duplicate Contact.

If a confirmation was given, SFSC & All Subscribers are updated, the email address is confirmed to be valid, you can store a permission, and you also have not created a permanent (billable) duplicate Contact as contact deletion removes the dummy key.

All the while it is a good idea to log what the different systems do. Make sure you include "status", "source" & "timestamp" fields on the relevant objects so you always know WHAT was changed by WHOM and WHEN. Track statuses like "requested", "confirmed" at the different points so you can monitor what's going on and also pick up processes where they got stuck if something goes wrong.

  • Hi @Jonas Lamberty first of all, thank you for answering my question and providing all the details. it is very helpful. I have added some additional information in my question to clarify that email update is initiated by website --> SFDC --> SFMC (not directclly in SFMC). How can the change be handled while keeping the data clean in SFMC (no duplicates)? Thanks!
    – kl2
    Dec 7, 2020 at 22:54
  • even better, you don't have to change any permissions inside sfdc. Step 1 becomes obsolete, just make the external system not change email, but enter a "changeToAddress". Then step 2 and all remaining steps follow in the same way. A DOI process is all the more important in your scenario now, as changes on a website are maybe even more prone to fraudulent email, typos etc. Dec 8, 2020 at 7:38

If you have Marketing Cloud Connect in place, I'm not sure why you would be creating duplicate contacts in Marketing Cloud when an email address gets changed, as the subscriber key will be the 18-character Salesforce Contact ID.

What will happen (out of the box, if you do not intervene) is that the email address for a contact will not get updated in the All Subscribers list.

You can update the email address with a four-step automation:

  1. SQL query to return contacts where the email address in SFDC does not match what's in the All Subscribers list
    s.Id as SubscriberKey,
    s.Email as EmailAddress,
    Contact_Salesforce as s
    _subscribers as a
ON s.Id = a.SubscriberKey
WHERE s.Email != a.EmailAddress
  1. Data extract activity that extracts the returned records from the previous step as a .csv
  2. File transfer activity to move the file to the import folder of the SFTP directory, where the file can be processed from.
  3. Import activity to import the file into the All Subscribers list, updating the email address values for the specified records.
  • Thank you @Antonio this sounds like a good solution to me. Just to confirm. I have updated the use-case in my question above. I think your solution should work. Do you agree? Also - in your answer, Contact_Salesforce is the syncronized data extention in SFMC that gets contacts data from SFDC? Just curious. what is the subscriber key in your solution? email address or SFDC contact id?
    – kl2
    Dec 7, 2020 at 22:57
  • Hi @Antonio - as I am thinking about your solution. I think it will work for most of the contact though let says is export and import activity is running once a day (considering running comparison on All subscribers will take a lot of time and can't be run hourly). If email to changes contacts goes out before import and export, in that duplicate contacts will starts creating in all aubscribers with same contact and different email address (old and new). correct?
    – kl2
    Dec 7, 2020 at 23:17
  • I think a lot depends on whether your website database is retrieving the Salesforce Contact ID when contacts are created in SFDC. It sounds like this is not happening? Assuming your company is using the API to create contacts, if the Contact ID is retrieved and stored in the website database, then it's possible to ensure email address updates take place properly as per the method above. If this isn't happening and you're creating new contacts in SFDC whenever an email address gets changed, then it's a different scenario. Our implementation uses Contact ID as the subscriber key. Dec 8, 2020 at 10:12
  • @kuml2 - Contact_Salesforce is indeed the synchronized data extension that contains the data from the Contact object in Salesforce. Dec 11, 2020 at 9:59
  • @AntonioDePalma does this query work if you're doing it in the child BU of a multi-tenant org? I ask bc I have SFDC Connector setup. When I query the synchronized de and look for contacts with emails that are different than that in All Subs, I do not come up with an email address that I changed (for testing). I come up with 8 different email addresses and subscriber keys, all of whom seem to have the correct email in both All Subscribers and the Contact_Salesforce sync'd DE. Here's my query below for reference. Mar 20, 2023 at 21:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .