---
schema_version: "1"
id: 4708b4a46a867d1357c048e2b973e31ae911d8d4b6cffbef05966fad6df74840
title: Understanding Data Graphs in Marketing Cloud Next
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/marketing-cloud/handlebars/guide/mcn-handlebars-guide-data-graph-understanding.md
canonical_url: https://developer.salesforce.com/docs/marketing/handlebars-for-marketing-cloud-next/guide/mcn-handlebars-guide-data-graph-understanding.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: bc79b738718cb67e923ffee83f7f7b165fb4c596634c4690a03ab25c4e2d560c
products:
  - Handlebars for Marketing Cloud Next
  - Marketing Cloud
---
# 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.

## Working with Data from a Data Graph

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.

```
{{@root.$dataGraph}}
```

**note:** `$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](https://help.salesforce.com/s/articleView?id=mktg.mktg_data_graph_setup.htm).

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.

```json
{
  "ssot__Id__c": "7471ce0c3b44998ffb8342eabdf2c02b",
  "ssot__FirstName__c": "Erica",
  "ssot__LastName__c": "Douglass",
  "ssot__PersonName__c": "Erica Douglass",
  "ssot__ResidenceCountryName__c": "",
  "ssot__TitleName__c": "",
  "IndividualIdentityLink__dlm": [
    {
      "SourceRecordId__c": "003Ws00000QxpYzIAJ",
      "UnifiedRecordId__c": "7471ce0c3b44998ffb8342eabdf2c02b",
      "ssot__DataSourceId__c": "Salesforce_Home",
      "ssot__DataSourceObjectId__c": "Contact",
      "ssot__Individual__dlm": [
        {
          "ssot__FirstName__c": "Erica",
          "ssot__Id__c": "003Ws00000QxpYzIAJ",
          "ssot__LastName__c": "Douglass",
          "ssot__PersonName__c": "Erica Douglass",
          "ssot__TitleName__c": "",
          "BookStoreProfile__dlm": [
            {
              "FavoriteGenre__c": "Fantasy",
              "LastVisitedStoreId__c": "2121",
              "LoyaltyTier__c": "Bronze",
              "MemberId__c": "003Ws00000QxpYzIAJ",
              "RewardPoints__c": 80,
              "BookStore__dlm": [
                {
                  "StoreAddress__c": "331 Town Square Drive, Decatur GA, 30012",
                  "StoreHoursDays__c": "Mon - Sun",
                  "StoreHoursTime__c": "8am - 8pm",
                  "StoreId__c": "2121",
                  "StoreName__c": "RL at Town Square",
                  "BookStoreEvent__dlm": [
                    {
                      "EventDate__c": "2026-07-22T20:00:00.000Z",
                      "EventDescription__c": "Guest visit from an author",
                      "EventName__c": "Monthly Author Visit",
                      "StoreEventId__c": "6",
                      "StoreId__c": "2121"
                    },
                    {
                      "EventDate__c": "2026-07-20T19:00:00.000Z",
                      "EventDescription__c": "Lively storytelling for the little ones!",
                      "EventName__c": "Weekly Storytime",
                      "StoreEventId__c": "5",
                      "StoreId__c": "2121"
                    },
                    {
                      "EventDate__c": "2026-07-15T20:00:00.000Z",
                      "EventDescription__c": "Monthly book club for young adults",
                      "EventName__c": "Young Adult Book Club",
                      "StoreEventId__c": "4",
                      "StoreId__c": "2121"
                    }
                  ]
                }
              ]
            }
          ]
        }
      ]
    }
  ]
}
```

## Traversing Data in the Data Graph

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:

```
{{@root.$dataGraph.ssot__FirstName__c}}
```

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:

```
{{@root.$dataGraph.IndividualIdentityLink__dlm.[0].ssot__Individual__dlm.[0]}}
```

This code returns only the specified array.

```json
[
  {
    "ssot__FirstName__c": "Erica",
    "ssot__Id__c": "003Ws00000QxpYzIAJ",
    "ssot__LastName__c": "Douglass",
    "ssot__PersonName__c": "Erica Douglass",
    "ssot__TitleName__c": "",
    "BookStoreProfile__dlm": [
      {
        "FavoriteGenre__c": "Fantasy",
        "LastVisitedStoreId__c": "2121",
        "LoyaltyTier__c": "Bronze",
        "MemberId__c": "003Ws00000QxpYzIAJ",
        "RewardPoints__c": 80,
        "BookStore__dlm": [
          {
            "StoreAddress__c": "331 Town Square Drive, Decatur GA, 30012",
            "StoreHoursDays__c": "Mon - Sun",
            "StoreHoursTime__c": "8am - 8pm",
            "StoreId__c": "2121",
            "StoreName__c": "RL at Town Square",
            "BookStoreEvent__dlm": [
              {
                "EventDate__c": "2026-07-22T20:00:00.000Z",
                "EventDescription__c": "Guest visit from an author",
                "EventName__c": "Monthly Author Visit",
                "StoreEventId__c": "6",
                "StoreId__c": "2121"
              },
              {
                "EventDate__c": "2026-07-20T19:00:00.000Z",
                "EventDescription__c": "Lively storytelling for the little ones!",
                "EventName__c": "Weekly Storytime",
                "StoreEventId__c": "5",
                "StoreId__c": "2121"
              },
              {
                "EventDate__c": "2026-07-15T20:00:00.000Z",
                "EventDescription__c": "Monthly book club for young adults",
                "EventName__c": "Young Adult Book Club",
                "StoreEventId__c": "4",
                "StoreId__c": "2121"
              }
            ]
          }
        ]
      }
    ]
  }
]
```
