Skip to main content
Sitecore Documentation
  • Learn
  • Downloads
  • Changelog
  • Roadmap
CDPCloud Portal
Sitecore CDP
  • Data browser
            • Condition elements
            • Types of parameters
            • Context parameters for conditions
        • Create a condition with the Code Assistant
        • Copy a custom condition to another tenant
        • Manage conditions
    • Batch uploads
    • Copying entities between tenants
  • Glossary
  1. Create a custom condition
  1. Sitecore CDP
  2. Developer center

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:

ParameterTypeDescriptionExample
guest.languagestringThe language used by this guest, represented by 2 letters, in ISO 3166-1 alpha-2 format."EN"
guest.emailstringThe email address of the guest."[email protected]"
guest.titlestringThe title of the guest."Ms."
guest.firstNamestringThe first name of this guest."Dave"
guest.lastNamestringThe last name of this guest."Jones"
guest.genderstringThe gender of this guest."unknown"
guest.citystringThe city address of the guest."Dublin"
guest.countrystringThe country of this guest, represented by 2 letters, in ISO 3166-1 alpha-2 format."IE"
guest.nationalitystringThe nationality of the guest."Irish"
guest.dateOfBirthdateThe date of birth of this guest.2001-02-15T00:00
guest.passportExpirydateThe expiry date of the guest's passport.2023-08-01'T'00
:00.000'Z
guest.typestringThe level of identity obtained for the guest."customer"
guest.firstSeendateThe first time the guest interacted with your brand."2015-01-01T16:17
.000Z"
guest.lastSeendateThe last time the guest interacted with your brand."2023-04-06T16:17
.000Z"

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:

ParameterTypeDescriptionExample
request.pointOfSalestringThe point of sale associated with the session."myretailsite/ireland"
request.params.referrerstringThe referrer associated with the session."facebook.com"
request.params.utm.campaignstringThe UTM campaign included in the visitor's current URL."content_promotion"
request.params.utm.sourcestringThe UTM source included in the visitor's current URL."bing"
request.params.utm.mediumstringThe UTM medium included in the visitor's current URL."social"
request.params.utm.contentstringThe 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 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.

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 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:

ParameterTypeDescriptionExample
tenant.configurations.dateFormatstringThe date format that displays on the Sitecore CDP UI."1985-12-24"
tenant.configurations.namestringThe name of the tenant."My Retail Site"
tenant.configurations.timeZonestringThe time zone of the tenant."Europe/Dublin"
tenant.configurations.currencystring

(uppercase ISO 4217)
The alphabetic currency code of the currency in which monetary values display in the Sitecore CDP UI."EUR"
tenant.configurations.languagestringThe primary language set for the tenant."en-gb"

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:

ParameterTypeDescriptionExample
entity.refstringThe UUID of the event."717732d5-ab8a-4506-8e56-90e71ee9e008"
entity.createdAtstringThe time that Sitecore CDP received the event."2023-07-19T05:50
.267Z"
entity.modifiedAtstringThe time the event was modified."2023-07-20T05:50
.267Z"
entity.typestringThe event type."GUEST_CREATED", "ORDER_CREATED", "ORDER_UPDATED", "SESSION_CLOSED", "GUEST_MODIFIED_CUSTOM"
entity.statusstringThe status of the event."PROCESSED"
entity.channelstringThe 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.
  • "AIRPORT_KIOSK"
  • "BRANCH"
  • "CALL_CENTER"
  • "EMAIL"
  • "GDS"
  • "KIOSK"
  • "MOBILE_APP"
  • "MOBILE_WEB"
  • "SMS"
  • "OFFLINE"
  • "OTA"
  • "OTHER"
  • "WEB"
entity.pointOfSalestringThe name of the point of sale where the interaction with your brand takes place."myretailsite/ireland"
entity.browserRefstringThe unique browser reference."56860bff-94ba-4d84-aa37-2b5a83d5411b"
entity.sessionRefstringThe unique session reference."a60e670f-52d6-5cd0-aec3-59de082e3953"
entity.arbitraryDataobjectA JSON object of custom data.N/A
entity.arbitraryData.languagestringThe language of the user session."EN"
entity.arbitraryData.pagestringThe 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.currencystringThe alphabetic currency code of the currency the user is using in your app."EUR"
If you have suggestions for improving this article, let us know!

Documentation Assistant

This assistant uses AI to generate responses based on Sitecore documentation. While it has access to official sources, answers may be incomplete or inaccurate and should not be considered official advice or support.
Powered by
k
kapa.ai
Protected by reCAPTCHA

© Copyright 2026, Sitecore A/S or a Sitecore affiliated company.
All rights reserved.

Privacy policySitecore Trust CenterTerms of use