Use the advanced expression editor to build advanced expressions in various screens of the interface. For example, you can build expressions when configuring and using journeys, and when defining a data source condition.
It is also available every time you need to define action parameters that require specific data manipulations. You can leverage data coming from the events or additional information retrieved from the data source. In a journey, the displayed list of event fields is contextual and varies according to the event(s) added in the journey.
The advanced expression editor offers a set of built-in functions and operators to let you manipulate values and define an expression that fits specifically your needs. The advanced expression editor also allows you to define the values of the external data source parameter, manipulate map fields and collections, such as experience events.
The advanced expression editor interface
The advanced expression editor can be used to:
When possible, you can switch between the two modes using the Advanced mode / Simple mode button. The simple mode is described here.
Conditions can be defined in the simple or advanced expression editor. They always return a boolean type.
Actions parameters can be defined by selecting fields or via the advanced expression editor. They return a specific data type according to their expression.
You can access the advanced expression editor in different ways:
When you create a data source condition, you can access the advanced editor by clicking on Advanced mode.
When you create a custom timer, the advanced editor will be directly displayed.
When you map action parameter, click on Advanced mode.
This screen allows you to manually write your expression.
On the left part of the screen are displayed available fields and functions:
An autocompletion mechanism displays contextual suggestions.
A syntax validation mechanism checks the integrity of your code. Errors are displayed on top of the editor.
Need for parameters when building conditions with the advanced expression editor
If you select a field from an external data source requiring a parameter to be called (see this page), a new tab appears on the right to let you specify this parameter. The parameter value can come from the events positioned in the journey or the Experience Platform data source (and not from other external data sources). For example, in a weather-related data source, a frequently used parameter will be “city”. As a result, you must select where you want to get this city parameter. Functions can also be applied to parameters to perform format changes or concatenations.
For more complex use cases, if you want to include the parameters of the data source in the main expression, you can define their values using the “params” keyword. See this page.