3

We recently implemented a custom preference center via cloudpages that captures publication preferences and allows a unsubscribe all feature with Salesforce CRM as our source of truth.

We have sent our first email newsletter with a link to the page in the footer and noticed that some unsubsribes are coming back at SFMC level.

Assuming that is caused by the List- Unsubscribe feature added by email clients. Attaching screenshot for reference.

How to prevent this so our motive to capture opt-in/opt-outs at CRM level is fullfilled

enter image description here

1 Answer 1

1

This is a common problem - reconciling the database of record (DBOR) to the All Subscribers. This problem also occurs for any manual unsubscribes in the All Subscribers.

My solution would be to run a Query against the All Subscribers to determine which new unsubscribes have occurred in the previous day.

Once you know who these people are, you would want to perform an API call to Salesforce CRM updating these subscribers to Email Opt Out = true.

Since Script Activities don't allow AMPscript, rather run this function as AMPscript in an email looping through all the records and updating Salesforce CRM accordingly. The email should be part of an automation and send can be sent to a "blackhole" email address if need be ([email protected]).

Automation Studio Steps:

  1. Schedule - daily
  2. Run a "Tracking" Data Extract, ticking the "All Subscribers" box (I don't trust the _Subscribers data view for queries, I have found strange results previously)
  3. Use a File Transfer Activity to extract the zipped file to the FTP
  4. Import Activity to import the file into a Data Extension
  5. Query Activity to segment by "unsubscribe within the previous day" (can also filter by the "feedback loop" unsubscribe method)
  6. Send email to a blackhole subscriber (in a list) initiating the "UpdateSingleSalesforceObject()" function against the results of step 5. This would need to use an AMPscript loop:

    %%[ SET @DE = "yourDEName" SET @rows = LookupRows(@DE,"Constant",1) /* Data Extension has a numeric value of 1 as a default on column "Constant" */ IF RowCount(@rows) > 0 THEN FOR @i = 1 to RowCount(@rows) DO SET @row = Row(@rows,@i) SET @subKey = Field(@row,"SubscriberKey") /* Adjust this field to your Data Extension field */ /* Send SF API call to each of them */ SET @updateSFresult = UpdateSingleSalesforceObject("Contact",@subKey,"Email Opt Out","True") /* Double check the actual field name in SF */
    NEXT @i ENDIF ]%%

You must log in to answer this question.

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