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.

New and edited variables appear in the draft status in your chatbot version. They must be published before you can use them in your content.

Create a variable

  1. Open the team and chatbot you want to work with.
  2. Click Variables in the left navigation.
  3. Click + Variable.
  4. 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.
  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.

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

Comments

0 comments

Article is closed for comments.