WebhookRequest

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 (FulfillmentInfo)
  },
  "intentInfo": {
    object (IntentInfo)
  },
  "pageInfo": {
    object (PageInfo)
  },
  "sessionInfo": {
    object (SessionInfo)
  },
  "messages": [
    {
      object (ResponseMessage)
    }
  ],
  "payload": {
    object
  },
  "sentimentAnalysisResult": {
    object (SentimentAnalysisResult)
  },
  "languageInfo": {
    object (LanguageInfo)
  },

  // Union field query can be only one of the following:
  "text": string,
  "triggerIntent": string,
  "transcript": string,
  "triggerEvent": string,
  "dtmfDigits": string
  // End of list of possible types for union field query.
}
Fields
detectIntentResponseId

string

Always present. The unique identifier of the DetectIntentResponse that will be returned to the API caller.

languageCode

string

The language code specified in the [original request][QueryInput.language_code].

fulfillmentInfo

object (FulfillmentInfo)

Always present. Information about the fulfillment that triggered this webhook call.

intentInfo

object (IntentInfo)

Information about the last matched intent.

pageInfo

object (PageInfo)

Information about page status.

sessionInfo

object (SessionInfo)

Information about session status.

messages[]

object (ResponseMessage)

The list of rich message responses to present to the user. Webhook can choose to append or replace this list in WebhookResponse.fulfillment_response;

payload

object (Struct format)

Custom data set in QueryParameters.payload.

sentimentAnalysisResult

object (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 (LanguageInfo)

Information about the language of the request.

Union field query. The original conversational query. query can be only one of the following:
text

string

If natural language text was provided as input, this field will contain a copy of the text.

triggerIntent

string

If an intent 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 natural language speech audio was provided as input, this field will contain the transcript for the audio.

triggerEvent

string

If an event was provided as input, this field will contain the name of the event.

dtmfDigits

string

If DTMF was provided as input, this field will contain the DTMF digits.

FulfillmentInfo

Represents fulfillment information communicated to the webhook.

JSON representation
{
  "tag": string
}
Fields
tag

string

Always present. The value of the Fulfillment.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 (IntentParameterValue)
    },
    ...
  },
  "confidence": number
}
Fields
lastMatchedIntent

string

Always present. The unique identifier of the last matched intent. Format: projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/intents/<IntentID>.

displayName

string

Always present. The display name of the last matched intent.

parameters

map (key: string, value: object (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 (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).