Dialogflow: Fulfillment Webhook Request

If you are building a Dialogflow Agent that uses Dialogflow Fulfillment extensively, you will find the data passed by the channel provider useful for your application. This data is passed from the IS-Messenger platform to Dialogflow using the originalDetectIntentRequest field.

Contact Object

To allow for more advanced use cases of the API, the Contact object is appended to the request by the platform. The cId item in the Contact object reflects the same value used in the Contacts API.

    "contact": {
        "cId": "60133386712",
        "contactId": 123456,
        "channelId": 7890
    }

Facebook

"originalDetectIntentRequest": {
    "payload": {
      "source": "facebook",
      "contact": {
        "cId": "3854977680200098",
        "contactId": "123456",
        "channelId": "7890"
      },
      "attachments": [
        {
          "type": "location",
          "payload": {
            "lat": 3.146642,
            "long": 101.695847,
            "address": "Kuala Lumpur City Center"
          }
        }
      ],
      "body": {
        "entry": [
          {
            "messaging": [
              {
                "recipient": {
                  "id": "177689475607202"
                },
                "message": {
                  "text": "hi",
                  "mid": "D3DJuA0YlOgDgOybFG1M2ZHoJg9hq9IAjMQE2ps6RIN4QJ25rNPMi"
                },
                "timestamp": 1564743055901,
                "sender": {
                  "id": "2254108171328398"
                }
              }
            ],
            "id": "177689475607202",
            "time": 1564743056313
          }
        ],
        "object": "page"
      }
    }
  }

LINE

SMS Twilio

SMS MessageBird

SMS Vonage

Telegram

Twitter

Viber

WeChat

Webchat

WhatsApp Business API

WhatsApp Cloud API

WhatsApp Twilio

WhatsApp MessageBird

WhatsApp Vonage

WhatsApp 360dialog v1

WhatsApp 360dialog v2

FAQ and Troubleshooting

Payload is not supported

Any unsupported payloads, e.g., Google Assistant cards, will not appear on the platform and will be ignored by IS-Messenger

Incorrect payload format

Payload formats are strict and any missing key values would result in undesirable results, i.e., not appearing on the platform, appearing incorrectly, etc.

Time latency more than 5 seconds

If you have a complex fulfillment criteria, e.g., connecting to some third-party service that does queries before returning a response, then you must consider the time latency as described in the Dialogflow documentation here. The response needs to be returned within 5 seconds or else the webhook fails and no response will be returned to DialogFlow and IS-Messenger

Last updated