The Experience Data Model (XDM) project is developed as an Open Standard driven by Adobe. We welcome contributions from everyone who is interested in advancing digital experiences.
We are in the process of increasing the visibility of XDM to partners and to invite them to contribute and give feedback. For this purpose, we will move the XDM repository to https://github.com/adobe/xdm. For Adobe employees, following ground rules apply:
- Like everyone, follow the Code of Conduct
- Like everyone, follow these Contributing guides
- Like always, don't share credentials, API keys, or other secrets in issues or in code
- Focus on standardizing the category, not your specific product
XDM uses a review then commit process, which means that no changes are being made without an editor approving the change.
XDM is driven by Adobe, but it is not specific to Adobe products. This means that models should capture the universal concepts of digital experiences, not specific implementations, no matter if they are part of an Adobe product or not. If you need to express a concept that is specific to an Adobe (or other) product, that is not universal, it should be formulated in an XDM extension instead.
- Go to the list of open issues and pick an issue you want to work on. If you don't see the appropriate issue, create a new issue in GitHub
- If you haven't done so yet, fork the XDM repository into your private GitHub organization. If your fork exists, merge the latest updates from
AdobeCloudPlatform/xdm
intoyourname/xdm
, so that you don't start from an outdated code tree - In
yourname/xdm
create a new branch frommaster
. Your branch name should either refer the issue number likebug-42
orfeature-23
or have a descriptive name likefix-layer-group-references
- Make add edits that apply to the given feature or bug against this new branch. Commit and push in frequent intervals
- If you are working on the branch for more than a day, make sure to occasionally (at least once per day) to merge the latest updates from
AdobeCloudPlatform/xdm#master
into your branch, so that you won't get surprised when it's time to merge the pull request. Resolve any conflicts to make life easier for the XDM editors - Once you are done, create a pull request from your branch against
AdobeCloudPlatform/xdm#master
.
Every pull request should specify:
- What the change intends to do
- If there are breaking changes
- Link to the Github issue in the format
#42
For every update to the schema, make sure
npm test
validates all example files- There are
schemas/*/*.example.*.json
files for each newly created schema
Furthermore, a pull request that modifies the schema must also include accompanying documentation. Pull requests with missing documentation will be rejected.
Each commit message that is not part of a pull request:
- Should contain the issue ID like
#42
- Can contain the tag
[trivial]
for trivial changes that don't relate to an issue
The target consumers of the data model are developers building applications using services from Adobe, our partners, and their customers. These design guidelines help:
- Longevity: consuming applications rarely need to be changed.
- Clarity: concepts are self-explanatory.
- Continuity: existing knowledge can be re-applied.
- Compatibility: implementations can easily cross between products.
- Consumability: systems based on the data model are easy to build, understand, and use.
Our goal is to establish a universal standard for the experience business. As such, this standard's lifetime will be comparable to standards like PDF (24 years old), EXIF (22 years old), or HTML (24 years old).
The design decisions made today will impact future developers, who will have only limited understanding, patience, or sympathy for constraints dictated by current Adobe implementations. While future requirements cannot be predicted in detail, it is important to accomodate requirements and industry trends.
XDM will be consumed and implemented by many highly different applications, which in turn will be used by digital experience professionals such as marketers, designers, advertisers, or digital analysts, which will be exposed to names and concepts introduced and solidified in XDM.
When names can refer to a business concept or a lower-level technical concept, save the shorter, simpler name for the high-level business concept.
For example, for a marketer, an event is something that happens or takes place, or a planned public or social occasion. For a developer, an event in event-driven programming is a low level user- or system action. As the term event is highly relevant to experiences in the more general sense, the shorter, unqualified term shall be used for the business concept.
XDM is not an isolated standard, but incorporates and builds on standards. Whenever possible, use existing standards, or "borrow" concepts from existing standards. See (and update!) Standards Used by XDM.
Interoperability with Microsoft's Common Data Model (CDM)is a top priority. This means that definitions that are present in CDM should be used or extended, where appropriate, by XDM. XDM should not attempt to duplicate definitions that are present in CDM.
Where appropriate, we can 'lead' CDM, extend it to meet other requirements. Another good source of data model elements is schema.org.
While there will be almost certainly multiple implementations of parts of XDM across Adobe (sometimes sequentially, sometimes in parallel), the number of internal implementations (producers) will be massively outstripped by the number of external, consuming implementations of XDM.
Additional aspects of standard design that aid with consumability are:
- principle of least astonishment: don't surprise the consumer
- avoid unnecessary complexity: don't introduce indirections that are not needed
- the principle of minimal verbosity: make keep things as short as possible, but not shorter
The experience business is a global business, therefore XDM needs to meet the needs of consumers and creators world-wide. Desktop and Enterprise applications are often built to be localized, adapted to the customer environment. But XDM will form the "glue" that puts together widely distributed components which may have different internal data models. In general we want to avoid the necessity of converters, with some exceptions:
Some values require context to interpret – for example, a phone number without a county code. Include the context in XDM. However, for values that need no context to convert, put off conversion by allowing alternatives: writing XDM data will require no conversion, while consuming XDM data only requires conversion in cases where conversion is necessary.
Avoid non-semantic limits – don’t put current resource limits in the data model. Limits (number ranges, choices, string length) should be based on business constraints or expressed independently.
- file names for schema files should be lower case and end with
.schema.json
- include an
"$id"
with a value like"https://ns.adobe.com/xdm/assets/image"
in the schema (but leave out the.schema.json
) - when referencing schemas, use the absolute
$id
, don't use relative references like../content/content.schema.json
- don't nest schemas too deeply. Break inline type definitions into separate
*.schema.json
files if they have properties with object types themselves. - don't make schemas too fine-grained, only create schemas for
object
s not for simple types like patterned strings - ensure that there is a
meta:license
at the top of the schema - use JSON Schema
draft-6
- provide a
description
andtitle
for each schema and each property - have the
title
at the top of the schema, so that it can be found without scrolling - make sure you have an example for every schema
- run
npm test
before you make a pull request - convention is that property names are in camelCase, when they appear in JSON
- Acronyms in camelCase like ID, API, JSON are also capitalized in camelCase, such as
assetID
- When combining two acronyms, use lowercase for the first and uppercase for the second, such as
dmaID
- don't invent your own
ID
attributes, use the@id
convention - don't invent your own
type
attributes, use the@type
convention
Run npm run lint
before committing. The lint
command is able to fix some easy styling issues, including:
- intent: 2 spaces
- line breaks
- spaces around delimiters
In order to encourage re-use of definitions and modularity of schema files, avoid putting all property declarations into the root of the schema, instead use a definitions
object with one sub-key for each semantic unit. Then, at the bottom of your schema definition, $ref
erence them using the allOf
construct.
"allOf":[
{"$ref": "#/definitions/mydefinition"},
{"$ref": "#/definitions/myotherdefinition"},
{"$ref": "https://ns.adobe.com/xdm/assets/image#/definitions/someotherdefinition"},
]
In this example, the definitions mydefinition
and myotherdefinition
are pulled from the current schema, while someotherdefinition
is pulled from https://ns.adobe.com/xdm/assets/image
JSON Schema does not have a built-in inheritance mechanism, so the use of definitions
is considered best practice in structuring complex schemas.
We use built-in JSON Schema capabilities to provide extensibility. These capabilities are augmented by some JSON LD-inspired extensions, without requiring consumers to become full-blown JSON LD processors. There are two modes of making XDM extensible: through custom properties and through new schemas. Custom properties are discussed below, new schemas will be defined in the future.
In order to allow custom properties, use the https://ns.adobe.com/xdm/common/extensible
schema as a $ref
reference to the schema in question. This will make sure validation will mark any extension that uses ad-hoc, unregistered properties that potentially overwrites existing or future XDM core properties, as invalid.
In detail, this schema fragment:
- disallows the use of
@context
to define custom namespace prefixes - if
@context
is used, it enforces the namespace prefix mapping that XDM uses - it forbids the use of any property name prefix that is not listed in
schemas/common/context.jsonld
- it allows
patternProperties
that are full URIs, so that customers can add their own extensions, as explained in the extensibility docs
XDM provides this JSON Schema fragment to that express these constraints. The schema fragment that can be added to a given schema, allowing you to validate example documents with extensions.
In order to make a schema extensible, add the https://ns.adobe.com/xdm/common/extensible#/definitions/@context
schema fragment reference to your schema definition.
"allOf":[
{"$ref": "https://ns.adobe.com/xdm/common/extensible#/definitions/@context"},
{"$ref": "#/definitions/…"}
]
For all writing, please follow the Adobe I/O style guide.
The XDM project differentiates between major and minor contributions.
- Minor contributions: contributions that do not change the meaning of the standard, such as corrections to typos, word order or formatting. Contributions to the project's
README.md
orCONTRIBUTING.md
are also minor contributions. - Major contributions: all other contributions.
One of the editors will look at the pull request within one week and flag it as minor
. The editor will then either merge or reject the pull request. If you haven't heard back from the editors within a week, it is not impolite to send a reminder to Grp-XDM-API-WGs.
Feedback on the pull request will be given in writing, in GitHub.
One of the editors will look at the pull request within one week and flag it as major
. The editor will then provide feedback on the pull request in GitHub.
Every week, during the XDM working group meeting, all open pull requests will be reviewed and discussed. All feedback given in the meeting will be logged in GitHub. This real-time discussion will make sure all open pull requests will get attention.
When the editors agree on the pull request, the pull request will either be merged or rejected. Until this is the case, the pull request will remain open. Editors are operating under the assumption of agreement, so that a single editor can authorize a merge.