Send your event data from RudderStack to Salesforce Marketing Cloud.
Salesforce Marketing Cloud is a digital marketing automation and analytics tool. It allows you to understand your customers better, and design personalized digital marketing campaigns to engage them throughout their product journey.
RudderStack allows you to integrate your source to Salesforce Marketing Cloud and send data to Salesforce Marketing Data Extensions.
Give a name to the destination and click Next. You should then see the following screen:
Map events to External Key: This setting is for mapping track events to a certain Data Extension in Salesforce Marketing Cloud. For the “Event Name” field, enter the name of the event that you want to send to Salesforce Marketing Cloud. Then, for the “External Key” field, enter the Data Extension’s External Key that you would like to route the event data to. Click “Add More” and repeat for all track events you would like to send to SFMC.
If you do not map an event to an External Key and it gets sent to SFMC, you may receive a message saying "Event not mapped for this track call"
You can find the external key in the SFMC interface by going to Data & Analytics and navigating to Contact Builder - Data Extensions. The extension’s name can be found in the External Key column.
Map events to Primary Key: For all events going to a Data Extension, there needs to be a Primary Key. By default, if you do not use this setting, RudderStack will create a Primary Key called Contact Key and assign it to the userId of the event. If no userId is present, then it will be assigned to the email. Use this setting if you would like to map your own Primary Key. In the “Event Name” field, indicate the name of the event you would like to choose your own Primary Key for. Then choose what key from the event payload you would like to act as the Primary Key. The key should be present in your event.properties and ensure that it is set as a Primary Key in your SFMC Data Extension. You can add multiple primary keys by separating them with commas.
Event Name to UUID: This setting is for assigning a UUID as a Primary Key for a specified event. If an event name is given in the “Event Name” field and the toggle is turned on, RudderStack will generate a UUID and pass it through to SFMC as the value for a Primary Key called Uuid for the given event. Using this setting will override any action taken for the Map events to Primary Key section above, for the specified event.
Creating Data Extensions in SFMC
We recommend creating a Data Extension in SFMC to store the identify and track calls coming from RudderStack. For each trait (in case of identify calls) or properties (in case of track calls) that you want to send to Salesforce Marketing Cloud, you should create an attribute on the Data Extension in the interface.
In SFMC, keys that are not present in the selected data extension are ignored, so those attributes must be created before you send them to SFMC. If you send a trait/property "phone": "99999" with your data, but there’s no matching phone column in SFMC’s table, that trait or property will be ignored. All of the traits/properties in an identify or track call are not needed to be created as attributes in data extensions only the required ones should be created.
All attributes in the Data Extension should be created in title case, regardless of the casing used in your RudderStack identify or track calls. When RudderStack sends these calls to SFMC, they are first transformed into title case.
A Primary Key for the Identify Data Extension called Contact Key is required to be created. RudderStack will use this to link the users to SFMC’s built-in Contact Key key. This field will be populated with userId or email by default during the identify calls.
For setting up Primary Keys in Track calls, you can set up different primary keys for various events. If no primary key is set, the default primary key will be Contact Key. You can specify multiple, comma-separated primary keys if you have multiple primary keys in your data extension.
When creating data extensions, the Is Sendable box should be checked if you want to send emails or push notifications based on this data. If this data is used to send emails, email attributes will be set, which will be called EmailAddress. Copy the External Key for the particular Data Extension, which you will set in the destination setting of RudderStack.
Here is an example of a Data Extension for an identify call that will store email, first name, and last name, and phone traits.
The following code snippet demonstrates a sample identify call in RudderStack:
Enter your external key and the primary key against each event. If no primary key is set, the default value of the Contact Key is taken. Multiple primary keys can be set by separating them with commas.
You can also turn on UUID for particular events. If it is on, you can set UUID as a primary key in your data extensions. The messageId is then set as the UUID.
Data Formatting and Mapping
The RudderStack SDKs and libraries will automatically collect context properties which can be passed as properties in SFMC as attributes for the data extension. To use context properties, the attributes in the Data Extensions with specific naming conventions should be set.
The table below lists the RudderStack context properties available for SFMC and the Data Extension attribute names that they map to.
Note that camel cases and snake cases will be formatted to title cases.
cookies, the cookies that are categorized as necessary are stored on your browser as they are as
for the working of basic functionalities of the website. We also use third-party cookies that
analyze and understand how you use this website. These cookies will be stored in your browser
consent. You also have the option to opt-out of these cookies. But opting out of some of these
have an effect on your browsing experience.
Necessary cookies are absolutely essential for the website to function properly. This
category only includes cookies that ensures basic functionalities and security
features of the website. These cookies do not store any personal information.
learn more about cookies and why we use them, visit our cookie
policy. We'll assume you're ok with this, but you can opt-out if you wish Cookie Settings.