Write dynamic expressions to create custom experiences tailored to your site and users.
Dynamic text will handle "number" and "string" and must always be declared when using a variable. E.g var<string> or var<number>.
The type used in the dynamic expression corresponds to the type the variable has been set up as in the site mapping. Variables used in dynamic expressions must already be mapped for your site.
Surface dynamic values |
|
Concatenate static message and dynamic value | Use ++ to concatenate static message with a dynamic variable or expression.
|
Form conditional expressions | If/else conditional expression
In this example we first set a condition (if the basket.value is less than 20), specify what message we want to surface in that case and then specify what message to surface if the condition is not met.
|
If/else if/else conditional expression
|
In this example the principle remains the same, the difference is we have added an additional condition. The logic proceeds to the else expression only if none of the other conditions is met.
There is no limit on how many else if conditions you can add as long as they logically make sense with each other.
|
Conditional Expressions with AND(&&) and OR(||)
|
|
Form arithmetic expressions
| You can perform basic arithmetic calculations - addition (+), subtraction (-), division (/) and multiplication (*)
Limitations
|