Salesforce Marketing Cloud (Actions) Destination
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.
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.
- Log in to your Salesforce Marketing Cloud account and go to the Setup settings.
- Under Platform Tools, expand Apps and select Installed Packages.
- Click New to create a new package. For clarity, Segment recommends using a name like "Segment".
- Click Add Component and select API Integration.
- Select the Server-to-Server Integration Type.
- 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
- Email:
- 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.
- From the Segment web app, click Catalog, then click Destinations.
- Search for Salesforce Marketing Cloud (Actions) in the Destinations Catalog, and select the destination.
- Click Configure Salesforce Marketing Cloud (Actions) in the top-right corner of the screen.
- Select the source that will send data to SFMC and follow the steps to name your destination.
- 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.compart of the URL. - Go to the Mappings tab and selelct + New Mapping.
- Follow the mapping setup flow to create your mappings.
- If you select one of the V2 actions involving data extensions, you can create a new data extension or connect to an existing one within Segment.
- (Optional) Follow the steps in the Destinations Actions documentation on customizing mappings to customize your mappings.
- Enable the destination and configured mappings.
Your Salesforce Marketing Cloud account identifier (or MID). See more information on how to find your MID here.
Your Salesforce Marketing Cloud client ID. The client ID is issued when you create an API integration in Installed Packages.
Your Salesforce Marketing Cloud client secret. The client secret is issued when you create an API integration in Installed Packages.
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.
Build your own Mappings. Combine supported triggers with the following Salesforce Marketing Cloud-supported actions:
Mapping limits per destination
Create contacts in Salesforce Marketing Cloud.
Create Contact is a Cloud action. The default Trigger is type = "identify"
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 events into an existing Event Definition in Salesforce Marketing Cloud.
Send API Event is a Cloud action.
The unique key for an event definition in Salesforce Marketing Cloud. The event defintion must be predefined in SFMC.
The unique identifier that identifies a subscriber or a contact.
Optional
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.
Upsert events as rows into an existing data extension in Salesforce Marketing Cloud.
Send Event to Data Extension is a Cloud action.
Optional
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.
Optional
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.
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
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.
Optional
If true, data is batched before sending to the SFMC 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"
Optional
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.
Optional
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.
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
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.
Optional
If true, data is batched before sending to the SFMC Data Extension.
Upsert events as rows into a data extension in Salesforce Marketing Cloud.
Send Event to Data Extension (V2) is a Cloud action.
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
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.
Optional
If true, data is batched before sending to the SFMC Data Extension.
Whether to create a new data extension or select an existing one for data delivery.
Optional
The identifier for the data extension.
Optional
The identifier for the folder that contains the data extension.
Optional
The name of the data extension.
Optional
The description of the data extension.
Optional
Indicates whether the custom object can be used to send messages. If the value of this property is true, then the custom object is sendable
Optional
The field on this data extension which is sendable. This must be a field that is present on this data extension.
Optional
The relationship with "Subscribers" for the Sendable Custom Object Field.
Optional
A list of fields to create in the data extension.
Optional
Connect to an existing data extension or create a new one in Salesforce Marketing Cloud.
Whether to create a new data extension or select an existing one for data delivery.
Optional
The identifier for the data extension.
Optional
The identifier for the folder that contains the data extension.
Optional
The name of the data extension.
Optional
The description of the data extension.
Optional
Indicates whether the custom object can be used to send messages. If the value of this property is true, then the custom object is sendable
Optional
The field on this data extension which is sendable. This must be a field that is present on this data extension.
Optional
The relationship with "Subscribers" for the Sendable Custom Object Field.
Optional
A list of fields to create in the data extension.
Optional
Connect to an existing data extension or create a new one in Salesforce Marketing Cloud.
Upsert contact data as rows into a data extension in Salesforce Marketing Cloud.
Send Contact to Data Extension (V2) is a Cloud action. The default Trigger is type = "identify"
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
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.
Optional
If true, data is batched before sending to the SFMC Data Extension.
Whether to create a new data extension or select an existing one for data delivery.
Optional
The identifier for the data extension.
Optional
The identifier for the folder that contains the data extension.
Optional
The name of the data extension.
Optional
The description of the data extension.
Optional
Indicates whether the custom object can be used to send messages. If the value of this property is true, then the custom object is sendable
Optional
The field on this data extension which is sendable. This must be a field that is present on this data extension.
Optional
The relationship with "Subscribers" for the Sendable Custom Object Field.
Optional
A list of fields to create in the data extension.
Optional
Connect to an existing data extension or create a new one in Salesforce Marketing Cloud.
Whether to create a new data extension or select an existing one for data delivery.
Optional
The identifier for the data extension.
Optional
The identifier for the folder that contains the data extension.
Optional
The name of the data extension.
Optional
The description of the data extension.
Optional
Indicates whether the custom object can be used to send messages. If the value of this property is true, then the custom object is sendable
Optional
The field on this data extension which is sendable. This must be a field that is present on this data extension.
Optional
The relationship with "Subscribers" for the Sendable Custom Object Field.
Optional
A list of fields to create in the data extension.
Optional
Connect to an existing data extension or create a new one in Salesforce Marketing Cloud.
Info
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.
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.
Info
Data cannot be delivered in batches for "Create Contact" or "Send API Event" actions.
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.
If you're using an action that isn't labeled with (V2), 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.
Info
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.
If you select an action labeled with (V2), you can create new data extensions directly within Segment. You can define a name, folder, description, and customize your fields by setting the type, length, nullable, and primary key options. You can also search and select existing data extensions by searching for the ID within Segment to map fields more seamlessly.
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.
To send an Engage audience to SFMC:
- 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.
- Set up the Salesforce Marketing Cloud (Actions) destination using the instructions above and connect it to your Engage source.
- 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". - 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:
- 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.
- Set up the Salesforce Marketing Cloud (Actions) destination using the instructions above and connect it to your Engage source.
- 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". - 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.