You can save variables under button clicks if you're using a button step.
To save a variable under a button click:
- Add buttons to your flow.
- Click on Add a variable button to add a variable when a user clicks on this button within a conversation.
- In this example, we will name the variable "pizza", under Variable, and assign it the Value "margherita".
4. Add another button and create a variable called "pizza" with the value of the pizza type.
5. Save your changes by clicking Save.
6. Open the following block in your builder. In this case, we will edit the 'margherita chosen' block. Add a step and select Text. Then, re-use your variable by typing '{' or clicking the ‘{}’ button on the bottom left of the Text Message input field and selecting the created variable 'pizza'.
6. After finishing editing your message, you can click Save.
7. Test your bot. Your bot now remembers the customer's choice under a variable and can use it again!
See also:
[New bot builder] Collect input
[New bot builder] Add buttons to your bot
[New bot builder] Variables and properties
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content