Walkthrough: Setting up an SFMC to Sitecore sync activity
Guide to setting up a synchronization activity between Salesforce Marketing Cloud and Sitecore using a Journey Builder activity.
If you installed the Tenant Service with the Salesforce Marketing Cloud Behavioral Data Exchange connector, you can use the Salesforce Marketing Cloud (SFMC) Activity for Sitecore Sync to let a SFMC Journey Builder activity trigger a synchronization between SFMC and Sitecore.
Note
Before you set up a synchronization between SFMC Journey Builder activity and Sitecore, you must have set up the Tenant Service to work with SFMC.
This walkthrough describes how to:
Create an SFMC tenant
Configure the API request URL for the custom activity
Configure the JWT Signing Key
Register a custom Journey Builder component
Set up a custom activity in the Journey Builder
The tenant is a container for the settings that you must configure for the service.
To create an SFMC tenant:
On the Sitecore Launchpad, open the Content Editor.
Go to /sitecore/system/Data Exchange and right-click on Data Exchange.
In the Insert menu, click Connect for SFMC Tenant.
Go to /sitecore/system/Data Exchange/<tenant name>. On the Content tab, in the Administration section, click Enabled.
Make a note of the tenant ID. You require this to configure the connection string.
Save the item.
If you have an XPScaled instance, you must also:
Go to <tenant name>/Endpoints/Providers/xConnect/xConnect Client Endpoint.
Clear the Use Collection Service Settings For All Services check box.
Fill in the following fields:
Section
Field
Value
Search Service
Search Service Connection String Name
xconnect.search
Search Service
Search Service Certificate Connection String Name
xconnect.search.certificate
Configuration Service
Configuration Service Connection String Name
xconnect.collection
Configuration Service
Configuration Service Certificate Connection String Name
xconnect.collection.certificate
The settings now look like this:
Save the item.
Go to <tenant name>/Tenant service Endpoints/Push SFMC Contact status to xConnect.
Make a note of the endpoint ID. You require this to configure a custom activity.
You must configure the API request URL for the custom activity in the Tenant Service.
To configure the URL:
On your Tenant Service, open the
sync-activity/config.json
file.In the
arguments/execute
node, find the key forurl
.Add the Tenant Service URL and the Push SFMC Contact Status to XConnect pipeline ID. For example:
https://[tenantservice]/api/tenantservice?id={00000000-0000-0000-0000-000000000000}
You must configure a JWT (JSON Web Token) signing key between your Tenant Service server and your SFMC instance.
To configure the JWT Signing Key:
On your SFMC instance, in the top right corner of the page, under your profile picture, click Setup.
On the left sidebar, navigate to Platform Tools/Apps/Installed Packages and click it.
Choose the API integration package that you created when setting up SFMC.
Copy the value of the JWT Signing Secret.
In the Content Editor of your CM instance, navigate to /sitecore/system/Data Exchange/[your tenant]/Data Access/Value Readers/Providers/SFMC/Jwt Content Payload To JObject Reader. In the JWT Signing Key field, enter the value of the JWT Signing Secret.
The Tenant Service server is used as a hosted endpoint for the custom activity.
You must register the endpoint of the Tenant Service custom activity in your Marketing Cloud installed package.
To add events or activities to an existing Marketing Cloud app, add them as components in the same package you used for API integration.
To create a Journey Builder Activity component:
On your SFMC instance, open your profile setup page.
On the right sidebar, navigate to
Platform Tools/Apps/installed packages
and click it.Choose the API integration package created when setting up SFMC.
Under Components, click Add Component.
Select Journey Builder Activity.
Type a Name and Description for the activity.
Select a Category. The category determines under which section on the Journey Builder Canvas the activity appears.
Note
By default, the
tenantservice/sync-activity/config.json
file specifies the default value ofMessages
for categories. The activity uses that value instead of the value selected in the Journey Builder Activity. To use the category you specify in the activity, you must remove the default value from the config file.In the Endpoint URL field enter, for example,
https://[Tenant Service host]/sync-activity
.Note
Journey Builder loads all assets relative to this endpoint.
Save the component.
To add a custom activity in the Journey Builder:
In your SFMC instance, go to Journey Builder.
Choose the type of journey and click Build.
On the left sidebar, in the Messages section, locate the Sitecore activity you want to add. Drag and drop it into the journey flowchart.
In the Contact State field, enter the state name. If the state is an exit state, select Contact is exiting the journey.
Note
Exit state means that the contact exits the journey when this activity is completed.
Click Save to save your changes, and click Activate to activate the journey.