Flow Variables
Flow Variables allow you to store and remember values during the processing of a Flow.
The sections on this page provide information about the various aspects of Flow Variables:
Concept
Flow Variables allow you to store and remember values during the processing of a Flow. A Flow Variable's value is assigned by a Listener, which listens to user input and picks up information depending on the TLML Syntax that the user has given it. In order to use a Listener and populate the value of a Flow Variable, it is first necessary to declare a Flow Variable with an empty value.
In Teneo, a Flow Variable may be of any type that Groovy (and Java) supports, such as: strings, Booleans, Maps (key/value pairs), Lists and numbers. It is also possible to populate and edit a variable with a script and you can even store the results of an Integration or a Sub-Flow in a variable. Flow Variables are only accessible in the Flow in which they are declared and anything you store in a Flow Variable will be forgotten once the Flow has finished processing and dropped from the flow stack. To use variables across Flows, you have to use Global Variables instead.
Naming conventions
Various variable naming conventions, such as snake_case or camelCase, exist for easier understanding within a team. Since the scripting language within the Teneo Platform is Groovy, variables make use of camelCase.
The naming conventions are the following:
- Variable names must be unique within the solution.
- Use lower camelCase.
- Use a short yet meaningful name which easily shows the purpose of its use to the reader.
Examples of valid variable names: user, userName, userFirstName, companyName, month, hour
To better understand camelCase, see Java Language Basics (last bullet point).
How To
Add
- Teneo Studio Desktop
- Teneo Studio Web
To add a Flow Variable, follow the below steps:
- Click the Flow tab to go to the backstage of the Flow.
- Select Variables.
- Click Add in the top right corner of the window.
- Now, write the variable name and the initial value. The initial value should still be defined even if it is empty, by using an empty string
" ". - Optionally, click Add description to write a description of the variable.
- Remember to Save the Flow to preserve the changes.
To add a Flow Variable in Teneo Studio Web, simply follow the below steps:
- In the Flow editor, click the Variable button available in the upper, left side of the Flow window.
- Click the Plus icon to add a new variable.
- Now, give the variable a name and write the initial value. The initial value should still be defined even if it is empty, by using an empty string
" ". - Optionally, click Add description to write a description of the variable.
- Click Confirm.
- Remember to Save the Flow to preserve the changes.
Edit
- Teneo Studio Desktop
- Teneo Studio Web
To edit a Flow Variable, follow the below steps:
- Click the Flow tab to go to the backstage of the Flow.
- Select Variables.
- Select the variable to edit and perform the edits in the text boxes.
- Remember to Save the Flow to preserve the changes.
To edit a Flow Variable, follow the below steps:
- Click the Variable button.
- Next to the name of the existing variable, click the pencil icon.
- Now, modify the wanted specifications.
- Click Confirm.
- Remember to Save the Flow to preserve the changes.
Delete
- Teneo Studio Desktop
- Teneo Studio Web
To delete a Flow Variable, follow the below steps:
- Click the Flow tab to go to the backstage of the Flow.
- Select Variables.
- Select the variable to delete and click Delete in the top right side of the window.
- Remember to Save the Flow to preserve the changes.
To delete a Flow Variable, follow the below steps:
- Click the Variable button.
- Next to the name of an existing variable, click the Recycle bin.
- Remember to Save the Flow to preserve the changes.
UI
- Teneo Studio Desktop
- Teneo Studio Web

The left side bar shows the number of Flow Variables in the selected Flow. Furthermore, clicking the 'Variables' section takes you to the backstage view of Variables, where you can add, edit and delete the them.

| Section | Description |
|---|---|
| Add | Adds a new Flow Variable. |
| Delete | Deletes the Flow Variable. |
| Search | Allows to search for the Variable by Variable Name or Reference. |
| Variable Name | Name of the Variable. |
| Initial Value | Set initial value of the Variable. Use empty string " " if value is not yet defined. |
| Add description | Optional field to add a description of the Variable. |

| Section | Description |
|---|---|
| Variables icon | Opens Flow Variables. |
| Name | Name of the Variable. |
| Add description | Optional field to add a description of the Variable. |
| Initial Value | Set initial value of the Variable. Use empty string " " if value is not defined in the beginning. |
| Confirm / Cancel | Confirm or cancel changes. |
Practical Examples
Create a Flow Variable
- Teneo Studio Desktop
- Teneo Studio Web
To create a Flow Variable, open a Flow in 'Edit' mode, go to the 'FLOW' tab and select 'Variables'. Click on 'Add' in the upper right corner, and provide a name and a default value. In the example below, we have two variables, flavor and size, which both have an empty string "" as the default value.

To create a Flow Variable, open a Flow in 'Edit' mode and select the Variable icon under the minimap. Click on 'Add' and provide a name and a default value. In the example below, we have the variable orderedCoffeeType, which has an empty string "" as the default value.
