Salesforce Marketing Cloud (Actions) Destination

Destination Info

Additional versions of this destination are available

This page is about the Salesforce Marketing Cloud (Actions) Destination. See below for information about other versions of the Salesforce destination:

Salesforce Marketing Cloud (SFMC) provides digital marketing automation and analytics software and services. Marketers can use this software to create sophisticated multi-channel campaigns using the SFMC Journey Builder.

Segment’s Salesforce Marketing Cloud (Actions) destination allows you to create contacts, store contact and event data in data extensions, and send API events to SFMC. Segment sends data to the SFMC REST API.

Benefits of Salesforce Marketing Cloud (Actions) Destination vs Salesforce Marketing Cloud Destination Classic

The Salesforce Marketing Cloud (Actions) destination provides the following benefits over the classic Salesforce Marketing Cloud destination:

  • Fewer settings. Data mapping for actions-based destinations happens during configuration, which eliminates the need for most settings.
  • Clearer mapping of data. Actions-based destinations enable you to define the mapping between the data Segment receives from your source, and the data Segment sends to SFMC.
  • Batch support. Reduce SFMC overages and rate-limit errors by batching your Segment data to data extensions.
  • Flexible primary keys. Customize the primary keys used to send data to an SFMC data extension and choose any custom property or trait to map to the primary key.
  • API upgrade. Data is sent to the SFMC REST API, which Salesforce recommends over the SFMC SOAP API.

Getting started

Grant Segment API access to Salesforce Marketing Cloud

  1. Log in to your Salesforce Marketing Cloud account and go to the Setup settings.
  2. Under Platform Tools, expand Apps and select Installed Packages.
  3. Click New to create a new package. For clarity, Segment recommends using a name like “Segment”.
  4. Click Add Component and select API Integration.
  5. Select the Server-to-Server Integration Type.
  6. Enable the following permissions. If you don’t add these permissions, you’ll see an Insufficient Privileges error from SFMC.
    • Email: Read, Write
    • Web: Read, Write
    • Automations: Read, Write, Execute
    • Journeys: Read
    • List And Subscribers: Read, Write
    • Data Extensions: Read, Write
    • Tracking Events: Read
    • Webhooks: Read, Write
  7. Click Save.

Once you save the API integration and add permissions, you will see a Summary page with a Components section. This section will be used to obtain your Client ID, Client Secret, and Subdomain.

Connect the Salesforce Marketing Cloud (Actions) destination

  1. From the Segment web app, click Catalog, then click Destinations.
  2. Search for Salesforce Marketing Cloud (Actions) in the Destinations Catalog, and select the destination.
  3. Click Configure Salesforce Marketing Cloud (Actions) in the top-right corner of the screen.
  4. Select the source that will send data to SFMC and follow the steps to name your destination.
  5. On the Settings tab, input your SFMC Account ID (MID). In the Installed Package you created above, locate your Subdomain, Client ID, and Client Secret and input these settings. Your Subdomain can be found under “REST Base URI.” Your Subdomain should be a 28-character string starting with the letters mc. Do not include the .rest.marketingcloudapis.com part of the URL.
  6. Follow the steps in the Destinations Actions documentation on Customizing mappings.
  7. Enable the destination and configured mappings.

Destination Settings

Setting Description
Account ID Required.

Your Salesforce Marketing Cloud account identifier (or MID). See more information on how to find your MID here.

Client ID Required.

Your Salesforce Marketing Cloud client ID. The client ID is issued when you create an API integration in Installed Packages.

Client Secret Required.

Your Salesforce Marketing Cloud client secret. The client secret is issued when you create an API integration in Installed Packages.

Subdomain Required.

The unique subdomain Salesforce Marketing Cloud assigned to your account. Subdomains are tenant specific and should be a 28-character string starting with the letters “mc”. Do not include the .rest.marketingcloudapis.com part of your subdomain URL. See more information on how to find your subdomain here.

Available Actions

Build your own Mappings. Combine supported triggers with the following Salesforce Marketing Cloud-supported actions:

Mapping limits per destination

Individual destination instances have support a maximum of 50 mappings.

Create Contact

Create contacts in Salesforce Marketing Cloud.

Create Contact is a Cloud action. The default Trigger is: type = "identify"

Click to show / hide fields

Field Description
Contact Key* Type: STRING

The unique identifier that you assign to a contact. This will be used to create a contact if one does not already exist with this Contact Key.

Send API Event

Send events into an existing Event Definition in Salesforce Marketing Cloud.

Send API Event is a Cloud action.

Click to show / hide fields

Field Description
Event Definition Key* Type: STRING

The unique key for an event definition in Salesforce Marketing Cloud. The event defintion must be predefined in SFMC.

Contact Key* Type: STRING

The unique identifier that identifies a subscriber or a contact.

Event Data Type: OBJECT

The properties of the event. Fields must be created in the event definition schema before sending data for it. On the left-hand side, input the SFMC field name exactly how it appears in the event definition schema. On the right-hand side, map the Segment field that contains the corresponding value.

Send Event to Data Extension

Upsert events as rows into an existing data extension in Salesforce Marketing Cloud.

Send Event to Data Extension is a Cloud action.

Click to show / hide fields

Field Description
Data Extension Key Type: STRING

The external key of the data extension that you want to store information in. The data extension must be predefined in SFMC. The external key is required if a Data Extension ID is not provided.

Data Extension ID Type: STRING

The ID of the data extension that you want to store information in. The data extension must be predefined in SFMC. The ID is required if a Data Extension Key is not provided.

Data Extension Primary Keys* Type: OBJECT

The primary key(s) that uniquely identify a row in the data extension. On the left-hand side, input the SFMC key name. On the right-hand side, map the Segment field that contains the corresponding value. When multiple primary keys are provided, SFMC will update an existing row if all primary keys match, otherwise a new row will be created

Data Extension Fields* Type: OBJECT

The fields in the data extension that contain data about an event, such as Product Name, Revenue, Event Time, etc. Fields must be created in the data extension before sending data for it. On the left-hand side, input the SFMC field name exactly how it appears in the data extension. On the right-hand side, map the Segment field that contains the corresponding value.

Batch data to SFMC Type: BOOLEAN

If true, data is batched before sending to the SFMC Data Extension.

Send Contact to Data Extension

Upsert contact data as rows into an existing data extension in Salesforce Marketing Cloud.

Send Contact to Data Extension is a Cloud action. The default Trigger is: type = "identify"

Click to show / hide fields

Field Description
Data Extension Key Type: STRING

The external key of the data extension that you want to store information in. The data extension must be predefined in SFMC. The external key is required if a Data Extension ID is not provided.

Data Extension ID Type: STRING

The ID of the data extension that you want to store information in. The data extension must be predefined in SFMC. The ID is required if a Data Extension Key is not provided.

Data Extension Primary Keys* Type: OBJECT

The primary key(s) that uniquely identify a row in the data extension. On the left-hand side, input the SFMC key name. On the right-hand side, map the Segment field that contains the corresponding value. When multiple primary keys are provided, SFMC will update an existing row if all primary keys match, otherwise a new row will be created

Contact Fields* Type: OBJECT

The fields in the data extension that contain data about a contact, such as Email, Last Name, etc. Fields must be created in the data extension before sending data for it. On the left-hand side, input the SFMC field name exactly how it appears in the data extension. On the right-hand side, map the Segment field that contains the corresponding value.

Batch data to SFMC Type: BOOLEAN

If true, data is batched before sending to the SFMC Data Extension.

Note that send contact to data extension handles a pre-defined structure of contacts being filled into a data extension, whereas send event to data extension action customizes event data extensions. For example, contactKey is the fixed Primary Key that is available when you use send contact to data extension action, which you also have to create as a Primary Key in SFMC. However, the Primary Key can be set as per Segment’s requirements using send event to data extension.

FAQ and troubleshooting

Batching Data to SFMC

If your organization sends a very high volume of data or has Engage audiences with many people in them, Segment allows you to send data to SFMC data extensions in batches. This can help you reduce your SFMC API quota, reduce the number of rate-limit errors you see, and help speed up transfers of large volumes of data.

The batch feature is only compatible with the “Send Contact to Data Extension” and “Send Event to Data Extension” actions. To send data in batches, toggle the “Batch data to SFMC” mapping on.

Data cannot be delivered in batches for “Create Contact” or “Send API Event” actions.

Data Extensions & API Events

To use the SFMC Journey Builder to send marketing campaigns to your users, you need to have data about those users in SFMC. The most common way to send data to SFMC is to send Segment data to an SFMC data extension. Data extensions are tables that contain your data. When you send a contact or event to a data extension, it will appear as a “row” in your data extension. Any metadata about the particular contact or event are considered attributes and will appear as a “column” in your data extension.

Data extensions and attributes must be created before sending data. You can create a data extension in your SFMC account by navigating to Audience Builder > Contact Builder > Data Extensions > Create. Segment recommends creating a single data extension to store all contact data, and individual data extensions for each event type you plan to send. Once a data extension is created, you can add attributes for any traits or properties you plan to send. You must include at least one Primary Key attribute that will be used to uniquely identify each row.

You can include more than one Data Extension Primary Key if needed. For example, you might use more than one primary key if you want to track which store locations a user visited, but you don’t care how many times the users visited each location. In this case, you could use Contact Key and Store Location as Primary Keys. Then, SFMC only deduplicates if both Contact Key (the user) and Store Location are the same. This means you would record the stores individual users visited, but not how many times they visited each one.

API events are another way to send your Segment events to SFMC. API events can trigger an email or push notification campaign immediately when they receive data from Segment. You can create an API event in your SFMC account by navigating to Journey Builder > Events > + New Event > API Event.

Sending Engage Audiences & Computed Traits to SFMC

To send an Engage audience to SFMC:

  1. Create an attribute in the SFMC data extension that stores your contact data. The attribute should be a boolean data type to store whether or not a user entered the audience. You can name this attribute anything.
  2. Set up the Salesforce Marketing Cloud (Actions) destination using the instructions above and connect it to your Engage source.
  3. Create a “Send Contact to Data Extension” action in order to map the SFMC attribute to the Engage audience key. The Engage audience key can be found in Engage > Audiences > Select your audience > Settings > Audience key. In the Contact Fields mapping, input the name of the attribute you created in SFMC on the right-hand side. On the left-hand side, search for an event variable of traits.[your-audience-key] and select “No matches found. Use “traits.[your-audience-key]” as an event variable”.
  4. Navigate back to your Engage audience and connect the Salesforce Marketing Cloud (Actions) destination to the audience. Keep “Send Identify” toggled on and save.

When you add an Engage audience to SFMC, the first sync contains all the users in that audience. Users are added as rows in your data extension with the attribute you created set to true to indicate audience membership. If a user leaves that audience, the attribute value is automatically updated to false, but the user is not removed from the data extension. This allows you to see all users who have ever been in the audience, and then optionally create a filtered data extension if you want a subset of users.

To send an Engage computed trait to SFMC:

  1. Create an attribute in the SFMC data extension that stores your contact data. Choose the data type matching the type of computed trait you plan to send; for example, text for traits which produce string values, number or decimal for traits which produce numeric values. You can name this attribute anything.
  2. Set up the Salesforce Marketing Cloud (Actions) destination using the instructions above and connect it to your Engage source.
  3. Create a “Send Contact to Data Extension” action in order to map the SFMC attribute to the Engage trait key. The Engage trait key can be found in Engage > Audiences > Computed Traits > Choose your computed trait > Settings > Trait key. In the Contact Fields mapping, input the name of the attribute you created in SFMC on the right-hand side. On the left-hand side, search for an event variable of traits.[your-trait-key] and select “No matches found. Use “traits.[your-trait-key]” as an event variable”.
  4. Navigate back to your Engage computed trait and connect the Salesforce Marketing Cloud (Actions) destination to the computed trait. Keep “Send Identify” toggled on and save.

This page was last modified: 14 Aug 2024



Get started with Segment

Segment is the easiest way to integrate your websites & mobile apps data to over 300 analytics and growth tools.
or
Create free account