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
  • Developer Center
  • Conditions
  • Create a custom condition
  • 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

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

Prepopulate value

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

Required parameter

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

Character limit

RequestResponse
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

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

Prepopulate value

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

Required parameter

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

Character limit

RequestResponse
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

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

Required parameter

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

Unrequired parameter

RequestResponse
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

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

Prepopulate value

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

Unrequired parameter

RequestResponse
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

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

Prepopulate value

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

Unrequired parameter

RequestResponse
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.

RequestResponse
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.

Do you have some feedback for us?

If you have suggestions for improving this article,

Privacy policySitecore Trust CenterCopyright © 1999-2026 Sitecore