xdm

The xdm object contains the data payload sent to Adobe. Fields set within this object map directly to elements defined in the dataset’s schema.

Adobe Experience Platform uses schemas to describe the structure of data in a consistent and reusable way. By defining data consistently across systems, it becomes easier to retain meaning and, therefore, gain value from data.

Set the xdm object when running the sendEvent command. Make sure that the hierarchy in this object matches the schema for the configured dataset. You can include both the xdm object and the data object in the same sendEvent command.

alloy("sendEvent", {
  "xdm": adobeDataLayer.getState(reference)
});

The following example uses the Commerce Details schema field group:

alloy("sendEvent",{
  "xdm":{
    "commerce":{
      "productViews":{
        "value":1
      }
    },
    "productListItems":[
      {
        "SKU":"HT105",
        "name":"Large field hat",
      },
      {
        "SKU":"HT104",
        "name":"Small field hat",
      }
    ]
  }
});

Use the xdm object using the Web SDK tag extension

The xdm object is available as either a Variable data element or XDM object data element when using the Web SDK tag extension. Adobe recommends using a variable data element in most cases.

recommendation-more-help
1ae86b30-e55e-49c1-ab11-9d0356a5f3e1