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 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 user's conversation.

The variable's value is assigned by actions that are triggered by the 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 flow so there's no way the 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. Open the Create section of the left-hand navigation.
  2. Click Variables.
  3. Click + Variable.
  4. 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.
  5. Click Create.
  6. In the Description field, type Rate inquiry option the user selected.
  7. Click Save.

We've created a variable to capture our 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

Comments

0 comments

Article is closed for comments.