Create an XDM schema
Learn how to create an XDM schema for mobile app events.
Standardization and interoperability are key concepts behind Adobe Experience Platform. Experience Data Model (XDM), driven by Adobe, is an effort to standardize customer experience data and define schemas for customer experience management.
What are XDM schemas?
XDM is a publicly documented specification designed to improve the power of digital experiences. It provides common structures and definitions that allow any application to communicate with Platform services. By adhering to XDM standards, all customer experience data can be incorporated into a common representation that can deliver insights in a faster, more integrated way. You gain valuable insights from customer actions, define customer audiences through segments, and use customer attributes for personalization purposes.
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.
Before data can be ingested into Platform, a schema must be composed to describe the data’s structure and provide constraints to the type of data that can be contained within each field. Schemas consist of a base class and zero or more schema field groups.
For more information on the schema composition model, including design principles, and best practices, see the basics of schema composition or the course Model Your Customer Experience Data with XDM.
Prerequisites
To complete the lesson, you must have permission to create an Experience Platform schema.
Learning objectives
In this lesson, you will:
- Create a schema in the Data Collection interface
- Add a standard field group to the schema
- Create and add a custom field group to the schema
Navigate to schemas
-
Log in to the Adobe Experience Cloud.
-
Make sure you are in the Experience Platform sandbox you are using for this tutorial.
-
Open the app switcher (at the top right),
-
Select Data Collection from the menu.
note note NOTE Customers of Platform-based applications like Real-Time CDP should use a development sandbox for this tutorial. Other customers use the default production sandbox. -
Select Schemas under Data Management in the left rail.
You are now on the main schemas page and are presented with a list of any existing schemas. You can also see tabs corresponding to the core building blocks of a schema:
- Field groups are reusable components that define one or more fields to capture specific data, such as personal details, hotel preferences, or address.
- Classes define the behavioral aspects of the data that the schema contains. For example:
XDM ExperienceEvent
captures time-series, event data andXDM Individual Profile
captures attribute data about an individual. - Data types are used as reference field types in classes or field groups in the same way as basic literal fields.
The above descriptions are a high-level overview. For more details, see the Schema building blocks video or read Basics of schema composition in the product documentation.
In this tutorial, you use the Consumer Experience Event field group and create a custom one to demonstrate the process.
Luma app schema architecture
In a real-world scenario, the schema design process might look like this:
- Gather business requirements.
- Find prebuilt field groups to cover as many requirements as possible.
- Create custom field groups for any gaps.
For learning purposes, you use prebuilt and custom field groups.
- Consumer Experience Event: Prebuilt field group that has many common fields.
- App Information: Custom field group designed to mimic TrackState/TrackAction Analytics concepts.
Create a schema
-
Select Create Schema.
-
In the Select a class step of the Create schema wizard, select Experience Event underneath Select a base class for this schema.
-
Select Next.
-
In the Name and review step of the Create schema wizard, enter a Schema display name, for example
Luma Mobile Event Schema
and a Description, for exampleSchema for Luma mobile app experience events
.note note NOTE If you are going through this tutorial with multiple persons on a single sandbox or you are using a shared account, consider appending or prepending an identification as part of your naming conventions. For example, instead of Luma Mobile App Event Schema
, useLuma Mobile App Event Schema - Joe Smith
. See also the note in Overview. -
Select Finish to finish the wizard.
-
Select Add next to Field groups.
-
Search for
Consumer Experience Event
. -
Select to preview the fields and/or read the description for more details before selecting a field group.
-
Select Consumer Experience Event.
-
Select Add field groups.
You are brought back to the main schema composition screen where you can see all the available fields.
-
Select Save.
The Consumer Experience Event field group has a data type called Web information, which describes events like page view and link clicks. At the time of writing, there isn’t a mobile app parity to this feature, so you are going to create your own.
Create a custom data type
You begin by creating a custom data type describing the two events:
- Screen view
- App interaction
-
Select the Data types tab.
-
Select Create data type.
-
Provide a Display name and Description, for example
App Information
andCustom data type describing "Screen Views" & "App Actions"
note tip TIP Always use readable, descriptive display names for your custom fields, as this practice makes them more accessible to marketers when the fields surface in downstream services like the segment builder. -
To add a field, select the button.
-
This field is a container object for app interaction, so provide a camel-case Field name
appInteraction
, Display nameApp Interaction
, and selectObject
from the Type list. -
Select Apply.
-
To measure how often an action has occurred, add a field by selecting the button next to the appInteraction object you created.
-
Give it a camel-case Field name
appAction
, Display name ofApp Action
and TypeMeasure
.This step would be the equivalent of a success event in Adobe Analytics.
-
Select Apply.
-
Add a field describing the type of interaction by selecting the button next to the appInteraction object.
-
Give it a Field name
name
, Display name ofName
and TypeString
.This step is the equivalent of a dimension in Adobe Analytics.
-
Scroll to the bottom of the right rail and select Apply.
-
To create an
appStateDetails
object containing a Measure field calledscreenView
and two String fields calledscreenName
andscreenType
, follow the same steps as you did when creating the appInteraction object. -
Select Save.
Add a custom field group
Now add a custom field group using your custom data type:
-
Open the schema that you created earlier in this lesson.
-
Select Add next to Field groups.
-
Select Create new field group.
-
Provide a Display name and Description, for example,
App Interactions
andFields for app interactions
. -
Select Add field groups.
-
From the main composition screen, select App Interactions.
-
Add a field to the root of the schema by selecting the button next to the schema name.
-
In the right rail, provide a Field name of
appInformation
, a Display name ofApp Information
, and a Type ofApp Information
. -
Select App Interactions from the Field Group drop down, to assign the fields to your new field group.
-
Select Apply.
-
Select Save.
Next: Create a datastream