cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

You can save variables under button clicks if you're using a button step.

 

To save a variable under a button click:

  1. Add buttons to your flow.
  2. Click on Add a variable button to add a variable when a user clicks on this button within a conversation. 
  3. In this example, we will name the variable "pizza", under Variable, and assign it the Value "margherita".

 

Screenshot 2023-11-23 at 22.32.52.png

 4. Add another button and create a variable called "pizza" with the value of the pizza type.

 

Screenshot 2023-11-23 at 22.36.33.png

 5. Save your changes by clicking Save.

 

Screenshot 2023-11-23 at 22.37.22.png

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'.

 

Variable (1).gif

 6. After finishing editing your message, you can click Save.

 

Screenshot 2023-11-23 at 22.48.29.png

7. Test your bot. Your bot now remembers the customer's choice under a variable and can use it again!

 

Screenshot 2023-11-23 at 22.49.30.png

 

 

See also:

[New bot builder] Collect input

[New bot builder] Add buttons to your bot

[New bot builder] Variables and properties

 

Version history
Last update:
‎01-02-2024 04:27 AM
Updated by: