What is the best practice way of synchronizing Mobile Connect subscriber status with Sales/Service Cloud?

If mobile opt-in/out status is held at Sales Cloud, you can: Query the Synchronized Data Extensions -> Data Extract -> File Transfer -> and Import into MobileConnect All Contacts.

But what about the other direction? What if you need to update Sales/Service cloud with the opt-in status so that you're not overwriting MobileConnect if someone opts out.

For example, a mobile number is opt-in on SalesCloud. The data is synchronized through the connector, and then with the process mentioned above: imported into MobileConnect. The mobile number then opts-out. The same process would overwrite them as Active because there is no sync going back to SalesCloud.

The two methods I can think of (with keeping it the SF ecosystem) are shaky at best:

  1. Set up an automation that sends an email to yourself using UpdateSingleSalesforceObject and update unsubscribes through a lookup.
  2. Put the unsubscribes through a nightly journey that unsubscribes them using a Salesforce Object activity

Both of these seem sketchy AF. You would think there would be an out-of-the-box solution for this. Does anyone have any insights or experience with what they've done?

  • 2
    Not entirely sure if it works but you can try this with a SSJS activity that initiates a content block with the UpdateSingleSalesforceObject function. How you get AMPscript into SSJS is described here: salesforce.stackexchange.com/questions/99904/…. Apr 18, 2019 at 22:49
  • Thanks. This gets me in the right direction. Apr 19, 2019 at 0:46

2 Answers 2


Run a script in Automation Studio in SSJS:

<script runat="server">

Then in the Content Area, run a lookup in AMPscript of unsubscribes and use UpdateSalesforceObjects.


Why don't you just process that unsubscribe on the Marketing Cloud side by using UpdateSingleSalesforceObject?

When the user unsubscribes on your custom preference center, just call that function when you are unsubscribing them from Marketing Cloud. When a user texts STOP/CANCEL/QUIT/etc then just run that script on the keyword.

We manage all subscriber statuses in Sales Cloud and haven't seen any issues with this approach whatsoever.

  • It's not from a custom preference center though. Also someone can still opt-out of mobile using the STOP keyword which is why the script is still needed Apr 19, 2019 at 18:17
  • Gotcha, unfortunately the stock preference center limits your ability here. You can still control syncing back to Sales Cloud inside of the system defined opt-out keywords since you are able to modify the messaging/script inside of those keywords. Apr 22, 2019 at 13:55

You must log in to answer this question.

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