Understanding Data Graphs in Marketing Cloud Next
Marketing Cloud Next is tightly integrated with Data 360. The data that you bring into Marketing Cloud Next is augmented with additional metadata and harmonized with data from other sources.
This tight integration gives your marketing team deep insights into all of your data. As a result, the data that powers Marketing Cloud Next is often contained in complex, deeply nested data objects.
A data object provided by Data 360 has a complex structure. This data is stored in an entity called a data graph, which defines the ways that different data objects relate to each other. Data 360 uses data graphs to turn disconnected sets of data into a detailed customer view.
You can return the complete data graph by specifying the @root keyword and the $dataGraph variable in your Handlebars code.
$dataGraph is a special variable that refers to the profile data graph that content is loaded with by default in Marketing Cloud Next. The data graph that’s loaded is based on the configuration of your Marketing Cloud Next account or business unit. You can change the selected data graph in Setup. See Salesforce Help: Set Up Personalization Features in Marketing Cloud Next.
This Handlebars string returns a JSON object. The object that’s returned varies depending on the data objects in your account, but this example shows the general structure of this type of object.
The nested structure of the data in your data graph means that you often have to traverse a few levels to access the information that you want to use in your message template. For example, to retrieve the customer’s first name from this data structure, use this Handlebars code:
This code returns Erica, which is the value of the ssot__FirstName__c field from the top-level object in the data graph.
Handlebars can also return objects. For example, this code retrieves the content of the first item in the ssot__Individual__dlm array:
This code returns only the specified array.