Skip to content

Set up Merge fields

By default, the Merge field name is generated from the Step name, and the Merge field variable is set to Session type. So you do not need to provide any settings in this section unless you want to change this behavior.

Merge field settings

When the Step name is changed, the Merge field name is automatically changed accordingly so that it's easier to: a) understand what Step generates what Merge field and b) find one's way around the Flow tree. We recommend naming Steps corretly to have, in turn, a valid Merge field name. The Merge field name is required and will be validated. If you don't set the Merge field name, you won't be able to use the Step result, as the Step won't have a variable for storing data. If you use a non-existing Merge field, an error message will pop up notifying you of this issue:

To change the default Merge field settings, turn off the Generate merge field name from step label toggle and follow these steps:

  1. In the Merge field name, provide a name to declare a variable. We recommend using camelCase here. The naming convention is the same as for JavaScript variables: the Merge field name should be code-friendly, meaning no spaces, special characters, or dots. If there are any restricted characters, they will be replaced.

Note

The Flow execution fails if the Merge field name is already used throughout the Flow(s) and if its name has been changed in the original Step. In this case, the system will show a warning for every Step where the old Merge field name is set. We recommend going through all the Steps to ensure the Merge field name is updated.

  1. From the Merge field type dropdown, select one of the following options to specify the variable scope:
    • Session
    • Shared
    • Global
    • Thread

Note

Changing the Merge field type can break the Flow logic too. We recommend reviewing all Steps/connected Flows.

  1. From the Merge field expiration time dropdown, select the lifespan for the variable within the Merge field. This parameter is available only for Shared and Global variables.

Merge field names should be unique for all Steps. When you use the same Merge field name for more than one Step, the Step that is lower in the execution chain will override the value from the previous Step. Should this happen, the Designer shows a warning in the Step header and next to the Merge field. If there is an identical Merge field setting in different Flows, the message will display the link to the Flow.

Output data structure

The majority of Steps set their output data structure automatically. However, there are Steps, like the Execute JavaScript Code Step, where the output is unknown. Here, you can set the output data structure of the Step manually and thus define what information you would like to store in the Merge field.