Step 1: Create the selection variable

A variable is a placeholder that you can use to customise part of a chatbot message without creating extra passages.

Variables are designed to keep a value for a chatbot user so it can be re-used in multiple passages. Each variable is created to hold one piece of information, like a name or option selection, and the value is specific to each chatbot user's conversation.

The variable's value is assigned by scripts or by actions that are triggered by the chatbot user's interaction with your chatbot. If the chatbot tries to use the variable before a value has been assigned, it will use a default value, or a blank value if there's no default.

In this guide, we've designed our conversation so there's no way the chatbot user can reach the passage where we're using the variable without first assigning a value. Since we know the variable will always have a value by the time we use it, we don't need to add a default value.

Let's create a variable for our user's selection:

  1. Click Create in the left navigation, then click Variables.
  2. Click + Variable.
  3. Type RateInquiry as the name for your variable.
    You'll use this name to add the variable to your chatbot content. Variable names should be short but descriptive, and can use letters, numbers, spaces, and punctuation. 
    You can change a variable's name later if you need to.
  4. Click Create.
  5. In the Description field, type Rate inquiry option the user selected.
  6. Click Save.

We've created a variable to capture our chatbot user's selection. Now, let's create the passage where we'll assign a value to it.

Was this article helpful?
0 out of 0 found this helpful