Create a variable

Create a variable to be a placeholder for information you receive from the user during a conversation, such as a product they're enquiring about or a preference they've expressed. In your chatbot content, you'll see the variable name in a placeholder chip, but when your chatbot sends its message content, it  replaces the chip with the value that has been set for the user during the conversation flow.

Plan your flow!

Variable values must be set in the conversation flow before they're used. If your chatbot tries to use a value before it has been set, it will display an empty value. You can set a default value to use instead.

Create a variable

  1. Click Create in the left navigation, then click Variables.
  2. Click + Variable.
  3. Type a Name for your variable.
    You'll use this name to add the variable to your chatbot content. Keep it short but descriptive. You can change this name later if you need to.
  4. Optionally, select a group for the variable.
  5. Click Create.
  6. Add a Description of the information the variable will store to help other content creators use your variable correctly.
  7. If you want to create a default value to use when this variable has not been set:
    1. Select This variable requires a default value.
    2. In the Value field, type the default value to use.
  8. Click Save.

You can test your new variable in TestBot immediately. New content is created as a draft and must be published before it appears in your live chatbot.

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