Many of the integration platforms support platform-specific rich response messages. These messages can be used to provide the end-user with more than just text responses. There are a variety of response types to choose from. For example, you can show images, play audio, or provide buttons. Each platform supports a subset of the available response types.
Where to find this data
When building an agent, it is most common to use the Dialogflow ES console (visit documentation, open console). The instructions below focus on using the console. To access intent response data:
- Go to the Dialogflow ES console.
- Select an agent.
- Select Intents in the left sidebar menu.
- Select an intent.
- Scroll down to the Responses section.
If you are building an agent using the API instead of the console, see the Intents reference. The API field names are similar to the console field names. The instructions below highlight any important differences between the console and the API.
Add rich response messages
The Responses section has tabs for each platform, including a default platform. You can define responses for the default platform, which can be used on all platforms.
You can define responses for platform-specific tabs, which only work on the corresponding platforms. You can also opt to use the default responses for a specific platform, so you do not need to create duplicate text responses for all platforms.
To add rich response messages:
- Select the tab for your desired platform. If the desired platform tab is not shown, click the add add button and select it.
- Click the Add Responses button. A dropdown shows the response types supported by the platform.
- Choose the response type. These are described below.
- Enter fields for the selected response type.
- Add more platform tabs and responses as needed. You can add up to 10 ordered messages in each tab.
- Click Save.
You can use parameter references in your responses to reference parameters provided by the end-user or events at runtime.
Text responses
By default, Text responses send a text response to the end-user.
If text-to-speech is enabled for an agent or requested by detect intent requests, the supplied text is used to synthesize speech and play the audio. In this case, supplied text can optionally use the Speech Synthesis Markup Language (SSML).
The fields are:
- List of text or SSML entries
When entering a response, press Shift + Enter to input a newline or just Enter to input another text response.
The following limitations apply:
- Max of 300 text entries per text response
Image responses
Image responses send an image to the end-user. They contain the following fields:
- Publicly accessible URL for the image
Card responses
Card responses send an image, a card title, a card subtitle, and interactive buttons to the end-user. The style of the card varies by platform.
You can configure buttons to send the end-user to a URL or to send pre-configured text to Dialogflow as though the end-user provided an expression.
Some of the fields are optional, depending on the platform:
- Publicly accessible URL for an image
- Card title
- Card subtitle
- List of buttons with the following fields:
- Button title
- Text to send as end-user expression or URL to open
The following limitations apply:
Max of 10 cards per platform and per language for an intent. For example, if your agent supports English, French, platform X, and platform Y, an intent can have at most 40 cards:
- 10 English cards for platform X
- 10 English cards for platform Y
- 10 French cards for platform X
- 10 French cards for platform Y
Quick reply responses
Quick Reply responses send a button to the end-user. You can configure buttons to send pre-configured text to Dialogflow as though the end-user provided an expression.
The fields are:
- Button title
- List of text entries to send as end-user expression
The following limitations apply:
Max of one quick reply response per platform and per language for an intent. For example, if your agent supports English, French, platform X, and platform Y, an intent can have at most 4 quick replies:
- 1 English quick reply for platform X
- 1 English quick reply for platform Y
- 1 French quick reply for platform X
- 1 French quick reply for platform Y
Max of 10 text entries per quick reply response.
Max of 20 characters per text entry.
Synthesize speech responses
Synthesize Speech responses are used to synthesize speech from text responses and play the audio. The supplied text can optionally use the Speech Synthesis Markup Language (SSML).
The fields are:
- Text or SSML
The following limitations apply:
- Only supported by the Dialogflow phone gateway integration
- Max of 20 synthesize speech responses per intent
Play audio responses
Play Audio responses are used to play audio files. Audio files are supplied in a Cloud Storage bucket.
The fields are:
- Cloud Storage object URI in
gs://bucket-name/object-name
format.
The following limitations apply:
- Only supported by the Dialogflow phone gateway integration
- Audio file specifications: a single channel (mono) of linear PCM audio (2 bytes / sample) at 8kHz
- Max of 20 play audio responses per intent
Transfer call responses
Transfer Call responses are used to transfer the caller for a telephony integration.
The fields are:
- The telephone number to transfer to.
The following limitations apply:
Only supported by the Dialogflow phone gateway integration
Only US telephone numbers are supported
Custom payload responses
Some platforms support a custom payload response to handle non-standard, advanced responses. These custom payloads are supplied in a JSON format defined in the platform's documentation.
You can also send a custom payload to integrations that you develop. It won't be processed by Dialogflow, so you need to handle it in your own business logic.
You can configure a custom payload for multiple platforms. To configure this, use the default platform and a JSON format similar to the following:
{
"facebook": {
"attachment": {
"type": "",
"payload": {}
}
},
"slack": {
"text": "",
"attachments": []
}
}
Google Assistant response types
The Google Assistant integration provides many response message types. For more information, see the Google Assistant responses reference.
Additional response types
Other message types are supported by various platforms. You can see the complete list in the response message REST reference. See the platform integration documentation for more information.