---
title: "Context parameters for conditions"
slug: "context-parameters-for-conditions"
abstract: "Overview of supported context parameters you can add to a condition for certain types of experiments and experiences."
---
# Context parameters for conditions

The following sections detail the types of context parameters you can include when [creating a condition](https://doc.sitecore.com/personalize/en/users/sitecore-personalize/developer-center/conditions/create-a-custom-condition.html "Create a custom condition").

We recommend you familiarize yourself with the [types of parameters](https://doc.sitecore.com/personalize/en/users/sitecore-personalize/developer-center/conditions/create-a-custom-condition/types-of-parameters-for-conditions.html "Types of parameters for conditions") and [elements](https://doc.sitecore.com/personalize/en/users/sitecore-personalize/developer-center/conditions/create-a-custom-condition/condition-elements.html "Condition elements") for conditions, as well as [unsupported JavaScript functions](https://doc.sitecore.com/personalize/en/users/sitecore-personalize/introduction-to-decisioning-in-sitecore-personalize/managing-programmable-decisions/supported-and-unsupported-javascript-entities/unsupported-javascript-functions-and-alternatives.html "Unsupported JavaScript functions and alternatives"), 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](https://doc.sitecore.com/personalize/en/users/sitecore-personalize/developer-center/conditions/create-a-custom-condition.html "Create 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 Personalize has determined for the site visitor.

You can also include `guest` parameters that non-technical users can assign values for when adding a condition to an experiment or experience. For example, the user can select which language the guest uses, as a condition for showing the experiment or experience.

The Compatibility column in the table lists the types of experiments and experiences for which the parameter is compatible. You can use parameters from the `guest` object in all types of experiments and experiences.

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 | Compatibility | Description | Example |
| --- | --- | --- | --- | --- |
| `guest.language` | string | web, interactive, triggered | The language used by this guest, represented by 2 letters, in ISO 3166-1 alpha-2 format. | `"EN"` |
| `guest.email` | string | web, interactive, triggered | The email address of the guest. | `"example@email.com"` |
| `guest.title` | string | web, interactive, triggered | The title of the guest. | `"Ms."` |
| `guest.firstName` | string | web, interactive, triggered | The first name of this guest. | `"Dave"` |
| `guest.lastName` | string | web, interactive, triggered | The last name of this guest. | `"Jones"` |
| `guest.gender` | string | web, interactive, triggered | The gender of this guest. | `"unknown"` |
| `guest.city` | string | web, interactive, triggered | The city address of the guest. | `"Dublin"` |
| `guest.country` | string | web, interactive, triggered | The country of this guest, represented by 2 letters, in ISO 3166-1 alpha-2 format. | `"IE"` |
| `guest.nationality` | string | web, interactive, triggered | The nationality of the guest. | `"Irish"` |
| `guest.dateOfBirth` | date | web, interactive, triggered | The date of birth of this guest. | `2001-02-15T00:00` |
| `guest.passportExpiry` | date | web, interactive, triggered | The expiry date of the guest's passport. | `2023-08-01'T'`00:00`:00.000'Z` |
| `guest.type` | string | web, interactive, triggered | The level of identity obtained for the guest. | `"customer"` |
| `guest.firstSeen` | date | web, interactive, triggered | The first time the guest interacted with your brand. | `"2015-01-01T16:`17:16`.000Z"` |
| `guest.lastSeen` | date | web, interactive, triggered | The last time the guest interacted with your brand. | `"2023-04-06T16:`17:16`.000Z"` |

## UTM and referrer parameters

The experience request service returns parameters from the site visitor's real-time session. When you use JavaScript in a [custom condition](https://doc.sitecore.com/personalize/en/users/sitecore-personalize/developer-center/conditions/create-a-custom-condition.html "Create a custom condition"), you can check for the presence of a value from the experience request service. For example, you can check the site visitor's point of sale.

You can also include session parameters that non-technical users can assign values for when adding a condition to an experiment or experience. For example, the user can select which UTM campaign is associated with the site visitor's URL, as a condition for showing the experiment or experience.

To ensure Sitecore Personalize calls the experience request service and returns the parameters when evaluating the condition, include this function in the JavaScript editor:

```csharp
(function () {
        return { request: request };
})();

```

The Compatibility column in the table lists the types of experiments and experiences for which the parameter is compatible. You can only use parameters in a condition that are compatible with the same types of experiments and experiences.

To use parameters from the experience request service 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 | Compatibility | Description | Example |
| --- | --- | --- | --- | --- |
| `request.pointOfSale` | string | web and interactive | The point of sale associated with the session. | `"myretailsite/ireland"` |
| `request.params.referrer` | string | interactive | The referrer associated with the session. | `"facebook.com"` |
| `request.params.utm.campaign` | string | interactive | The UTM campaign included in the visitor's current URL. | `"content_promotion"` |
| `request.params.utm.source` | string | interactive | The UTM source included in the visitor's current URL. | `"bing"` |
| `request.params.utm.medium` | string | interactive | The UTM medium included in the visitor's current URL. | `"social"` |
| `request.params.utm.content` | string | interactive | The UTM content included in the visitor's current URL. | `"call_to_action"` |

## Tenant parameters

The `tenant` object contains parameters from your organization's tenant settings that are set in the [Company Information](https://doc.sitecore.com/personalize/en/users/sitecore-personalize/managing-accounts-and-system-settings-in-sitecore-personalize/manage-company-information-in-sitecore-personalize.html "Manage company information in Sitecore Personalize") screen. When you use JavaScript in a [custom condition](https://doc.sitecore.com/personalize/en/users/sitecore-personalize/developer-center/conditions/create-a-custom-condition.html "Create 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`.

> [!warning]
> 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 Personalize APIs.

The Compatibility column in the table lists the types of experiments and experiences for which the parameter is compatible. You can only use `tenant` parameters in a condition that is compatible with interactive experiments and experiences.

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 | Compatibility | Description | Example |
| --- | --- | --- | --- | --- |
| `tenant.configurations.dateFormat` | string | interactive | The date format that displays on the Personalize UI. | `"1985-12-24"` |
| `tenant.configurations.name` | string | interactive | The name of the tenant. | `"My Retail Site"` |
| `tenant.configurations.timeZone` | string | interactive | The time zone of the tenant. | `"Europe/Dublin"` |
| `tenant.configurations.currency` | string<br><br>(uppercase [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes)) | interactive | The alphabetic currency code of the currency in which monetary values display in the Sitecore Personalize UI. | `"EUR"` |
| `tenant.configurations.language` | string | interactive | The primary language set for the tenant. | `"en-gb"` |

## Entity parameters

The `entity` object contains parameters from the event that [triggered the experiment or experience](https://doc.sitecore.com/personalize/en/users/sitecore-personalize/introduction-to-experiments-in-sitecore-personalize/introduction-to-triggered-experiments-in-sitecore-personalize/create-a-trigger-for-a-triggered-experiment.html "Create a trigger for a triggered experiment"). When you use JavaScript in a [custom condition](https://doc.sitecore.com/personalize/en/users/sitecore-personalize/developer-center/conditions/create-a-custom-condition.html "Create a custom condition"), you can check for the presence of a value from the `entity` object. For example, you can check if the `SESSION_CLOSED` event triggered the experiment.

The Compatibility column lists the types of experiments and experiences for which the parameter is compatible. You can only use `entity` parameters in a condition that is compatible with triggered experiments and experiences.

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 | Compatibility | Description | Example |
| --- | --- | --- | --- | --- |
| `entity.ref` | string | triggered | The UUID of the event. | `"717732d5-ab8a-4506-8e56-90e71ee9e008"` |
| `entity.createdAt` | string | triggered | The time that Sitecore Personalize received the event. | `"2023-07-19T05:`50:19`.267Z"` |
| `entity.modifiedAt` | string | triggered | The time the event was modified. | `"2023-07-20T05:`50:19`.267Z"` |
| `entity.type` | string | triggered | The event type that triggered the experiment or experience. | `"GUEST_CREATED"`, `"ORDER_CREATED"`, `"ORDER_UPDATED"`, `"SESSION_CLOSED"`, `"GUEST_MODIFIED_CUSTOM"` |
| `entity.status` | string | triggered | The status of the event. | `"PROCESSED"` |
| `entity.channel` | string | triggered | 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`. | <ul><li>`"AIRPORT_KIOSK"`</li><li>`"BRANCH"`</li><li>`"CALL_CENTER"`</li><li>`"EMAIL"`</li><li>`"GDS"`</li><li>`"KIOSK"`</li><li>`"MOBILE_APP"`</li><li>`"MOBILE_WEB"`</li><li>`"SMS"`</li><li>`"OFFLINE"`</li><li>`"OTA"`</li><li>`"OTHER"`</li><li>`"WEB"`</li></ul> |
| `entity.pointOfSale` | string | triggered | The name of the point of sale where the interaction with your brand takes place. | `"myretailsite/ireland"` |
| `entity.browserRef` | string | triggered | The unique browser reference. | `"56860bff-94ba-4d84-aa37-2b5a83d5411b"` |
| `entity.sessionRef` | string | triggered | The unique session reference. | `"a60e670f-52d6-5cd0-aec3-59de082e3953"` |
| `entity.arbitraryData` | object | triggered | A JSON object of custom data. | N/A |
| `entity.arbitraryData.language` | string | triggered | The language of the user session. | `"EN"` |
| `entity.arbitraryData.page` | string | triggered | The name of the webpage where the interaction with your brand takes place.This is a custom value of your choice. | `"contact-us.html"` |
| `entity.arbitraryData.currency` | string | triggered | The alphabetic currency code of the currency the user is using in your app. | `"EUR"` |