Skip to main content
Users
CloudPortalLogin
  • Powered byPowered by
Introduction to Sitecore Personalize
Managing accounts and system settings
Identifying guests
Introduction to experiments
Introduction to experiences
Decisioning
View dashboards
Developer Center
Connecting to an external system
Using client-side JavaScript
Using server-side JavaScript
AI in Personalize
Glossary
  • Sitecore Personalize
  • Introduction to experiences
  • Introduction to interactive experiences
  • Create an interactive experience
  • Using custom fields in an interactive experience

Using custom fields in an interactive experience

There might scenarios when you need to use logic in an interactive experience that relies on an attribute that Sitecore Personalize does not capture. For example, you might want to only run an experience for visitors who are logged in to your organization's website. Since this is not automatically captured by Sitecore Personalize, you can create a custom field called “loggedInState”, and use this data when you build the experience.

You can use custom fields when using the following features:

  • Compose the API request: Include the custom field in the API request, using FreeMarker. For example, retrieve the value of the custom field and use it in further logic.

  • Creating custom conditions: Use the value of the custom field to determine whether to execute the experience.

  • Creating programmable decisions: Use the custom field as logic in a programmable decision to determine the next best action or offer.

You can send any custom field in the POST request using the Sitecore Personalize REST API. You must use the params key as shown in the following example:

RequestResponse
{
   "clientKey":"abBah8aelipaPeebae7roox2tiexoSee",
   "channel":"WEB",
   "language":"en",
   "currencyCode":"EUR",
   "pointOfSale":"retailsite.com",
   "browserId":"56860bff-94ba-4d84-aa37-2b5a83d5411b",
   "friendlyId":"home_page_banner",
   "params":{
      "loggedInState":"logged in"
   }
}
Warning

Avoid using custom fields throughout your business logic

As a general rule, separate your business logic so that you do not use the same custom field in logic within a custom condition, decisioning, and API request unless necessary.

Do you have some feedback for us?

If you have suggestions for improving this article,

Privacy policySitecore Trust CenterCopyright © 1999-2026 Sitecore