Skip to main content
Solved

Variable response button

  • November 29, 2024
  • 10 replies
  • 166 views

Ketu.ai

Hi, I am asking for help with such a situation, as you can see in the picture, if the user responds with variable text {{Type Contract}}} it is assigned an anonymous value. 
Is it possible that these values are also assigned with the help of buttons?

 

 

After the user clicks button Tip 1,  Tip 2, or Tip 3, assign the corresponding value to the variable {{Tip Contract}}:

Button 1: Tip 1
Button 2: Tip 2
Button 3: Tip 3

Assign the value as follows:

Button 1: {{Tip Contract}} = Tip 1
Button 2: {{Tip Contract}} = Tip 2
Button 3: {{Tip Contract}} = Tip 3

Best answer by Gustavo Boregio

@Ketu.ai the in-app preview does not set fields or evaluate conditions.

Test it out in Messenger by clicking the down arrow besides the ‘Preview’ button and selecting ‘Messenger’, and it’ll work ;)

10 replies

rodrigo_silvano
Forum|alt.badge.img+4
  • Manychat Community Moderator
  • November 29, 2024

Hey, ​@Ketu.ai 

 

You have two ways to do this:

 

First - add an action block after your buttons and save the answer in a user field.

 

Second: When creating a data collection block, save the response to a user field.

 

Let me know if it helps 🙌🏼


Ketu.ai
  • Author
  • Up-and-Comer
  • November 29, 2024

Please help me set "Last response" based on the buttons typed.


Gustavo Boregio
Forum|alt.badge.img+6
  • Manychat Community Moderator
  • November 29, 2024

Click on the Curly Brackets { } and select ‘Last Text Input’


Ketu.ai
  • Author
  • Up-and-Comer
  • November 29, 2024

Click on the Curly Brackets { } and select ‘Last Text Input’

unfortunately this version doesn't work


Gustavo Boregio
Forum|alt.badge.img+6
  • Manychat Community Moderator
  • November 29, 2024

If you can’t get it to work, create 3 actions, one for each button, and set the values separately.


Ketu.ai
  • Author
  • Up-and-Comer
  • November 29, 2024

If you can’t get it to work, create 3 actions, one for each button, and set the values separately.

if I go this route, after I collect all the data after the webhook it shows me all three variables as being accessed


I somehow have to set a single answer (by pressing one of three buttons)


Gustavo Boregio
Forum|alt.badge.img+6
  • Manychat Community Moderator
  • November 29, 2024

@Ketu.ai use only one variable (something like “option selected”), and set it with the value of the button click (Value 1, Value 2 or Value 3).

Like this:

 


Ketu.ai
  • Author
  • Up-and-Comer
  • December 4, 2024
should work, but gives this answer

 


Gustavo Boregio
Forum|alt.badge.img+6
  • Manychat Community Moderator
  • Answer
  • December 4, 2024

@Ketu.ai the in-app preview does not set fields or evaluate conditions.

Test it out in Messenger by clicking the down arrow besides the ‘Preview’ button and selecting ‘Messenger’, and it’ll work ;)


Ketu.ai
  • Author
  • Up-and-Comer
  • December 4, 2024

it worked, thanks