Context parameters for conditions
The following sections detail the types of context parameters you can include when creating a condition.
We recommend you familiarize yourself with the types of parameters and types of parameters for conditions, as well as unsupported JavaScript functions, before you add any context parameters to conditions.
Guest parameters
The guest object contains parameters about the site visitor. When you use JavaScript in a custom condition, you can check for the presence of a value from the guest object. For example, you can check the site visitor's guest type, which is the level of identity Sitecore CDP has determined for the site visitor.
You can also include guest parameters that non-technical users can assign values for when applying a condition in an audience export. For example, the user can select which language the guest uses, as a condition for including the guest in the export.
To use parameters from the guest object in a condition, include the full path to the guest parameter in the JavaScript editor. The full path is provided in the Parameter column of this table:
|
Parameter |
Type |
Description |
Example |
|---|---|---|---|
|
|
string |
The language used by this guest, represented by 2 letters, in ISO 3166-1 alpha-2 format. |
|
|
|
string |
The email address of the guest. | |
|
|
string |
The title of the guest. |
|
|
|
string |
The first name of this guest. |
|
|
|
string |
The last name of this guest. |
|
|
|
string |
The gender of this guest. |
|
|
|
string |
The city address of the guest. |
|
|
|
string |
The country of this guest, represented by 2 letters, in ISO 3166-1 alpha-2 format. |
|
|
|
string |
The nationality of the guest. |
|
|
|
date |
The date of birth of this guest. |
|
|
|
date |
The expiry date of the guest's passport. |
|
|
|
string |
The level of identity obtained for the guest. |
|
|
|
date |
The first time the guest interacted with your brand. |
|
|
|
date |
The last time the guest interacted with your brand. |
|
UTM and referrer parameters
When you use JavaScript in a custom condition, you can check for the presence of, for example, the site visitor's point of sale.
You can also include session parameters that non-technical users can assign values for when applying the condition in an audience export. For example, the user can select which UTM campaign is associated with the site visitor's URL as a condition for including the guest in the export.
To ensure Sitecore CDP returns the parameters when evaluating the condition, include this function in the JavaScript editor:
(function () {
return { request: request };
})();To use parameters in a condition, include the full path to the request parameter in the JavaScript editor. The full path is provided in the Parameter column of this table:
|
Parameter |
Type |
Description |
Example |
|---|---|---|---|
|
|
string |
The point of sale associated with the session. |
|
|
|
string |
The referrer associated with the session. |
|
|
|
string |
The UTM campaign included in the visitor's current URL. |
|
|
|
string |
The UTM source included in the visitor's current URL. |
|
|
|
string |
The UTM medium included in the visitor's current URL. |
|
|
|
string |
The UTM content included in the visitor's current URL. |
|
Tenant parameters
The tenant object contains parameters from your organization's tenant settings that are set in the Company Information screen. When you use JavaScript in a custom condition, you can check for the presence of a value from the tenant object. For example, you can check if the tenant's currency is EUR.
The parameter values set in the Company Information screen and returned in the tenant object are not necessarily identical to the parameters that your organization sends to the Sitecore CDP APIs.
To use tenant parameters in a condition, include the full path to the tenant parameter in the JavaScript editor. The full path is provided in the Parameter column of this table:
|
Parameter |
Type |
Description |
Example |
|---|---|---|---|
|
|
string |
The date format that displays on the Sitecore CDP UI. |
|
|
|
string |
The name of the tenant. |
|
|
|
string |
The time zone of the tenant. |
|
|
|
string (uppercase ISO 4217) |
The alphabetic currency code of the currency in which monetary values display in the Sitecore CDP UI. |
|
|
|
string |
The primary language set for the tenant. |
|
Entity parameters
When you use JavaScript in a custom condition, you can check for the presence of a value from the entity object.
To use entity parameters in a condition, include the full path to the entity parameter in the JavaScript editor. The full path is provided in the Parameter column of this table:
|
Parameter |
Type |
Description |
Example |
|---|---|---|---|
|
|
string |
The UUID of the event. |
|
|
|
string |
The time that Sitecore CDP received the event. |
|
|
|
string |
The time the event was modified. |
|
|
|
string |
The event type. |
|
|
|
string |
The status of the event. |
|
|
|
string |
The touchpoint where the user interacts with your brand. For example, for webpages, the channel is |
|
|
|
string |
The name of the point of sale where the interaction with your brand takes place. |
|
|
|
string |
The unique browser reference. |
|
|
|
string |
The unique session reference. |
|
|
|
object |
A JSON object of custom data. |
N/A |
|
|
string |
The language of the user session. |
|
|
|
string |
The name of the webpage where the interaction with your brand takes place.This is a custom value of your choice. |
|
|
|
string |
The alphabetic currency code of the currency the user is using in your app. |
|