Consents and Preferences

This guide describes how the Didomi platform stores consent information and how you can implement the most common workflows through our API.

Concepts

The Didomi platform is structured around the following concepts.

User

An end user that Didomi stores consent information on. A user is associated with a set of Didomi user IDs. When consent is collected through the Didomi SDKs, multiple users can actually be tied to a single real end user as Didomi IDs are stored in cookies and local storage so that it is practically a device ID.

You can associate a user with an organization user ID, which is a unique user ID that you can assign and that is used to link a Didomi user to your internal systems as well as resolve cross-platform IDs. It can be an email address, a phone number, a CRM ID, etc.

Additional metadata can also be associated with a user to track organization-specific information and applies specific rules.

Consents

As per GDPR, consents are authorization given by the user for a set of purposes and vendors. Examples: consent to cookies, marketing communications, etc.

Preferences

In the Didomi platform, Preferences are more granular choices expressed by the user with respect to expressed consents. Those are not GDPR consents per se but are used to add more details to consents and store more granular choices from users. Preferences can be associated with a list of channels and with specific metadata.

Preferences are always tied to a specific purpose. Examples:

  • The "cookies" purpose can be broken down into multiple categories: analytics, essential, marketing, social, etc.

  • The "marketing communications" purpose can be broken down into different types of communications (newsletter, special offers, etc.) and channels (email, text, etc.)

Entities

The concepts presented above are represented, in the Didomi platform, with the following entities.

User

The User entity represents the latest consent status of an end user as well as additional metadata. That's the entity that you should query when you want to check if you have consent for a specific data processing.

The User entity has the following schema:

{
/**
* The Didomi user ID
* A random UUID for users encountered on websites and an IDFA/ADID for
* users from mobile apps.
*/
user_id: 'string',
/**
* A unique user ID in your organization
* This could be an email, a phone number, an internal client ID, etc.
* It is used to link Didomi users to your internal systems.
* Multiple Didomi users can be associated with one organization user ID.
*/
organization_user_id: 'string',
/**
* Version number of the user record
* User for optimistic locking
*/
version: Number,
/**
* Creation date of the user record
*/
created_at: 'ISO8601 date',
/**
* Last update date of the user record
*/
updated_at: 'ISO8601 date',
/**
* Free-form metadata object on the user
*/
metadata: Object,
/**
* Consent status of the user
*/
consents: {
/**
* Consents given by the user to third-parties
*/
third_party: {
/**
* Purposes that the user has made choices for
*/
purposes: [
{
/**
* Unique purpose ID
*/
id: 'string',
/**
* Whether the user has given consent to this purpose or not
*/
enabled: boolean,
},
...
],
/**
* Vendors that the user has made choices for
*/
vendors: [
{
/**
* Unique vendor ID
*/
id: 'string',
/**
* Whether the user has given consent to this vendor or not
*/
enabled: boolean,
},
...
]
},
/**
* Consents given by the user to the organization itself
*/
first_party: {
/**
* Purposes that the user has made choices for
*/
purposes: [
{
/**
* Unique purpose ID
*/
id: 'string',
/**
* Whether the user has given consent to this purpose or not
*/
enabled: boolean,
/**
* Extra preferences expressed for the purpose
*/
preferences: [
{
/**
* Unique preference ID
*/
id: 'string',
/**
* Whether the user has enabled this preference or not
*/
enabled: boolean,
/**
* Channels
*/
channels: [
{
/**
* Unique channel ID
*/
id: 'string',
/**
* Whether the user has enabled this channel or not
*/
enabled: boolean,
}
],
/**
* Free-form metadata object on the preference
*/
metadata: Object,
}
]
},
...
],
}
}
}

Event

A consent Event is a partial update to the consent status of a user. When a user makes consent choices through a Didomi SDK (a consent notice, for instance) or through your own custom UI, you should create a new consent event on the Didomi platform. The user consent status will be automatically updated and the history of consent events will be kept, associated with the user.

The Event entity has the following schema:

{
/**
* Unique event ID
*/
id: 'string',
/**
* Creation date of the event
*/
created_at: 'ISO8601 date',
/**
* Free-form metadata object
*/
metadata: Object,
/**
* User information
*/
user: {
/**
* Didomi user ID
*/
id: 'string',
/**
* Organization user ID
*/
organization_user_id: 'string',
/**
* Free-form metadata object
*/
metadata: Object,
},
/**
* Consent status of the user
*/
consents: {
/**
* Consents given by the user to third-parties
*/
third_party: {
/**
* Purposes that the user has made choices for
*/
purposes: [
{
/**
* Unique purpose ID
*/
id: 'string',
/**
* Whether the user has given consent to this purpose or not
*/
enabled: boolean,
},
...
],
/**
* Vendors that the user has made choices for
*/
vendors: [
{
/**
* Unique vendor ID
*/
id: 'string',
/**
* Whether the user has given consent to this vendor or not
*/
enabled: boolean,
},
...
]
},
/**
* Consents given by the user to the organization itself
*/
first_party: {
/**
* Purposes that the user has made choices for
*/
purposes: [
{
/**
* Unique purpose ID
*/
id: 'string',
/**
* Whether the user has given consent to this purpose or not
*/
enabled: boolean,
/**
* Extra preferences expressed for the purpose
*/
preferences: [
{
/**
* Unique preference ID
*/
id: 'string',
/**
* Whether the user has enabled this preference or not
*/
enabled: boolean,
/**
* Channels
*/
channels: [
{
/**
* Unique channel ID
*/
id: 'string',
/**
* Whether the user has enabled this channel or not
*/
enabled: boolean,
}
],
/**
* Free-form metadata object on the preference
*/
metadata: Object,
}
]
},
...
],
}
}
}