Skip to main content
Sitecore Documentation
  • Learn
  • Downloads
  • Changelog
  • Roadmap
PersonalizeCloud Portal
Sitecore Personalize
        • Out of the box conditions
            • Condition elements
            • Types of parameters
            • Context parameters for conditions
        • Create a condition with the Code Assistant
        • Copy a custom condition to another tenant
        • Custom conditions best practices
        • Manage conditions
    • View guest events
    • Copying entities between tenants
  • Using client-side JavaScript
  • Glossary
  1. Create a custom condition
  1. Sitecore Personalize
  2. Developer Center
  3. Conditions
  4. Create a custom condition
  5. Types of parameters for conditions

Types of parameters for conditions

The following sections detail the types of parameters you can include when creating a condition.

String template parameter

The following table includes syntax examples for a string field in the condition.

Parameter

Example

String template parameter

let infoParam = `[[More information | string]]`

Prepopulate value

let infoParam = `[[More information | string | rush delivery ]]`

Required parameter

let infoParam = `[[More information | string | rush delivery | {required: true} ]]`

Character limit

let infoParam = `[[More information | string | | {max: 32 }]]`

Text template parameter

The following table includes syntax examples for a text field in the condition.

Parameter

Example

Text template parameter

let DesParam = `[[Description | text]]`

Prepopulate value

let infoParam = `[[Description | text | default value ]]`

Required parameter

let DesParam = `[[Description | text | | {required: true } ]]`

Character limit

let DesParam = `[[Description | text | | {max: 32 }]]`

Number template parameter

The following table includes syntax examples for a number field in the condition.

Parameter

Example

Number template parameter

let TicketsParam = `[[Tickets | number ]]`

Required parameter

let TicketsParam = `[[Tickets | number | 10 ]]`

Unrequired parameter

let TicketsParam = `[[Tickets | number | | {required: false } ]]`

Enumerated list template parameter

The following table includes syntax for an enumerated list in the condition.

Parameter

Example

Drop-down list template parameter

let fareParam = `[[Fare type | enum(Any, Economy, Business, First) ]]`

Prepopulate value

let fareParam = `[[Fare type | enum(Any, Economy, Business, First) | Any | { values: [Any, ECO, BUS, FIR] } ]]`

Unrequired parameter

let fareParam = `[[Fare type | enum(Any, Economy, Business, First) | Any | { values: [Any, ECO, BUS, FIR], required: false }]]`

Multi-select enumerated list template parameter

The following table includes syntax for a multi-select enumerated list in the condition.

Parameter

Example

Multi-select list template parameter

let regionsParam = `[[Region(s) | multienum(Africa, North America, Oceania, Asia, Europe, South America) ]]`

Prepopulate value

let regionsParam = `[[Region(s) | multienum(Africa, North America, Oceania, Asia, Europe, South America) | Europe, Asia ]]`

Unrequired parameter

let regionsParam = `[[Region(s) | multienum(Africa, North America, Oceania, Asia, Europe, South America) |  | { required: false }]]`

Example with extra options

You can also use additional options to improve the user experience.

let regionsParam = `[[Region(s) | multienum(Africa, North America, Oceania, Asia, Europe, South America) |  | { required: true, searchable: true, placeholder: "region(s)" }]]`
  • searchable: true allows the user to start typing a value to instantly narrow down the list of choices.

  • placeholder defines the instructional text that fills the selection box until the user selects a region.

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