dialogflow webhook not considering payload using fulfillmentText, fulfillmentMessages

FULFILLMENT REQUEST

{
  "responseId": "4955f972-058c-44c2-a9c6-fe2c1d846fcd",
  "queryResult": {
    "queryText": "dsnaf",
    "action": "intentNotMatched",
    "parameters": {},
    "allRequiredParamsPresent": true,
    "fulfillmentText": "I think I may have misunderstood your last statement.",
    "fulfillmentMessages": [
      {
        "text": {
          "text": [
            "I'm afraid I don't understand."
          ]
        }
      }
    ],
    "outputContexts": [
      {
        "name": "****",
        "lifespanCount": 1
      }
    ],
    "intent": {
      "name": "****",
      "displayName": "Default Fallback Intent",
      "isFallback": true
    },
    "intentDetectionConfidence": 1,
    "languageCode": "en"
  },
  "originalDetectIntentRequest": {
    "payload": {}
  },
  "session": "****"
}

FULFILLMENT RESPONSE

{
  "payload": {
    "google": {
      "expectUserResponse": true,
      "richResponse": {
        "items": [
          {
            "simpleResponse": {
              "textToSpeech": "I'm sorry. I didn't quite grasp what you just said."
            }
          }
        ]
      },
      "userStorage": "{\"data\":{}}"
    }
  },
  "outputContexts": [
    {
      "name": "***",
      "lifespanCount": 99,
      "parameters": {
        "data": "{}"
      }
    }
  ]
}

RAW API RESPONSE

{
  "responseId": "4955f972-058c-44c2-a9c6-fe2c1d846fcd",
  "queryResult": {
    "queryText": "dsnaf",
    "action": "intentNotMatched",
    "parameters": {},
    "allRequiredParamsPresent": true,
    "fulfillmentMessages": [
      {
        "text": {
          "text": [
            "I'm afraid I don't understand."
          ]
        }
      }
    ],
    "webhookPayload": {
      "google": {
        "userStorage": "{\"data\":{}}",
        "richResponse": {
          "items": [
            {
              "simpleResponse": {
                "textToSpeech": "I'm sorry. I didn't quite grasp what you just said."
              }
            }
          ]
        },
        "expectUserResponse": true
      }
    },
    "outputContexts": [
      {
        "name": "*****",
        "lifespanCount": 99,
        "parameters": {
          "data": "{}"
        }
      },
      {
        "name": "******",
        "lifespanCount": 1
      }
    ],
    "intent": {
      "name": "****",
      "displayName": "Default Fallback Intent",
      "isFallback": true
    },
    "intentDetectionConfidence": 1,
    "diagnosticInfo": {
      "webhook_latency_ms": 286
    },
    "languageCode": "en"
  },
  "webhookStatus": {
    "message": "Webhook execution successful"
  }
}

Google Assistance response

USER SAYS dsnaf

DEFAULT RESPONSE I'm afraid I don't understand.

CONTEXTS

_actions_on_google,initial_chat

INTENT Default Fallback Intent

IN Google Assistance response is default fulfillmentText instead payload google richresponse

Upvotes: 2

Views: 707

Answers (1)

techpeace
techpeace

Reputation: 2644

Where are you testing this? If you're in the test console, it's always going to show you the simple text response. You'll need to specifically select Google Assistant in the test console to see the rich response for that platform:

example animation

Upvotes: 1

Related Questions