Include variables in your WhatsApp flow
If you’d like to reference a variable that is obtained from a step within the flow, such as a user response or a validation status, you can do so in our flow builder with the following notation:
{{.<verification_ID>.<variable_name>.value}}
In order to get the content that is inside of the brackets:
- Select the open question box in the Truora dashboard, and automatically this is going to open a panel on the right side, you may find down below a button such as the one in the red rectangle:
- This button will copy the content to your clipboard, and you just need to paste it or CTRL+V inside of either the frequent block or advanced block boxes. The text editor will automatically detect the variable reference and will show a pill with the block title.
- Save, publish and test your flow. The image below is an example of how it would work on WhatsApp:
Include variables in a conditional box
- Drag the Conditional box in the Truora dashboard, then click on it, and automatically this is going to open a panel on the right side.
- Drop down the default condition, let’s modify it!
- In the If this… field select a variable option.
- Paste the value of the variable copied in the field called With value (in this case is not necessary the brackets and the beginning dot).
- In the Has the following condition field could go ===, <, >, >=, <= and !==.
- In the Fulfills field you have tu put a possible value that will have your open question box.
- In the Add condition option you create until 9 conditions.
- Finally, test your flow!
Use the variables of an outbound message in the flow
You can use the variables of an outbound message inside a flow as inputs of the integration with API external connection or any question block.
To call the variables inside the stream use the following syntax {{.start.<variable_name>.value}}
. For the example of the previous image you can call the variable name in the following way {{.start.nombre.value}}.