Class WebhookResponse (0.8.0)

The response message for a webhook call.

This response is validated by the Dialogflow server. If validation fails, an error will be returned in the [QueryResult.diagnostic_info][google.cloud.dialogflow.v2.QueryResult.diagnostic_info] field. Setting JSON fields to an empty value with the wrong type is a common error. To avoid this error:

  • Use "" for empty strings
  • Use {} or null for empty objects
  • Use [] or null for empty arrays

For more information, see the Protocol Buffers Language Guide <https://developers.google.com/protocol-buffers/docs/proto3#json>__.

Optional. The collection of rich messages to present to the user. This value is passed directly to QueryResult.fulfillment_messages.

Optional. This value is passed directly to QueryResult.webhook_payload. See the related fulfillment_messages[i].payload field, which may be used as an alternative to this field. This field can be used for Actions on Google responses. It should have a structure similar to the JSON message shown here. For more information, see Actions on Google Webhook Format <https://developers.google.com/actions/dialogflow/webhook>__ .. raw:: html

{      "google": {
   "expectUserResponse": true,        "richResponse": {
   "items": [            {              "simpleResponse": {
   "textToSpeech": "this is a simple response"              }
   }          ]        }      }    }

Optional. Makes the platform immediately invoke another DetectIntent call internally with the specified event as input. When this field is set, Dialogflow ignores the fulfillment_text, fulfillment_messages, and payload fields.