Rich response messages

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 Console (visit documentation, open console). The instructions below focus on using the console. To access intent response data:

  1. Go to the Dialogflow Console.
  2. Select an agent.
  3. Select Intents in the left sidebar menu.
  4. Select an intent.
  5. 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.

Screenshot of adding rich messages.

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.

Screenshot of adding rich messages.

To add rich response messages:

  1. Select the tab for your desired platform. If the desired platform tab is not shown, click the add add button and select it.
  2. Click the Add Responses button. A dropdown shows the response types supported by the platform.
  3. Choose the response type. These are described below.
  4. Enter fields for the selected response type.
  5. Add more platform tabs and responses as needed. You can add up to 10 ordered messages in each tab.
  6. Click Save.

You can use parameter references in your responses to reference parameters provided by the end-user or events at runtime.

Text responses

Text responses send a text response to the end-user. They contain the following fields:

  • List of text responses

When entering a response, press Shift + Enter to input a newline or just Enter to input another 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

Cards 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

Quick reply responses

Quick replies 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
  • Text to send as end-user expression

The following limitations apply:

  • At most one quick reply response per platform for an intent
  • 20 character limit per reply

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.