Expand my Community achievements bar.

Edge Data Collection Concepts: Creating a Schema

Avatar

Employee

1/16/25

In our last Edge Data Collection Concepts blog, we introduced the basics of an Experience Data Model (XDM) schema. Recall that the schema is the foundational structure of Adobe Experience Platform (AEP) data collection made up of field groups that label the data being collected. The schema class, on the other hand, is a way to define the characteristics of the schema, such as whether it represents a profile or an event. In this post, we’ll take a deeper dive into schema creation and best practices that you can follow as you create your first schema. 

Why do I need a schema? 

You need a schema whenever you want to send data to AEP. For example, if you want to create audiences in Real-Time CDP (RTCDP) or execute campaigns in Adobe Journey Optimizer (AJO), that requires datasets in AEP that are structured using schemas. Schemas are a tool to support consistent data collection across sources with proper data types. 

When You Don’t Need a Schema 

While schemas are essential to send data to AEP, you do not need a schema if you are using Edge Data Collection to send data to Adobe Analytics, Target, or Audience Manager. These services can read values from the data object variable rather than relying on XDM. Using the data object variable for Experience Cloud solutions also prevents unnecessary data from being sent to AEP. 

Before You Start 

Before creating your schema, define your use cases and data requirements:  

  • What data do you need to collect?  
  • What actions do you need to record?  
  • What identities will you track?  
  • Where will the data come from?  

Gathering all your data requirements ahead of time will be critical for your schema creation.  

Choosing a Schema Class

The first component of schema creation is choosing a class. This decision depends on your use cases:  

  • Individual Profile: The Individual Profile class allows you to define attributes about individuals to build a profile. However, this class type is virtually never used for Web SDK and is typically reserved for Adobe Journey Optimizer use cases. 
  • ExperienceEvent class: As discussed in our previous blog, the ExperienceEvent class is used for capturing user interactions. Examples include website or app activity (e.g. page views, form submissions), commerce events (e.g. product list adds, purchases), or other time-stamped events.  

Adding Field Groups 

Schema fields are the labels we use for data collection, and field groups are a way to organize those fields into meaningful categories. For example, if you need to collect data about commerce interactions, you can add the “Commerce Details” field group to your schema which contains relevant fields to capture event types such as productListAdds and purchases, as well as product information.  

To keep your schema clean and efficient, add only the field groups necessary for your data collection requirements. For example, some ExperienceEvent field group templates will add several objects that may not be relevant to your use cases. Instead, carefully review the predefined field groups and select only those that support your requirements. 

If you find that your data requirements don’t fit or need modifications to the predefined field groups, you can create your own field groups and fields. To create a new field group, add a new field group and then choose to create a new field group rather than using an existing one. Create fields by clicking the “+” symbol next to your schema name, adding fields under your tenant ID. Define the field details including name and type and assign it to either your new field group or add it to an existing one.  

amandadeasy_0-1737036387130.png

Predefined or Custom Field Groups?  

In most cases, the predefined field groups paired with custom field groups under your tenant namespace is the preferred approach. This balances the predefined fields with the flexibility of custom fields in an organized manner. However, if your schema is complex and requires significant modifications to the predefined field groups, it's best to use a single custom namespace with custom field groups. Even in this scenario, you may still want to leverage predefined field groups for basic data collection such as web, productListItems, and commerce field groups.  

Additional Tips 

When creating your schema, consider these additional tips:  

  • Field Naming Conventions: Use clear and consistent naming conventions for custom fields. 
  • Field Data Type: Double-check data types (e.g., string, integer, boolean) to ensure compatibility with your data sources. Incorrect data types can cause data errors in AEP.  
  • Schema Updates: Avoid frequent changes to your schema to avoid disrupting existing datasets. While you can always add to your schema, once it's been enabled for profile, you cannot remove fields.  
  • Identity Setup: If your schema includes identities (e.g., a CRM ID), ensure they are flagged as an identity in your schema and mapped to Identity Service for profile stitching.  

Conclusion 

Creating an effective XDM schema is a critical step for leveraging AEP. By defining your requirements, choosing the right schema class, and adding the relevant field groups, you can ensure your schema supports your use cases while remaining clean and manageable. With these best practices, your schema will serve as a strong foundation for AEP data collection.  

 

Resources:  

XDM System Overview 

Basics of schema composition