Episode 8. Handling Opt-ins /outs in SFDC CRM Vs. SF Marketing cloud — Consents Management

Agenda: I am sure you might have come across everyone’s favourite & a common topic Consents Management and have gone through the lengthy discussions in order to define this from business and technology perspective

ignore my handwriting :D

What I would like to do is share my experience working with different businesses and share insights on how we handled it and will describe 2 ways to capture and manage consents management.

Exciting! let’s get started..

Option 1: Handling opt ins / outs & managing consents in SFDC CRM

This is depicted on the left side in the picture where

  • The idea was to handle consents for multiple channels & capture per channel
  • SFDC is to be considered as a system of record / master for consents & their preferences.
  • Lastly the intention was to update the master (first) and make the information flow to the other downstreams systems in our case SFMC annd other systems in landscape
  • Pre-req: Customer using SFDC CRM and SFMC markting cloud both

Therefore, we decided to utilize new Consents managment framework or data model from Salesforce for storing and manageing our consents as below which answers key questios like Who provided consent, Which channels they consented to being contacted on, Via which channel address, and What type of content they consented to

Typical questions to deal with while consulting:

  1. How to capture / trigger points ? — Answer: A customer facing micropage / landing page built custom on SFDC CRM, hosted on a public branded community interface or you could also use force.com site.
  2. Where to store them — SFDC standard Consents Objects.
  3. How to sync with other downstreams systems- SFDC via. Marketing cloud connect so that customer preferences are respected for any commercials from marketing cloud and if he/she has decided not to receive any of your commerecial or marketing emails we as brand ensure that we don’t send any.
  4. And, Lastly manage the lifecycle of the consents (usually there exists requirement as well to ensure the consents given by customers are valid only for 48 GDPR reasons so before they become stale we need to ensure they are renewed)- this is easy peasy can be done in SFDC using process builder etc..

How We designed it :

In Salesforce CRM cloud

  1. Design a custom lightning component (you can also do VF page), host it on public community, the URL should be unique , hashed unique for each customer.
  2. Include this url as link behind unsubscribe in all commercials, or in the 1st of the series of the emails , you email you trigger when th customer is onboarded.
  3. Customer receives the email and clicks on unsubscribe , lands on the custom landing page where he can unsubscribe (default) or as optional in the form of checkbox. customer ticks out and information flows back to SFDC CRM.
  4. Contact point type consent record is updated , reflecting timestamp when customer unsubscribed and any optional information.
  5. Next, time is to sync this information (data change) to other systems.
  6. For SFDC → SFMC : Option 1: by relying on Marketing Cloud connect,Data can easily be shared in SFMC with polling frequency of 15mins (minimum) under synchronized data extension, (for this this you need to setup in marketing cloud- simple steps like ordinary objects under Contact builder — Data sources )
  7. Once the data flows under synchronized data extension, we need to design one automation which runs hourly or daily as well, to pick the delta from sync data extension and add them to the custom supression list also if you are in parent businss unit, you can sync this change under all subscriber lists as well. ( outcome: suppression list + all subscribers)
  8. Also, for SFDC → SFMC : Option 2 (recomended). If you need real-time this can also be done by making an api callout for the contacts which exists in marketing cloud. Important thing to note here is that, a contact should exists under “all susbcribrs” list otherwise you won’t be able to update their subscribers status in marketing cloud. lastly Also as part of MC connect featuring there are also few custom actions available on conact & lead in Sales CRM to unsubscribe & resubscribe actions which requires manual user action but that can also be utlitzed if the use case is not that major and for less volume rather than investing any effort on writing an api callout (any cusomization)
  • personally, I felt there are various benefits of using option 2. from above rather because this saves you from the cost of whole effort to write automation in SFMC a) to ensure all susbcribers in marketing cloud are always in sync ,b) maintaining any separate supression lists by feeding on synchronized data extension to ensure any delta change in Sales cloud gets synchronized sith SFMC. c) benefits the non technical guys (marketers) from the effort to run campaigns freely without worrying about consents and not writing/ updating your SQL (segmentation queries) in order to join your segmented data with custom consents data extension ( to exclude the unsubscribers)

LASTLY: Always best to use the any platform capabilties standard to its maximum rather than including any custom overhead for anyone.

9. If there are any other systems in the scope, you can trigger outbound messaging from SFDC to post the data change notification at the endpoint which external system can consume. (please see outcound messaging) SFDC → Sync with othr external systems.

10. similar way, one can capture consents for all applicable channels from a custom landing page (e.g. SALES cloud depending on which you wanted to master your data.) and get this udpated in SFDC CRM which can act as a master of customer consents.

At the end this is how one can visualize

Customer unsubscribes → update in SFDC → udpate in SFMC → (||ly) update the other external system.

Option 2: Handling Consents in SFMC

Now coming to solution 2, This is depicted on the right hand side of the pic above

Important: The idea here is to handle only email consents and subscriptions related to different publications from brand only (newsletter, commcercials, Ads etc.) NOT other channels.

Pre case: Customer using SFDC CRM and SFMC markting cloud

How we realize the solution :

  1. We used the standard subscription center from markeitng cloud as a place to manage all customer facing subscriptions
  2. Next, since this is the out of the box SFMC feature, no effort to invest in building a custom page, however if required you can create / design a microsite in Web studio under marketing cloud.& use combination of Amp script to handle the data update in SFMC.
  3. Now we trigger an email from SFMC, including standrd unbsubscribe link, customer receives th email, → clicks on the link and lands on to the standrd subscription center and unsubscribes.
  4. SFMC would be updated , please check the status reflection under all subscribers for the respective customer.
  5. Next, to sync the change from SFMC →SFDC CRM, how ? Option 1: we designed again an automation which monitors the delta change under all subscribers, queries Unsubscribe data view and all the audiences in the custom data extension ,
  6. Next, our automation job picks up the list or your data extension and starts updating staus in SFDC using amp script or SSJS updateSingle SalesforceObject and similar methods. this automation can be set to run on a nightly basis.
  7. Or Option 2: To update SFMC → SFDC is rely on the “email opt out” (powerful )field on contact &lead which will always be updated automatically by marketing cloud connect product in the other direction & to complete the journey once the “email opt out field” is updated , we can hav2 a process builder inside montoring any change on email opt out which will also immediately synchronize the change on “contact point type consent” record so that your central consents pool is always updated and Consents remain the real source of truth for all consents given per channels
  8. At this step SFDC side would be updated as well and if here is a need to updatd other systems you can use outbound messaging or platform events.

On a side note: please ensure the SF record 18 digit is to be used as a subsciber key or ID to make your life easy.

At the end this is how one can visualize

Customer unsubscribes → update in SFMC → udpate in SFDC→ (||ly) update the other external system (if required)

That’s all !! For question to decide which approach to use. Let’s try to include maximum possible factors a) How many systems are involved in the landscape who needs this info. b) type of consents to be captured (channels is it just email or other offline + digital channels as well)

Hope you enjoyed reading. You can read more about consents in general here:

Also check out this super usefel utility from Salesforce labs to manage and capture consents in salesforce CRM


Thanks — Mohit

Salesforce Program Architect at Salesforce