Data Sources in Marketing Cloud Next
In Marketing Cloud Next, you can use several sources of data to create your messages. Each of these sources operates differently.
Custom data sources are data sources that you create yourself. For more information about creating a data source, see Salesforce Help: Data Source Configuration in Data 360.
| Data Source Type | Description | Limitations |
|---|---|---|
| Profile Data Graph | Data provided from a data graph based on the Unified Individual object. This type of data source is helpful for storing personalization data. | Your account can use only one data graph at a time. |
| Activation | Data provided from an Activation set up in Data 360. This type of data source provides an Activation payload, which can be used for personalization. | A message can use only one event or activation data source at a time. |
| Event | Data provided from an event definition in Marketing Cloud Next. A flow passes event data to the content. Each event has its own schema. | A message can use only one event or activation data source at a time. |
| Apex Class | Data provided from an Apex-defined resource and its schema. | A message can use only one Apex Class data source at a time. |
One of the primary data sources in Marketing Cloud Next is the data graph. For more information, see Understanding Data Graphs in Marketing Cloud Next.
An alternative to building a message by using data from a data graph is to use activation data. Activations occur when a segmentation action occurs in Data 360, which creates an enriched list of recipients for a campaign with nested attributes for each recipient. This example shows an activation payload for a recipient.
You give the activation a name when you create it. This example uses the name NewsletterRecipient. Access the data by using the name that you gave the activation, followed by the path to the data you want to access. For example, to output the recipient's first name, use this code:
The same message can’t have both an activation data source and an event data source.
Events are a type of data source that binds data to an automation event-triggered flow. When you create a data source from the event list, you can select from several built-in and custom event options. Each event has a schema that ties back to the underlying engagement data model object (DMO) that drives the event itself. Similar to an activation, use the name you give the event to reference it in your message template.
The same message can’t have both an activation data source and an event data source.
Apex-defined data sources use an Apex class that represents an incoming JSON payload. This data source defines an incoming JSON structure. See Salesforce Help: Create Apex-Defined Type.
In transactional emails, it’s helpful for the incoming data to be simple and easy to use. You can use an Apex class to define the structure of the JSON payload, as shown in this example.
This class definition produces a JSON payload with a structure that resembles this example.
When you load this data source into a content item, you give it a name, such as Booking. Reference the fields in the payload by using the name that you gave the data source, followed by the path to the data you want to access. For example, to output the recipient’s first name, use this code:
Marketing Cloud Next includes a few built-in data sources, which have specific reserved names.
| Data Source | Description |
|---|---|
{!$organization.Address} | The physical address of the organization that is sending the email. |
{!$link.EmailAddressOptOutUrl} | The URL for the recipient to unsubscribe from the email. |
{!$link.PreferenceCenterUrl} | The URL for the recipient to manage their email preferences. |
You can connect several other data sources to your content. For more information about other data sources, see Salesforce Help: Data Sources in Marketing Cloud Next.