ResponseMessage

Response messages from an automated agent.

JSON representation
{

  // The following is a list of mutually exclusive fields. At most one of the
  // fields will be set in a response:
  "text": {
    object (Text)
  },
  "payload": {
    object
  },
  "liveAgentHandoff": {
    object (LiveAgentHandoff)
  },
  "endInteraction": {
    object (EndInteraction)
  },
  "mixedAudio": {
    object (MixedAudio)
  },
  "telephonyTransferCall": {
    object (TelephonyTransferCall)
  }
  // End of mutually exclusive fields.
}
Fields
Required. The rich response message. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response:
text

object (Text)

Returns a text response.

payload

object (Struct format)

Returns a response containing a custom, platform-specific payload.

liveAgentHandoff

object (LiveAgentHandoff)

Hands off conversation to a live agent.

endInteraction

object (EndInteraction)

A signal that indicates the interaction with the Dialogflow agent has ended.

mixedAudio

object (MixedAudio)

An audio response message composed of both the synthesized Dialogflow agent responses and the audios hosted in places known to the client.

telephonyTransferCall

object (TelephonyTransferCall)

A signal that the client should transfer the phone call connected to this agent to a third-party endpoint.

End of mutually exclusive fields.

Text

The text response message.

JSON representation
{
  "text": [
    string
  ]
}
Fields
text[]

string

A collection of text response variants. If multiple variants are defined, only one text response variant is returned at runtime.

LiveAgentHandoff

Indicates that the conversation should be handed off to a human agent.

Dialogflow only uses this to determine which conversations were handed off to a human agent for measurement purposes. What else to do with this signal is up to you and your handoff procedures.

You may set this, for example:

  • In the entry fulfillment of a Dialogflow CX Page if entering the page indicates something went extremely wrong in the conversation.
  • In a webhook response when you determine that the customer issue can only be handled by a human.
JSON representation
{
  "metadata": {
    object
  }
}
Fields
metadata

object (Struct format)

Custom metadata for your handoff procedure. Dialogflow doesn't impose any structure on this.

EndInteraction

This type has no fields.

Indicates that interaction with the Dialogflow agent has ended.

MixedAudio

Represents an audio message that is composed of both segments synthesized from the Dialogflow agent prompts and ones hosted externally at the specified URIs.

JSON representation
{
  "segments": [
    {
      object (Segment)
    }
  ]
}
Fields
segments[]

object (Segment)

Segments this audio response is composed of.

Segment

Represents one segment of audio.

JSON representation
{
  "allowPlaybackInterruption": boolean,

  // The following is a list of mutually exclusive fields. At most one of the
  // fields will be set in a response:
  "audio": string,
  "uri": string
  // End of mutually exclusive fields.
}
Fields
allowPlaybackInterruption

boolean

Whether the playback of this segment can be interrupted by the end user's speech and the client should then start the next Dialogflow request.

Content of the segment. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response:
audio

string (bytes format)

Raw audio synthesized from the Dialogflow agent's response using the output config specified in the request.

A base64-encoded string.

uri

string

Client-specific URI that points to an audio clip accessible to the client.

End of mutually exclusive fields.

TelephonyTransferCall

Represents the signal that telles the client to transfer the phone call connected to the agent to a third-party endpoint.

JSON representation
{

  // The following is a list of mutually exclusive fields. At most one of the
  // fields will be set in a response:
  "phoneNumber": string,
  "sipUri": string
  // End of mutually exclusive fields.
}
Fields
Endpoint to transfer the call to. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response:
phoneNumber

string

Transfer the call to a phone number in E.164 format.

sipUri

string

Transfer the call to a SIP endpoint.

End of mutually exclusive fields.