- [JSON representation](https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3/WebhookRequest#SCHEMA_REPRESENTATION)
- [FulfillmentInfo](https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3/WebhookRequest#FulfillmentInfo)
  - [JSON representation](https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3/WebhookRequest#FulfillmentInfo.SCHEMA_REPRESENTATION)
- [IntentInfo](https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3/WebhookRequest#IntentInfo)
  - [JSON representation](https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3/WebhookRequest#IntentInfo.SCHEMA_REPRESENTATION)
- [IntentParameterValue](https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3/WebhookRequest#IntentParameterValue)
  - [JSON representation](https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3/WebhookRequest#IntentParameterValue.SCHEMA_REPRESENTATION)
- [SentimentAnalysisResult](https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3/WebhookRequest#SentimentAnalysisResult)
  - [JSON representation](https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3/WebhookRequest#SentimentAnalysisResult.SCHEMA_REPRESENTATION)

The request message for a webhook call. The request is sent as a JSON object and the field names will be presented in camel cases.

You may see undocumented fields in an actual request. These fields are used internally by Dialogflow and should be ignored.

| JSON representation |
|---|
| ``` { "detectIntentResponseId": string, "languageCode": string, "fulfillmentInfo": { object (`https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3/WebhookRequest#FulfillmentInfo`) }, "intentInfo": { object (`https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3/WebhookRequest#IntentInfo`) }, "pageInfo": { object (`https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3/PageInfo`) }, "sessionInfo": { object (`https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3/SessionInfo`) }, "messages": [ { object (`https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3/Fulfillment#ResponseMessage`) } ], "payload": { object }, "sentimentAnalysisResult": { object (`https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3/WebhookRequest#SentimentAnalysisResult`) }, "languageInfo": { object (`https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3/LanguageInfo`) }, // The following is a list of mutually exclusive fields. At most one of the // fields will be set in a response: "text": string, "triggerIntent": string, "transcript": string, "triggerEvent": string, "dtmfDigits": string // End of mutually exclusive fields. } ``` |

| Fields ||
|---|---|
| `detectIntentResponseId` | `string` Always present. The unique identifier of the `https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3/DetectIntentResponse` that will be returned to the API caller. |
| `languageCode` | `string` The language code specified in the \[original request\]\[QueryInput.language_code\]. |
| `fulfillmentInfo` | ``object (`https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3/WebhookRequest#FulfillmentInfo`)`` Always present. Information about the fulfillment that triggered this webhook call. |
| `intentInfo` | ``object (`https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3/WebhookRequest#IntentInfo`)`` Information about the last matched intent. |
| `pageInfo` | ``object (`https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3/PageInfo`)`` Information about page status. |
| `sessionInfo` | ``object (`https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3/SessionInfo`)`` Information about session status. |
| `messages[]` | ``object (`https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3/Fulfillment#ResponseMessage`)`` The list of rich message responses to present to the user. Webhook can choose to append or replace this list in `https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3/WebhookResponse#FIELDS.fulfillment_response`; |
| `payload` | ``object (`https://protobuf.dev/reference/protobuf/google.protobuf#struct` format)`` Custom data set in `https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3/QueryParameters#FIELDS.payload`. |
| `sentimentAnalysisResult` | ``object (`https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3/WebhookRequest#SentimentAnalysisResult`)`` The sentiment analysis result of the current user request. The field is filled when sentiment analysis is configured to be enabled for the request. |
| `languageInfo` | ``object (`https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3/LanguageInfo`)`` Information about the language of the request. |
| The original conversational query. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: ||
| `text` | `string` If `https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3/ConversationTurn#TextInput` was provided as input, this field will contain a copy of the text. |
| `triggerIntent` | `string` If an `https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3/ConversationTurn#IntentInput` was provided as input, this field will contain a copy of the intent identifier. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/intents/<IntentID>`. |
| `transcript` | `string` If `https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3/ConversationTurn#AudioInput` was provided as input, this field will contain the transcript for the audio. |
| `triggerEvent` | `string` If an `https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3/ConversationTurn#EventInput` was provided as input, this field will contain the name of the event. |
| `dtmfDigits` | `string` If `https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3/ConversationTurn#DtmfInput` was provided as input, this field will contain the DTMF digits. |
| End of mutually exclusive fields. ||

## FulfillmentInfo

Represents fulfillment information communicated to the webhook.

| JSON representation |
|---|
| ``` { "tag": string } ``` |

| Fields ||
|---|---|
| `tag` | `string` Always present. The value of the `https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3/Fulfillment#FIELDS.tag` field will be populated in this field by Dialogflow when the associated webhook is called. The tag is typically used by the webhook service to identify which fulfillment is being called, but it could be used for other purposes. |

## IntentInfo

Represents intent information communicated to the webhook.

| JSON representation |
|---|
| ``` { "lastMatchedIntent": string, "displayName": string, "parameters": { string: { object (`https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3/WebhookRequest#IntentParameterValue`) }, ... }, "confidence": number } ``` |

| Fields ||
|---|---|
| `lastMatchedIntent` | `string` Always present. The unique identifier of the last matched `https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3/projects.locations.agents.intents#Intent`. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/intents/<IntentID>`. |
| `displayName` | `string` Always present. The display name of the last matched `https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3/projects.locations.agents.intents#Intent`. |
| `parameters` | ``map (key: string, value: object (`https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3/WebhookRequest#IntentParameterValue`))`` Parameters identified as a result of intent matching. This is a map of the name of the identified parameter to the value of the parameter identified from the user's utterance. All parameters defined in the matched intent that are identified will be surfaced here. An object containing a list of `"key": value` pairs. Example: `{ "name": "wrench", "mass": "1.3kg", "count": "3" }`. |
| `confidence` | `number` The confidence of the matched intent. Values range from 0.0 (completely uncertain) to 1.0 (completely certain). |

## IntentParameterValue

Represents a value for an intent parameter.

| JSON representation |
|---|
| ``` { "originalValue": string, "resolvedValue": value } ``` |

| Fields ||
|---|---|
| `originalValue` | `string` Always present. Original text value extracted from user utterance. |
| `resolvedValue` | ``value (`https://protobuf.dev/reference/protobuf/google.protobuf#value` format)`` Always present. Structured value for the parameter extracted from user utterance. |

## SentimentAnalysisResult

Represents the result of sentiment analysis.

| JSON representation |
|---|
| ``` { "score": number, "magnitude": number } ``` |

| Fields ||
|---|---|
| `score` | `number` Sentiment score between -1.0 (negative sentiment) and 1.0 (positive sentiment). |
| `magnitude` | `number` A non-negative number in the \[0, +inf) range, which represents the absolute magnitude of sentiment, regardless of score (positive or negative). |