Skip to main content

Walkthrough: Setting up an SFMC to Sitecore sync activity

Abstract

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:

  1. On the Sitecore Launchpad, open the Content Editor.

  2. Go to /sitecore/system/Data Exchange and right-click on Data Exchange.

  3. In the Insert menu, click Connect for SFMC Tenant.

    Insert Connect for SFMC Tenant option in the Data exchange node in the Content tree.
  4. Go to /sitecore/system/Data Exchange/<tenant name>. On the Content tab, in the Administration section, click Enabled.

    Enable or disable option in the Administration section of the Data Exchange tenant content tab.
  5. Make a note of the tenant ID. You require this to configure the connection string.

  6. Save the item.

If you have an XPScaled instance, you must also:

  1. Go to <tenant name>/Endpoints/Providers/xConnect/xConnect Client Endpoint.

  2. Clear the Use Collection Service Settings For All Services check box.

  3. 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:

    Collection service settings filled in.
  4. Save the item.

  5. Go to <tenant name>/Tenant service Endpoints/Push SFMC Contact status to xConnect.

  6. 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:

  1. On your Tenant Service, open the sync-activity/config.json file.

  2. In the arguments/execute node, find the key for url.

  3. 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:

  1. On your SFMC instance, in the top right corner of the page, under your profile picture, click Setup.

  2. On the left sidebar, navigate to Platform Tools/Apps/Installed Packages and click it.

  3. Choose the API integration package that you created when setting up SFMC.

  4. Copy the value of the JWT Signing Secret.

  5. 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:

  1. On your SFMC instance, open your profile setup page.

  2. On the right sidebar, navigate to Platform Tools/Apps/installed packages and click it.

  3. Choose the API integration package created when setting up SFMC.

  4. Under Components, click Add Component.

  5. Select Journey Builder Activity.

  6. Type a Name and Description for the activity.

  7. 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 of Messages 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.

  8. In the Endpoint URL field enter, for example, https://[Tenant Service host]/sync-activity.

    Note

    Journey Builder loads all assets relative to this endpoint.

  9. Save the component.

To add a custom activity in the Journey Builder:

  1. In your SFMC instance, go to Journey Builder.

  2. Choose the type of journey and click Build.

  3. On the left sidebar, in the Messages section, locate the Sitecore activity you want to add. Drag and drop it into the journey flowchart.

    Salesforce Marketing Cloud Journey Builder main interface.
  4. 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.

    Salesforce Marketing Cloud Journey Builder dialog showing options for a new state.
  5. Click Save to save your changes, and click Activate to activate the journey.