Variables

Use variables to create placeholders that will store and re-use information from the user during a conversation flow. Variables are great for making your chatbot conversation more specific and personal to the user, and for reducing duplication in your content flow.

The value in a variable will be set individually for each user based on their interaction with your chatbot. If you want to create a placeholder for a value that will be the same for every user every time, such as a business name, use a constant.

Use variables to:

  • Personalise your chatbot flow by addressing the user by their name.
  • Make your conversation feel more specific by using information from your user in your messages and button text.
  • Reduce duplicate passages in your chatbot content by swapping in key information such as product or model names.
  • Direct the flow of a conversation using a logic condition or with a custom script.

Variables can be used in messages your chatbot sends, including text, buttons, Quick Replies, and script parameters, in logic conditions, and can be also set as the value of other variables using actions. You can also create short-lived variable values by setting an expiry time.

Plan your flow!

Variable values must be saved using actions or scripts in the conversation flow before they're used. If your chatbot tries to use a value before it has been set or after it has expired, and the variable does not have a default value, it will display an empty value. Make sure you test your variables before you publish.

You can:

 

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

Comments

0 comments

Article is closed for comments.