VictorRancesCode / flutter_dialogflow

Flutter package for makes it easy to integrate dialogflow and support dialogflow v2
Apache License 2.0
214 stars 73 forks source link

Where to get the Webhook Fulfilment response? #20

Open Prabhakaran2011 opened 4 years ago

Prabhakaran2011 commented 4 years ago

Am using v2 of dialogflow and trying to implement it with external webhook. How to integrate it with the app? Where can I find the fulfilment response rather than raw api response which just gives me a message "Webhook execution successful".

Following is my raw response :

{
  "responseId": "0xx6xxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxx-xxxxxxx",
  "queryResult": {
    "queryText": "I want to get the list of all records",
    "parameters": {
      "Entity": "ListofAllRecords"
    },
    "allRequiredParamsPresent": true,
    "fulfillmentText": "We have 25 records",
    "fulfillmentMessages": [
      {
        "text": {
          "text": [
            "We have 25 records"
          ]
        }
      }
    ],
    "intent": {
      "name": "projects/{project-id}/agent/intents/{id}",
      "displayName": "Records Detail"
    },
    "intentDetectionConfidence": 0.54289836,
    "diagnosticInfo": {
      "webhook_latency_ms": 89
    },
    "languageCode": "en"
  },
  "webhookStatus": {
    "message": "Webhook execution successful"
  }
}

Fulfilment response in DialogFlow WEBsite itself which calls the external socket.io webhook:

{ response: [ {id: 1, name: 'record1'}, {id: 2, name: 'record2'} ] }

How to access the second response using this plugin?

ericalderman-emilio commented 4 years ago

@Prabhakaran2011 Did you ever figure this out? I have the same issue - I get back only the responses that are hard-coded in DialogFlow, not the webhook responses. @VictorRancesCode can you help?