A guide on how to use Variables in your chatbot
Variables can be used for capturing information, displaying dynamic content, and processing data in your chatbot.
You can store data in variables using the Store answer in variable
or a similar option that’s available for certain blocks in the builder. This option appears in the block editor.
Let’s take the Text input block as an example. This block allows users to enter text. To store the user’s response in a variable, click the dropdown below the Store answer in variable
option and select a variable.
You can display variables in messages using the {variableName}
syntax. The variable name should be enclosed in curly braces.
As an example, let’s you have a variable called first_name
and you want to greet the user by their name. Here’s how to do it:
Hello, {first_name}!
in the message field.{first_name}
with the value stored by the variable.Note that the values stored are on a per-conversation basis. This means that the value of a variable is unique to each conversation and is not shared across different conversations.
A guide on how to use Variables in your chatbot
Variables can be used for capturing information, displaying dynamic content, and processing data in your chatbot.
You can store data in variables using the Store answer in variable
or a similar option that’s available for certain blocks in the builder. This option appears in the block editor.
Let’s take the Text input block as an example. This block allows users to enter text. To store the user’s response in a variable, click the dropdown below the Store answer in variable
option and select a variable.
You can display variables in messages using the {variableName}
syntax. The variable name should be enclosed in curly braces.
As an example, let’s you have a variable called first_name
and you want to greet the user by their name. Here’s how to do it:
Hello, {first_name}!
in the message field.{first_name}
with the value stored by the variable.Note that the values stored are on a per-conversation basis. This means that the value of a variable is unique to each conversation and is not shared across different conversations.