Flow Project Variables
Variables enable the Conversational Designers to manage repeatedly-used values within a Flow Project. Variables are editable to avoid duplicate effort. The central control of the variables makes it easier to add and manage multiple values. You can configure variables for bot names, branded terminology, timers, etc. You set variables for any new or existing projects. Each variable is a reusable element applied to your bot project.
Supported variable types are Text, Delay, and Timer.
Text Variables
Text variables can be used to replace the brand name instances throughout the Project. For example, when a Conversational Designer creates a Flow project for their company, they might use the brand name in many places throughout their project. Text Variable enables you to consistently re-use these without having to change them manually throughout the bot.
Timer Variables
Using the Timer field, you can change the timer for any of the triggers. For Example, let's say most of your bot Flows have a 15-minute Timer with an Event Reply which links to a Do you still need help? or Re-engage the Flow option. Without using the Variables, If you wish to change the timer to 10 mins, you will have to change the timer 1-by-1 manually. This could increase the user’s effort and cause inconsistency while updating the timer manually.
Delay Variables
Delay Variables work similarly to Timer Variables. For Example, after creating the project and when the bot is Live if you realize that the delay time is too short for the customers to engage in the first trigger message, you can change the Delay Variable in the Flow Variables section.
Project for Variables
To access the Flow variables:
- In the Create a New Project window, select the project type.
- Enter the Project configuration details.
- In the Messaging Project window, select the Template using the drop-down menu.
- Click Next.
- In the Project Template window, Enter the Brand Name.
- Enter the Bot Name.
- Enter the Business Phone Number.
- Click Create
Set up or Update the Variable
-
In a Flow Project, click Configuration.
-
Click Variables.
-
For the Timer variables:
In the VARIABLES window, update the following details:- For the Text Variables:
- Enter the variable Name with your brand name.
- Enter the Usage with the parameter.
- Enter the Value of the variable.
-
For the Timer Variables:
- Enter the variable Name with your brand name.
- Enter the time Interval.
- Select the time Unit from the drop-down menu.
-
For the Delay Variables:
- Enter the variable Name with your brand name
- Enter the time Interval.
- Select the time Unit from the drop-down menu.
-
Click Save.
In the Flow step, specify the brand name similar to any other parameter. With this, you can centrally manage the text variable in the Project from a single field.
Using Variables in Flow
To implement Text Variable in the Flow perform the following steps:
- Drag a Trigger to the canvas, and add a trigger message.
- Drag a Reply(Text, Button, or Carousel) to the canvas and add a reply message.
- Add the parameter you updated in the Usage field while creating the Variable.
- Click Save.
To implement Text Variable in the Flow perform the following steps:
- Drag a Trigger to the canvas, and add a trigger message.
- Drag a Reply(Text, Button, or Carousel) to the canvas and add a reply message.
- Add the parameter you updated in the Usage field while creating the Variable.
- Click Save.
To implement the Delay Variable in the Flow, perform the following steps:
- Drag the Delay Trigger into the canvas.
- Select the Delay Variable.
- Click Save.
After setting up the Variables for the Project, you can implement the Variables throughout the Project.
Deleting Variables will permanently remove the variable and details from the project:
- In the Variables window, click the remove icon adjacent to the row.
- Click Save.
- Setting Variables from Code Actions
You can also set up Variables using the Code Actions.
Example code:
async payload => {
try {
return {
params: {
...payload.params,
var_brand_name: [{
value: "Phone",
match: "Phone"
}]
}
}
} catch(err) {
console.error(err)
}
}
Import and Export Variables
While importing or exporting a Flow project, Variables are imported or exported along with the project file and Versions.
Updated about 1 year ago