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:

  1. In the Create a New Project window, select the project type.
  2. Enter the Project configuration details.
  3. In the Messaging Project window, select the Template using the drop-down menu.
  4. Click Next.
  5. In the Project Template window, Enter the Brand Name.
  6. Enter the Bot Name.
  7. Enter the Business Phone Number.
  8. Click Create

Set up or Update the Variable

  1. In a Flow Project, click Configuration.

  2. Click Variables.

  3. 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.
  4. 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.
  5. 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.
  6. 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:

  1. Drag a Trigger to the canvas, and add a trigger message.
  2. Drag a Reply(Text, Button, or Carousel) to the canvas and add a reply message.
  3. Add the parameter you updated in the Usage field while creating the Variable.
  4. Click Save.

To implement Text Variable in the Flow perform the following steps:

  1. Drag a Trigger to the canvas, and add a trigger message.
  2. Drag a Reply(Text, Button, or Carousel) to the canvas and add a reply message.
  3. Add the parameter you updated in the Usage field while creating the Variable.
  4. Click Save.

To implement the Delay Variable in the Flow, perform the following steps:

  1. Drag the Delay Trigger into the canvas.
  2. Select the Delay Variable.
  3. 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:

  1. In the Variables window, click the remove icon adjacent to the row.
  2. Click Save.
  3. 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.