Types of parameters for conditions
Overview of the types of parameters available when creating a custom condition.
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 }]]` |