Marketing Cloud Connect excels at getting data into Marketing Cloud from Sales Cloud or Service Cloud but is limited in what it automatically syncs back to them. By utilizing some of the more advanced tools in the Marketing Cloud Connect toolbox, you can sync back whatever data you want from Marketing Cloud to Sales or Service Cloud. This means your organization can see whatever information in the Sales or Service Cloud that best fits you.
How Marketing Cloud Connect Works
Like all connections in Marketing Cloud Connect, you need to use the Sales or Service Cloud IDs to update information from Marketing Cloud. As we discussed in our last article, making sure you have cleaned Marketing Cloud of duplicate contacts with a subscriber key migration will make it much easier to pass the correct information to the correct contact in Sales or Service Cloud.
To actually pass data back to Sales or Service Cloud, you’ll need to use Marketing Cloud’s native scripting language: Ampscript. Ampscript was designed as a coding language that average users could use to include dynamic, personalized information into emails. This means Ampscript is relatively easy to learn and, in fact, updating data in a Sales or Service Cloud object is a single built-in function: UpdateSingleSalesforceObject().
Don't forget to check out: Debunking the Big 5 Myths about Salesforce Marketing Cloud
Automations don't allow Ampscript to run in them, so to automate the syncing process, you'll need to use SSJS. Once you have validated your Ampscript in a cloud page, you can put it into a content block and call it with the SSJS function Platform.Function.ContentBlockByID(). By loading the content block, the automation will execute the Ampscript code and update the desired object(s) in Sales or Service Cloud.
Tips and Tricks
Automations will halt if the Ampscript encounters an uncaught error (just like SSJS), even though the Ampscript is being called through a content block. To make sure you can control when the automation stops and what it does with errors, you need to leverage the use of SSJS try-catch blocks to capture errors. Since content blocks allow you to incorporate both SSJS and Ampscript together, you can accomplish this by wrapping Ampscript in SSJS.
Depending on what information you are syncing back to Sales and Service Cloud and how important it is that you know what wasn’t synced back, you can also consider sending email notifications out about the failure through Triggered Sends.
Check out another amazing blog by DB Services here: Salesforce Winter '21 Release Highlights
Syncing data back to Sales or Service Cloud from Marketing Cloud is a hugely powerful feature of Marketing Cloud Connect. The ability to pass custom data back, in addition to the built-in tracking data, makes it all the more useful. Our last article in this series will touch on one last way to expand the base functionality in Marketing Cloud Connect: previewing a full-resolution email from a Marketing Cloud send in Sales or Service Cloud. For help setting up Marketing Cloud Connect to sync custom data to your Sales or Service Cloud, please contact us.