Skip to main content

Walkthrough: Setting up a Marketing Automation activity for Salesforce

Abstract

Guide to setting up a Salesforce Marketing Cloud activity for Marketing Automation in Sitecore.

If you installed the Tenant Service with the Salesforce Marketing Cloud Behavioral Data Exchange connector, you can set up an Salesforce Marketing Cloud (SFMC) activity for Marketing Automation (MA) that allows you to use an MA engagement plan to trigger a synchronization between Sitecore and SFMC.

Note

Before you set up an SFMC activity for MA, you must have set up the Tenant Service to work with SFMC.

This walkthrough describes how to:

  • Create an SFMC tenant

  • Configure connection strings on a Marketing Automation service server

  • Connect the Tenant Service to an engagement plan

  • Set up synchronization to either an SFMC Centralized Data Extension or an SFMC Centralized Data Extension and a journey.

The tenant is a container for the settings you must configure for the service.

To create a Salesforce Marketing Cloud (SFMC) tenant:

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

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

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

    Insert Connect for SFMC tenant option in 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 a tenant
  5. Make a note of the tenant ID. You need it 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 should now look like this:

    Collection service parameters with mandatory values highlighted.
  4. Save the item.

You must configure connections between your Tenant Service server and your Marketing Automation service server.

To configure connection strings:

  1. On your Marketing Automation service server, open the <Marketing Automation Service>\App_Data\jobs\continuous\AutomationEngine\App_Config\ConnectionStrings.config file.

  2. Add a connection string for the Tenant Service. For example:

    <add name="tenantservice" connectionString="https://sc10.service" />

    Note

    In the example, replace https://sc10.service with the name of your Tenant Service

To activate the Marketing Automation, you must connect the Tenant Service to an engagement plan.

Note

For this topic, it is assumed that you are familiar with how Marketing Automation and engagement plans work.

To create a connection:

  1. Create the SFMC centralized data extension in SFMC, if it does not already exist, by running the Setup – SFMC Account Infrastructure pipeline batch in your SFMC tenant. This generates the necessary xConnect data extension template in SFMC.

    Setup - SFMC Account Infrastructure pipeline batch in the content tree
  2. On your Sitecore content management instance, open the <sitename>\App_Config\Sitecore\MarketingAutomation\Sitecore.DataExchange.MarketingAutomation.Client.config file.

  3. In the <tenantServiceConnectionRepository>/<tenantServices> node, add the name of the Tenant Service . For example:

    <dataExchange>
        <tenantServices>
            <marketingAutomation>
                <tenantServiceConnectionRepository type="Sitecore.DataExchange.MarketingAutomation.Activity.Repositories.TenantServiceConnectionRepository, Sitecore.DataExchange.MarketingAutomation.Activity">
                    <tenantServices hint="list:AddService">
                        <tenantService>[tenantservice]</tenantService>
                    </tenantServices>
                </tenantServiceConnectionRepository>
            </marketingAutomation>
        </tenantServices>
    </dataExchange>
  4. On the Sitecore Launchpad, open the Marketing Automation application.

  5. Create a new campaign, or select an existing campaign if you already have one. Configure the start point to trigger the campaign when a customer visits a specific page or when a general PageView event happens. For testing, you can select the Instant demo goal. Click Apply.

  6. From the toolbox, drag and drop a Trigger DEF SFMC Sync Process marketing action to the campaign.

    Trigger DEF SFMC Sync Process button
  7. Click the Trigger DEF SFMC Sync Process action. In the Select a Tenant Service field, select a Tenant Service.

    Note

    You can configure the list of available Tenant Services in the <sitename>\App_Config\Sitecore\MarketingAutomation\Sitecore.DataExchange.MarketingAutomation.Client.config configuration file.

  8. Click Apply.

To synchronize contacts to the SFMC centralized data extension:

  1. Select the Trigger DEF SFMC Sync Process action in the campaign. Clear the API Event check box.

    Set up a Trigger DEF SFMC Sync Process
  2. Click Apply.

  3. Save the campaign and Activate it.

  4. To activate the campaign, click the Play icon.

    Activating a campaign

To test the synchronization:

  1. Click the Down arrow icon. Click Enroll contacts from list.

    Enroll contacts from list option
  2. Select the contact list that you want to synchronize to SFMC and click OK.

    Select a contact list to synchronize
  3. Log in to your SFMC website portal.

  4. Navigate to the centralized data extension at \Audience Builder\Contact Builder\Data Extensions\Sitecore\xDB Contact, and confirm that the synchronization has updated the contacts.

Before you can configure the synchronization process from Sitecore Marketing Automation to Salesforce Marketing Cloud (SFMC) Journey, you must create a journey in SFMC using Journey Builder. Set the entry source for the journey as an API event.

Sitecore synchronizes contacts with the Xconnect contact template fields format. When you create a journey in SFMC with the entry source as an API event, you must have a data extension where you can design the data extension yourself. You must include contactKey in your data extension. If contactKey is not included, SFMC raises an error.

Note

When you create the journey in SFMC, you must use a different data extension from the xDB contact, or create a new one.

To synchronize contact data to the SFMC centralized data extension and API event data extension via a journey:

  1. In the Sitecore Marketing Automation action, add a Trigger DEF SFMC Sync Process action into a plan, select the API Event check box and, in the drop-down list, select the API event of the journey that you want to trigger.

    Selecting an API event for the Trigger DEF SFMC Sync Process.

    Note

    The list of API events is retrieved from SFMC Journey Builder, Activity Name.

  2. Click Apply.

  3. Save the campaign and click Activate the current campaign (activate_the_current_campaign.png) to activate it.

    Activating a campaign

To test the synchronization:

  1. Click Drop-down (campaign_drop-down_button.png) and select Enroll contacts from list.

    Enroll contacts from list option
  2. In the Select list dialog box, select the contact list that you want to synchronize to SFMC, and click OK.

    Select a contact list to synchronize.

    Note

    The contacts are synchronized to both the SFMC centralized data extension and the selected SFMC journey data extension.

  3. Log in to your SFMC website portal.

  4. Navigate to the centralized data extension, \Audience Builder\Contact Builder\Data Extensions\Sitecore\xDB Contact.

    Note

    There can be duplicate Activity Names in SFMC. So if you have duplicate names, they are also included in the list.