- JSON representation
- ConversationSuccess
- OutputAudioText
- LiveAgentHandoff
- EndInteraction
- PlayAudio
- MixedAudio
- Segment
- TelephonyTransferCall
- KnowledgeInfoCard
- ToolCall
Represents a response message that can be returned by a conversational agent.
Response messages are also used for output audio synthesis. The approach is as follows:
- If at least one OutputAudioText response is present, then all OutputAudioText responses are linearly concatenated, and the result is used for output audio synthesis.
- If the OutputAudioText responses are a mixture of text and SSML, then the concatenated result is treated as SSML; otherwise, the result is treated as either text or SSML as appropriate. The agent designer should ideally use either text or SSML consistently throughout the bot design.
- Otherwise, all Text responses are linearly concatenated, and the result is used for output audio synthesis.
This approach allows for more sophisticated user experience scenarios, where the text displayed to the user may differ from what is heard.
JSON representation |
---|
{ "channel": string, // Union field |
Fields | |
---|---|
channel |
The channel which the response is associated with. Clients can specify the channel via |
Union field message . Required. The rich response message. message can be only one of the following: |
|
text |
Returns a text response. |
payload |
Returns a response containing a custom, platform-specific payload. |
conversation |
Indicates that the conversation succeeded. |
output |
A text or ssml response that is preferentially used for TTS output audio synthesis, as described in the comment on the ResponseMessage message. |
live |
Hands off conversation to a human agent. |
end |
Output only. A signal that indicates the interaction with the Dialogflow agent has ended. This message is generated by Dialogflow only when the conversation reaches It's guaranteed that there is at most one such message in each response. |
play |
Signal that the client should play an audio clip hosted at a client-specific URI. Dialogflow uses this to construct |
mixed |
Output only. An audio response message composed of both the synthesized Dialogflow agent responses and responses defined via |
telephony |
A signal that the client should transfer the phone call connected to this agent to a third-party endpoint. |
knowledge |
Represents info card for knowledge answers, to be better rendered in Dialogflow Messenger. |
tool |
Returns the definition of a tool call that should be executed by the client. |
ConversationSuccess
Indicates that the conversation succeeded, i.e., the bot handled the issue that the customer talked to it about.
Dialogflow only uses this to determine which conversations should be counted as successful and doesn't process the metadata in this message in any way. Note that Dialogflow also considers conversations that get to the conversation end page as successful even if they don't return ConversationSuccess
.
You may set this, for example: * In the entryFulfillment
of a Page
if entering the page indicates that the conversation succeeded. * In a webhook response when you determine that you handled the customer issue.
JSON representation |
---|
{ "metadata": { object } } |
Fields | |
---|---|
metadata |
Custom metadata. Dialogflow doesn't impose any structure on this. |
OutputAudioText
A text or ssml response that is preferentially used for TTS output audio synthesis, as described in the comment on the ResponseMessage message.
JSON representation |
---|
{ "allowPlaybackInterruption": boolean, // Union field |
Fields | |
---|---|
allow |
Output only. Whether the playback of this message can be interrupted by the end user's speech and the client can then starts the next Dialogflow request. |
Union field source . The source, which is either plain text or SSML. source can be only one of the following: |
|
text |
The raw text to be synthesized. |
ssml |
The SSML text to be synthesized. For more information, see SSML. |
LiveAgentHandoff
Indicates that the conversation should be handed off to a live 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 entryFulfillment
of a 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 |
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. This message is generated by Dialogflow only and not supposed to be defined by the user.
PlayAudio
Specifies an audio clip to be played by the client as part of the response.
JSON representation |
---|
{ "audioUri": string, "allowPlaybackInterruption": boolean } |
Fields | |
---|---|
audio |
Required. URI of the audio clip. Dialogflow does not impose any validation on this value. It is specific to the client that reads it. |
allow |
Output only. Whether the playback of this message can be interrupted by the end user's speech and the client can then starts the next Dialogflow request. |
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. The external URIs are specified via playAudio
. This message is generated by Dialogflow only and not supposed to be defined by the user.
JSON representation |
---|
{
"segments": [
{
object ( |
Fields | |
---|---|
segments[] |
Segments this audio response is composed of. |
Segment
Represents one segment of audio.
JSON representation |
---|
{ "allowPlaybackInterruption": boolean, // Union field |
Fields | |
---|---|
allow |
Output only. 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. |
Union field content . Content of the segment. content can be only one of the following: |
|
audio |
Raw audio synthesized from the Dialogflow agent's response using the output config specified in the request. A base64-encoded string. |
uri |
Client-specific URI that points to an audio clip accessible to the client. Dialogflow does not impose any validation on it. |
TelephonyTransferCall
Represents the signal that telles the client to transfer the phone call connected to the agent to a third-party endpoint.
JSON representation |
---|
{ // Union field |
Fields | |
---|---|
Union field endpoint . Endpoint to transfer the call to. endpoint can be only one of the following: |
|
phone |
Transfer the call to a phone number in E.164 format. |
KnowledgeInfoCard
This type has no fields.
Represents info card response. If the response contains generative knowledge prediction, Dialogflow will return a payload with Infobot Messenger compatible info card.
Otherwise, the info card response is skipped.
ToolCall
Represents a call of a specific tool's action with the specified inputs.
JSON representation |
---|
{ "tool": string, "action": string, "inputParameters": { object } } |
Fields | |
---|---|
tool |
Required. The |
action |
Required. The name of the tool's action associated with this call. |
input |
Optional. The action's input parameters. |