Home > Back-end >  Dialogflow Messenger Custom Payload Quick Respose Issue - Clicked input not understood/matched in Di
Dialogflow Messenger Custom Payload Quick Respose Issue - Clicked input not understood/matched in Di

Time:07-12

I'm trying to add quick responses to allow users to click rather than type into Dialogflow Messenger I have used:

    {
  "richContent": [
    [
      {
        "event": {
          "parameters": {},
          "languageCode": "en",
          "name": "yes"
        },
        "type": "button",
        "text": "Yes",
        "link": "",
        "icon": {
          "type": "chevron_right",
          "color": "#FF9800"
        }
      },
      {
        "link": "",
        "type": "button",
        "event": {
          "parameters": {},
          "name": "no",
          "languageCode": "en"
        },
        "text": "No",
        "icon": {
          "type": "chevron_right",
          "color": "#FF9800"
        }
      }
    ]
  ]
}

This generates the clickable links all OK however when you actually click 'yes' or 'no' in messenger, Dialogueflow doesn't understand the input see screenshot 1: Screen shot of response

Whereas typing in 'yes' or 'no' works as expected see screenshot 2: works when keyed in text

Can anyone help me with this?

CodePudding user response:

I have also tested the rich response messages using list and button response types on Dialogflow Messenger using custom payload, and I'm also facing the same problem. If I click the button/list, it triggers a default fallback intent response. So, It seems only possible with webhook calls that manage the event and retrieve text.

I was unable to find any direct demonstration of how to call a webhook for an event triggered on a button click and then return a text response. Already, a feature request was raised similar to your issue on the Google Cloud enter image description here

For your requirement, you can try using the enter image description here

Once you click the Yes/No suggestion chip, you can see the selected chip as input and response for it in the below image.

enter image description here

Let me know if it helps.

  • Related