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.
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 can gain valuable insights from customer actions, define customer audiences through segments, and express 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.
If you’re familiar with Analytics Solution Design Reference (SDRs), you can think of a schema as a more robust SDR.
To complete the lesson, you must have permission to create an Experience Platform schema.
In this lesson, you will:
Log into the Adobe Experience Cloud.
Open the app switcher, then select Data Collection
Make sure you are in the Experience Platform sandbox you are using for this tutorial.
Customers of Platform-based applications like Real-time CDP should use a development sandbox for this tutorial. Other customers will use the default production sandbox.
Select Schemas under Data Management.
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:
XDM ExperienceEvent
captures time-series, event data and XDM Individual Profile
captures attribute data about an individual.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.
Adobe continues to add more standard field groups and they should be used whenever possible since these fields are implicitly understood by Experience Platform services and provide greater consistency when used across Platform components. Using standard field groups provides tangible benefits such automatic mapping in Analytics and AI features in Platform.
In a real-world scenario, the schema design process might look like this:
For learning purposes, you will use prebuilt and custom field groups.
Select Create Schema to bring the options dropdown menu, then select XDM ExperienceEvent.
Search for Consumer Experience Event
.
You can preview the fields and/or read the description for more details before selecting.
Select the checkbox and then Add field groups.
You are brought back to the main schema composition screen where you can see all the available fields.
Give your schema a name by selecting Untitled schema from the top left and then providing a Display name & Description, for example Luma Tutorial Mobile
and "Luma App" schema for Adobe Tutorial
Select Save.
Keep in mind that you do not have to use all the fields in a group. If it’s helpful, you can think of a schema as an empty data layer. In your app, you populate the relevant values at the appropriate time.
The Consumer Experience Event
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.
You begin by creating a custom data type describing the two events:
Select the Data types tab, then select Create data type.
Give it a Display name and Description, for example App Information
and Custom data type describing "Screen Views" & "App Actions"
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. Give it a camel-case Field name appInteraction
, display name App Interaction
, and type Object
.
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 of App Action
and type Measure
.
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 of Name
and type String
.
This step is the equivalent of a dimension in Adobe Analytics.
Scroll to the bottom of the right rail and select Apply.
Follow the same pattern to create an appStateDetails
object containing a Measure field called screenView
and two Strings called screenName
and screenType
.
Select Save.
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.
This time you create a custom field group by selecting the Create new field group radio button near the top, then provide a name and description, for example, App Interactions
and Fields for app interactions
.
From the main composition screen, add a field to the root of the schema.
Select the (+) next to the name of the schema.
In the right rail, provide a Field name of appInformation
, a display name of App Information
.
Select App Information
from the Type drop down, the data type you created in the previous exercise.
Select Apply.
Custom field groups are always placed under your Experience Cloud Org identifier.
_techmarketingdemos
is replaced with your Org’s unique value.
You now have a schema to use for the rest of the tutorial.
Next: Create a datastream
Thank you for investing your time in learning about Adobe Experience Platform Mobile SDK. If you have questions, want to share general feedback, or have suggestions on future content, please share them on this Experience League Community discussion post