Personalization data object
Use the personalization data object to collect identifying data about a user, and the friendlyID of an interactive full stack experience or an interactive full stack experiment that you want to run for the user. You then send the object to Sitecore Personalize, and Sitecore Personalize runs the experience or experiment.
After you create this object, you can send it using the [Engage.personalize()](engage-personalize.md "Engage.personalize(personalizationData[, timeout])") function.
sidebar. Required attributes
At a minimum, every personalization data object must include the following attributes:
| Attribute | Type | Description | Example |
|---|---|---|---|
channel | string (uppercase) | The touchpoint where the user interacts with your brand. For example, for webpages, the channel is "WEB". For mobile app screens, the channel is "MOBILE_APP".If you don't set a value, the channel of the experience or experiment will be "WEB". | Must be one of:
|
currency | string (uppercase ISO 4217) | The alphabetic currency code of the currency the user is using in your app. For example, if the user selects Australian dollars as the currency on your website, the currency is "AUD". |
|
pointOfSale | string | The name of the point of sale where the interaction with your brand takes place. You must set this value to the name of a point of sale that exists in your instance of Sitecore Personalize. If you did not specify pointOfSale in the settings object, you must specify it in the personalization data object.If you specified pointOfSale in the settings object, it's optional in the personalization data object. You can specify it in the personalization data object to override the original value of pointOfSale, previously specified in the settings object, for that specific personalization. | "myretailsite/ireland" |
friendlyId | string | The ID of a live interactive full stack experience or live interactive full stack experiment that you want to run. | "running_shoes_popup_02" |
sidebar. Optional attributes
A personalization data object can optionally include the following attributes:
| Attribute | Type | Description | Example |
|---|---|---|---|
language | string (uppercase ISO 639-1) | The language the user is using your app in. For example, if the user selects the Japanese language on your website, the language is "JA".The default is "EN". |
|
params | object | An object of your choice. Use a flat object structure. Sitecore Personalize automatically flattens nested objects and renames the keys as necessary. For example: Nested object: {"params":{"customObject":{"number":"16"}}}Flattened object with renamed key: {"params_customObject_number":"16"} | params: { key: "value" } |
sidebar. Optional guest identifier attributes
A personalization data object can optionally include no more than one of the following guest identifier attributes. If the personalization data object doesn't contain any of these attributes, the browser ID becomes the guest identifier.
- Attribute: Type
email: string (lowercase recommended)identifier: object
The identifier object:
| Attribute | Type | Description | Example | Required/optional |
|---|---|---|---|---|
id | string | The unique guest identifier provided by your organization's identity system, such as a Customer Relationship Management (CRM) system. | "123456" | Required |
provider | string | The name of your organization's identity system, external to Sitecore Personalize, that provided the unique guest identifier. | "BXLP" | Required |
Example 29. Personalization data object with browser ID
Here's an example of a personalization data object that doesn't contain the email attribute or the identifier attribute to identify the guest. In this case, the browser ID is the guest identifier. This personalization data object also contains an optional custom object.
Example 30. Personalization data object with email
Here's an example of a personalization data object that uses the email attribute as the guest identifier.
Example 31. Personalization data object with identifiers
Here's an example of a personalization data object that uses the identifiers attribute as the guest identifier.