Skip to main content
Sitecore Documentation
  • Learn
  • Downloads
  • Changelog
  • Roadmap
PersonalizeCloud Portal
Sitecore Personalize
        • Getting started
            • Using custom fields
        • Apply a condition
        • Apply a segment
        • Use a decision model
        • Run an experience
    • SitecoreAI experiences
    • Using the experience list
    • Manage experience details
    • Set up email notifications
    • View performance analytics
    • View operational data
    • Duplicate, delete, and view details
  • Using client-side JavaScript
  • Glossary
  1. Introduction to experiences
  1. Sitecore Personalize
  2. Introduction to experiences
  3. Introduction to interactive experiences

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:

{
   "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.

If you have suggestions for improving this article, let us know!

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

Privacy policySitecore Trust CenterTerms of use