Skip to main content

Hi there,

I’ve created a webhook handling conversation.user.created and conversation.user.replied events. I’m using automation where the first step in the communication is the list of buttons, but also customer can send the message (instead of clicking one of buttons). Basically, I need to recognise in the webhook request, that the button was clicked OR the text was written by the customer. After a close inspection of the request data, both cases are identical.

 

Interesting fact is that, as I’m using “Unstable” version of API, when the buttons are used deeper in the workflow, webhook request contains value in conversation_parts?.conversation_partss0].metadata?.quick_reply_option_uuid when button is used, so I’m able to detect the click action. But for the first appearance of buttons in the workflow (on the first step) - metadata is not even present.

 

Thanks and regards,

Milan

Hi @Milan Karásek 👋 Jacques here from Support Engineering. Thanks for writing in!

To differentiate between a button click and a text message from a customer in webhook requests, you can, in fact, look for the quick_reply_option_uuid in the metadata of the conversation parts. So when a button is clicked, this UUID should be present, indicating that the user selected a quick reply option.

However, for the first step of the workflow, the metadata containing the quick_reply_option_uuid is not present, which is why you're unable to detect the click action at this stage. Unfortunately, this is a limitation when using the "Unstable" version of the API for the initial interaction in the workflow. For subsequent interactions where buttons are used, you should be able to detect button clicks using the quick_reply_option_uuid in the metadata.


Reply