Understand how to use variables to store and reuse user input for a customized agent experience in Release0. Learn to create, update, and display variables in your chatbot flows, including handling sensitive information securely.
Variables act as placeholders for content that can be reused throughout your Agent. Understanding how to utilize variables is essential for creating a truly customized user experience.
To store user input in a variable, configure your User Input block to save the response. This variable can then be reused elsewhere in your Agent Dialog. For example:
You can also create, use or update variables in most Release0 blocks. For example if you agent requests the user to input his/her email address, you can enter the Email block and in its configuration, you can type Email in the “Save the answer in a variable”. This will create a new variable called Email and save the user’s input in it.
Once declared, you can use variables anywhere in your Agent by referencing them with the following syntax:
Here, “My variable” is the name of the variable.
If a variable named FirstName
contains “John”, you can display it in a dialog like this:
This will render as:
There are cases where you might want to store sensitive information, such as passwords or personal identifiers. To ensure these variables are not stored in the Submission section, prefix the variable name with secure_
. For example:
This variable will not be saved in the Submission table, but you can still use it in your flow logic.
It can be used incombination with the Text input block with Password enabled to collect sensitive information securely.
Variables can also be formatted directly when referenced. Using JavaScript, you can perform transformations inline. For example:
Convert to Uppercase:
If My variable
contains “John”, the output will be “JOHN”.
Accessing List Items:
{{={{My variable}}[0]=}}
or {{={{My variable}}.at(0)=}}
{{={{My variable}}.at(-1)=}}
Note: Wrapping the syntax with
{{= ... =}}
evaluates the content as JavaScript.
You can manage variables by accessing the Variables Panel in the editor (top-right corner). In this panel, you can:
Variables saved to the results will appear in the Submission table under dedicated columns.
You can prefill variables by passing initial values in the URL when launching your Agent. For example:
Given these variables:
Email
First name
You can initialize them like this:
Note: Replace spaces in variable names with
%20
when using URLs.
To prefill variables using the embed library:
Tip: Surround variable names containing spaces with quotes.
Variables do not need to be visible to the user. Hidden variables can be used internally for tracking session details such as User ID
or utm_source
.
To make a variable hidden:
These values will still appear in the Submission table for analysis.
Variables can contain:
string
)string[]
)Warning: Non-text content (e.g., objects or numbers) will be automatically converted to text.
To save complex data (e.g., objects), use JSON.stringify
:
Then, parse it back when using the variable:
This ensures clean and meaningful variable usage.
Before deploying your Agent:
Understand how to use variables to store and reuse user input for a customized agent experience in Release0. Learn to create, update, and display variables in your chatbot flows, including handling sensitive information securely.
Variables act as placeholders for content that can be reused throughout your Agent. Understanding how to utilize variables is essential for creating a truly customized user experience.
To store user input in a variable, configure your User Input block to save the response. This variable can then be reused elsewhere in your Agent Dialog. For example:
You can also create, use or update variables in most Release0 blocks. For example if you agent requests the user to input his/her email address, you can enter the Email block and in its configuration, you can type Email in the “Save the answer in a variable”. This will create a new variable called Email and save the user’s input in it.
Once declared, you can use variables anywhere in your Agent by referencing them with the following syntax:
Here, “My variable” is the name of the variable.
If a variable named FirstName
contains “John”, you can display it in a dialog like this:
This will render as:
There are cases where you might want to store sensitive information, such as passwords or personal identifiers. To ensure these variables are not stored in the Submission section, prefix the variable name with secure_
. For example:
This variable will not be saved in the Submission table, but you can still use it in your flow logic.
It can be used incombination with the Text input block with Password enabled to collect sensitive information securely.
Variables can also be formatted directly when referenced. Using JavaScript, you can perform transformations inline. For example:
Convert to Uppercase:
If My variable
contains “John”, the output will be “JOHN”.
Accessing List Items:
{{={{My variable}}[0]=}}
or {{={{My variable}}.at(0)=}}
{{={{My variable}}.at(-1)=}}
Note: Wrapping the syntax with
{{= ... =}}
evaluates the content as JavaScript.
You can manage variables by accessing the Variables Panel in the editor (top-right corner). In this panel, you can:
Variables saved to the results will appear in the Submission table under dedicated columns.
You can prefill variables by passing initial values in the URL when launching your Agent. For example:
Given these variables:
Email
First name
You can initialize them like this:
Note: Replace spaces in variable names with
%20
when using URLs.
To prefill variables using the embed library:
Tip: Surround variable names containing spaces with quotes.
Variables do not need to be visible to the user. Hidden variables can be used internally for tracking session details such as User ID
or utm_source
.
To make a variable hidden:
These values will still appear in the Submission table for analysis.
Variables can contain:
string
)string[]
)Warning: Non-text content (e.g., objects or numbers) will be automatically converted to text.
To save complex data (e.g., objects), use JSON.stringify
:
Then, parse it back when using the variable:
This ensures clean and meaningful variable usage.
Before deploying your Agent: