How to send custom payloads with webhook response

Hi guys,

This might be a dumb question, but does anyone know how to send custom payloads (specifically chips) with the webhook response in dialogflowCX?

This is my current webhook response:

res = {
“fulfillmentResponse”: {
“messages”: [
{
“text”: {
“text”: [
“Reply Text”
]
}
}
]
},
}

Hi,

You will need to specify something like this under the payload property, you can use my library as reference: https://github.com/xavidop/dialogflow-cx-messenger-ts:

{
  "richContent": [
    [
      {
        "type": "chips",
        "options": [
          {
            "mode": "blocking",
            "text": "Chip 1",
            "image": {
              "rawUrl": "https://example.com/images/logo.png"
            },
            "anchor": {
              "href": "https://example.com"
            }
          },
          {
            "text": "Chip 2",
            "image": {
              "rawUrl": "https://example.com/images/logo.png"
            },
            "anchor": {
              "href": "https://example.com"
            }
          }
        ]
      }
    ]
  ]
}

Sorted! Thank you @xavidop