Dialogflow CX Messenger richContent event call

214 views
Skip to first unread message

Kiran Upadhya

unread,
Feb 10, 2021, 1:16:04 AM2/10/21
to Dialogflow CX Edition users
I have created a simple agent in Dialogflow CX. In the Dialogflow Messenger When I enter the city name then it performs the webhook call and it will send the richContent like below.

```
{
  "fulfillment_response": {
      "messages": [{"payload": {"richContent": [
    [
      {
        "type": "list",
        "title": "Pin1",
        "event": {
          "name": "getpincode",
          "languageCode": "en",
          "parameters": {"pincode1": "123456",}
        }
      },
      {
        "type": "divider"
      },
      {
        "type": "list",
        "title": "Pin2",
        "event": {
          "name": "getpincode",
          "languageCode": "en",
          "parameters": {"pincode1": "456123",}
        }
      }
    ]
  ]}}],
      "merge_behavior": "APPEND"
    },
}

```
Here I have added an event handler named "getpincode".  In the event setup(getpincode) I have called webhook which returns the hospital name.

In the Dialogflow Messenger, it is now showing 2 pin codes option. I want to send the selected(clicked pin code) PIN code via webhook call, how can I do this?

Right now it is showing the pin code, but when I select the PIN code it is not performing a webhook call (i guess event getpincode is not triggered) WHY? (attached image for reference)

Is I'm missing anything.?

test.png

Please guide me.


Thank you,
Kiran




Reply all
Reply to author
Forward
0 new messages