Capturing Text Of Quick Reply

Is it possible to capture the text of the quick reply button when clicked on it ? Is there any specific event for it ?

Hi Shreyas,
In quick replies, we have a field called “button value”, whatever you give in the button value, you will be able to fetch that. Using button value, you can know which QR button is clicked.

Thanks for the response. I want to capture the value of the button clicked in Javascript. Do you have any specific event for it ? For example for Bot Close we have “bot-closed”. Do we have any similar event to get the text of the Button Clicked. If not event, is there any alternate way to capture the text in Javascript ? Thanks.

Yes, if you want to write code for it, store the response in some variable.
image
just after the QR node, attach a function, in that function use :-
let response = data.variables.menu

Thanks for the response. I want to do the same at the client side using JavaScript so that I can capture the button text ?

@ShreyasMahajan can you share some more context

Why do you need to pass it to client side. What kind of datapoint is it and will this constantly change?

Sure. I have a few buttons as shown in screenshot below :
Screenshot 2023-04-14 143025

Here is the use Case : I want to capture the text on the button. For Example : How to Preview Online Exam ? I am doing this to find out which is the most used/clicked button in my chatbot. The text on this buttons will not change constantly. It will remain the same.

@ShreyasMahajan
got it
You can measure this in 2 ways