About expressions

Sometimes you'll need to configure journeys with dynamic values that are determined at runtime, rather than static ones. This is done using expressions that are evaluated during journey execution.

For example, expressions may be used by journeys to:

  • determine the user identifier
  • access information provided by the client upon journey execution
  • specify more complex logic for journey conditions
  • extract or transform data

Expression fields

Certain fields in journey steps and external connections may be configured as expressions. These fields are rarely expected to contain static values (like user identifiers) and can provide any type of value (number, boolean, object, etc.).

An expression field is denoted with the following icon

For example, both the External User ID and Password fields below are expressions:

Interpolated strings

Unlike expressions, interpolated string fields are used only for string values. These fields often represent static values, although they also support dynamic content (written as expressions that are enclosed with ${...}). For example, this may be used to personalize a string with the user's first name, such as Hi ${firstName}.

An interpolated string field is denoted with the following icon

For example, all the fields below are interpolated strings:

Expression completions

When editing an expression or an interpolated string, the expression editor can help by suggesting possible completions of the current partial expression. Completions may appear automatically as you type—for example, when you type the @-symbol to begin a function call.

Completions, along with descriptions like the function names, appear in a list beneath the editor. To insert a completion, select it with your keyboard and hit ENTER, or click it with your mouse.