Message

Corresponds to the Response field in the Dialogflow console.

JSON representation
{
  "platform": enum(Platform),

  // Union field message can be only one of the following:
  "text": {
    object(Text)
  },
  "image": {
    object(Image)
  },
  "quickReplies": {
    object(QuickReplies)
  },
  "card": {
    object(Card)
  },
  "payload": {
    object
  },
  "simpleResponses": {
    object(SimpleResponses)
  },
  "basicCard": {
    object(BasicCard)
  },
  "suggestions": {
    object(Suggestions)
  },
  "linkOutSuggestion": {
    object(LinkOutSuggestion)
  },
  "listSelect": {
    object(ListSelect)
  },
  "carouselSelect": {
    object(CarouselSelect)
  }
  // End of list of possible types for union field message.
}
Fields
platform

enum(Platform)

Optional. The platform that this message is intended for.

Union field message. Required. The rich response message. message can be only one of the following:
text

object(Text)

The text response.

image

object(Image)

The image response.

quickReplies

object(QuickReplies)

The quick replies response.

card

object(Card)

The card response.

payload

object (Struct format)

Returns a response containing a custom, platform-specific payload. See the Intent.Message.Platform type for a description of the structure that may be required for your platform.

simpleResponses

object(SimpleResponses)

The voice and text-only responses for Actions on Google.

basicCard

object(BasicCard)

The basic card response for Actions on Google.

suggestions

object(Suggestions)

The suggestion chips for Actions on Google.

listSelect

object(ListSelect)

The list card response for Actions on Google.

carouselSelect

object(CarouselSelect)

The carousel card response for Actions on Google.

Text

The text response message.

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

string

Optional. The collection of the agent's responses.

Image

The image response message.

JSON representation
{
  "imageUri": string,
  "accessibilityText": string
}
Fields
imageUri

string

Optional. The public URI to an image file.

accessibilityText

string

Optional. A text description of the image to be used for accessibility, e.g., screen readers.

QuickReplies

The quick replies response message.

JSON representation
{
  "title": string,
  "quickReplies": [
    string
  ]
}
Fields
title

string

Optional. The title of the collection of quick replies.

quickReplies[]

string

Optional. The collection of quick replies.

Card

The card response message.

JSON representation
{
  "title": string,
  "subtitle": string,
  "imageUri": string,
  "buttons": [
    {
      object(Button)
    }
  ]
}
Fields
title

string

Optional. The title of the card.

subtitle

string

Optional. The subtitle of the card.

imageUri

string

Optional. The public URI to an image file for the card.

buttons[]

object(Button)

Optional. The collection of card buttons.

Button

Optional. Contains information about a button.

JSON representation
{
  "text": string,
  "postback": string
}
Fields
text

string

Optional. The text to show on the button.

postback

string

Optional. The text to send back to the Dialogflow API or a URI to open.

SimpleResponses

The collection of simple response candidates. This message in QueryResult.fulfillment_messages and WebhookResponse.fulfillment_messages should contain only one SimpleResponse.

JSON representation
{
  "simpleResponses": [
    {
      object(SimpleResponse)
    }
  ]
}
Fields
simpleResponses[]

object(SimpleResponse)

Required. The list of simple responses.

SimpleResponse

The simple response message containing speech or text.

JSON representation
{
  "textToSpeech": string,
  "ssml": string,
  "displayText": string
}
Fields
textToSpeech

string

One of textToSpeech or ssml must be provided. The plain text of the speech output. Mutually exclusive with ssml.

ssml

string

One of textToSpeech or ssml must be provided. Structured spoken response to the user in the SSML format. Mutually exclusive with textToSpeech.

displayText

string

Optional. The text to display.

BasicCard

The basic card message. Useful for displaying information.

JSON representation
{
  "title": string,
  "subtitle": string,
  "formattedText": string,
  "image": {
    object(Image)
  },
  "buttons": [
    {
      object(Button)
    }
  ]
}
Fields
title

string

Optional. The title of the card.

subtitle

string

Optional. The subtitle of the card.

formattedText

string

Required, unless image is present. The body text of the card.

image

object(Image)

Optional. The image for the card.

buttons[]

object(Button)

Optional. The collection of card buttons.

Button

The button object that appears at the bottom of a card.

JSON representation
{
  "title": string,
  "openUriAction": {
    object(OpenUriAction)
  }
}
Fields
title

string

Required. The title of the button.

openUriAction

object(OpenUriAction)

Required. Action to take when a user taps on the button.

OpenUriAction

Opens the given URI.

JSON representation
{
  "uri": string
}
Fields
uri

string

Required. The HTTP or HTTPS scheme URI.

Suggestions

The collection of suggestions.

JSON representation
{
  "suggestions": [
    {
      object(Suggestion)
    }
  ]
}
Fields
suggestions[]

object(Suggestion)

Required. The list of suggested replies.

Suggestion

The suggestion chip message that the user can tap to quickly post a reply to the conversation.

JSON representation
{
  "title": string
}
Fields
title

string

Required. The text shown the in the suggestion chip.

LinkOutSuggestion

The suggestion chip message that allows the user to jump out to the app or website associated with this agent.

JSON representation
{
  "destinationName": string,
  "uri": string
}
Fields
destinationName

string

Required. The name of the app or site this chip is linking to.

uri

string

Required. The URI of the app or site to open when the user taps the suggestion chip.

ListSelect

The card for presenting a list of options to select from.

JSON representation
{
  "title": string,
  "items": [
    {
      object(Item)
    }
  ]
}
Fields
title

string

Optional. The overall title of the list.

items[]

object(Item)

Required. List items.

Item

An item in the list.

JSON representation
{
  "info": {
    object(SelectItemInfo)
  },
  "title": string,
  "description": string,
  "image": {
    object(Image)
  }
}
Fields
info

object(SelectItemInfo)

Required. Additional information about this option.

title

string

Required. The title of the list item.

description

string

Optional. The main text describing the item.

image

object(Image)

Optional. The image to display.

SelectItemInfo

Additional info about the select item for when it is triggered in a dialog.

JSON representation
{
  "key": string,
  "synonyms": [
    string
  ]
}
Fields
key

string

Required. A unique key that will be sent back to the agent if this response is given.

synonyms[]

string

Optional. A list of synonyms that can also be used to trigger this item in dialog.

CarouselSelect

The card for presenting a carousel of options to select from.

JSON representation
{
  "items": [
    {
      object(Item)
    }
  ]
}
Fields
items[]

object(Item)

Required. Carousel items.

Item

An item in the carousel.

JSON representation
{
  "info": {
    object(SelectItemInfo)
  },
  "title": string,
  "description": string,
  "image": {
    object(Image)
  }
}
Fields
info

object(SelectItemInfo)

Required. Additional info about the option item.

title

string

Required. Title of the carousel item.

description

string

Optional. The body text of the card.

image

object(Image)

Optional. The image to display.