Variables can be used in multiple locations in a Studio flow to collect data points that will be used to make routing decisions.
Each component may expose “step variables” or data points from which the variables can be created when clicking on the dropdown and then on Create variable:
These variables can later be used to initialize or update some flow variables.
For example, the Incoming Call component exposes 7 data points (contact details, source, and dialed phone numbers).
Another example is the Standard IVR component, which collects the keys pressed by the caller and populates the "selection" variable; it also populates the “exit_name” variable, whose value retrieves the name of the exit assigned to the selected key press.
These variables can then be used in other components.
How to write the name of a new variable:
• Do not use spaces. You can use an underscore and numbers instead.
• Write all letters in lowercase.
• Do not use accents, apostrophes, or other special characters.
• Add an underscore before the number, if you are using letters and numbers to name a context variable.
When used in a text field, the syntax to reference a variable is:
Using the example above, the syntax would be:
For example, you can use a variable in the Play Audio component to play a customized greeting message.
The variable can be initialized from the initial component (Incoming Call) or via a data dip in your CRM system.
Please keep in mind that an underscore should be placed before the number in case you are using letters and numbers to name a variable that will later need to be referenced (in a query, for example).
Updated 8 months ago