StaticPrompt

Represents a list of prompt candidates, one of which will be selected as the prompt to be shown in the response to the user. This message is localizable.

JSON representation
{
  "candidates": [
    {
      object (StaticPromptCandidate)
    }
  ]
}
Fields
candidates[]

object (StaticPromptCandidate)

The list of candidate prompts to be sent to the client. Each prompt has a selector to determine when it can be used. The first selector that matches a request will be sent and the rest will be ignored.

StaticPromptCandidate

Represents a static prompt candidate.

JSON representation
{
  "selector": {
    object (Selector)
  },
  "promptResponse": {
    object (StaticPromptResponse)
  }
}
Fields
selector

object (Selector)

Optional. The criteria for whether this prompt matches a request. If the selector is empty, this prompt will always be triggered.

promptResponse

object (StaticPromptResponse)

The prompt response associated with the selector.

Selector

Defines the criteria for whether a prompt matches a request.

JSON representation
{
  "surfaceCapabilities": {
    object (SurfaceCapabilities)
  }
}
Fields
surfaceCapabilities

object (SurfaceCapabilities)

The set of required surface capabilities.

SurfaceCapabilities

Represents the surface the user is using to make a request to the Action.

JSON representation
{
  "capabilities": [
    enum (Capability)
  ]
}
Fields
capabilities[]

enum (Capability)

Required. The capabilities of the surface making a request to the Action.

StaticPromptResponse

Represents structured responses to send to the user, such as text, speech, cards, canvas data, suggestion chips, etc.

JSON representation
{
  "firstSimple": {
    object (StaticSimplePrompt)
  },
  "content": {
    object (StaticContentPrompt)
  },
  "lastSimple": {
    object (StaticSimplePrompt)
  },
  "suggestions": [
    {
      object (Suggestion)
    }
  ],
  "link": {
    object (StaticLinkPrompt)
  },
  "override": boolean,
  "canvas": {
    object (StaticCanvasPrompt)
  }
}
Fields
firstSimple

object (StaticSimplePrompt)

Optional. The first voice and text-only response.

content

object (StaticContentPrompt)

Optional. A content like a card, list or media to display to the user.

lastSimple

object (StaticSimplePrompt)

Optional. The last voice and text-only response.

suggestions[]

object (Suggestion)

Optional. Suggestions to be displayed to the user which will always appear at the end of the response. If the "append" field in the containing prompt is "true" the titles defined in this field will be added to titles defined in any previously defined suggestions prompts and duplicate values will be removed.

override

boolean

Optional. Mode for how this messages should be merged with previously defined messages. "true" will clear all previously defined messages (first and last simple, content, suggestions link and canvas) and add messages defined in this prompt. "false" will add messages defined in this prompt to messages defined in previous responses. Setting this field to "false" will also enable appending to some fields inside Simple prompts, the Suggestions prompt and the Canvas prompt (part of the Content prompt). The Content and Link messages will always be overwritten if defined in the prompt. Default value is "false".

canvas

object (StaticCanvasPrompt)

A response to be used for interactive canvas experience.

StaticSimplePrompt

Represents a simple prompt to be send to a user.

JSON representation
{
  "variants": [
    {
      object (Variant)
    }
  ]
}
Fields
variants[]

object (Variant)

List of possible variants.

Variant

Represents a variant which is part of the simple prompt.

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

string

Optional. Represents the speech to be spoken to the user. Can be SSML or text to speech. If the "append" field in the containing prompt is "true" the speech defined in this field will be appended to the previous Simple prompt's speech.

text

string

Optional. Text to display in the chat bubble. If not given, a display rendering of the speech field above will be used. Limited to 640 chars. If the "append" field in the containing prompt is "true" the text defined in this field will be appended to the previous Simple prompt's text.

StaticContentPrompt

A placeholder for the Content part of a StaticPrompt.

JSON representation
{

  // Union field content can be only one of the following:
  "card": {
    object (StaticCardPrompt)
  },
  "image": {
    object (StaticImagePrompt)
  },
  "table": {
    object (StaticTablePrompt)
  },
  "media": {
    object (StaticMediaPrompt)
  },
  "list": {
    object (StaticListPrompt)
  },
  "collection": {
    object (StaticCollectionPrompt)
  }
  // End of list of possible types for union field content.
}
Fields
Union field content. Only one type of content can be present in a Prompt. content can be only one of the following:
card

object (StaticCardPrompt)

A basic card.

image

object (StaticImagePrompt)

An image.

table

object (StaticTablePrompt)

Table card.

media

object (StaticMediaPrompt)

Response indicating a set of media to be played.

list

object (StaticListPrompt)

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

collection

object (StaticCollectionPrompt)

A card presenting a list of options to select from.

StaticCardPrompt

A basic card for displaying some information, e.g. an image and/or text.

JSON representation
{
  "title": string,
  "subtitle": string,
  "text": string,
  "image": {
    object (StaticImagePrompt)
  },
  "imageFill": enum (ImageFill),
  "button": {
    object (StaticLinkPrompt)
  }
}
Fields
title

string

Optional. Overall title of the card.

subtitle

string

Optional. Subtitle of the card.

text

string

Required. Body text of the card which is needed unless image is present. Supports a limited set of markdown syntax for formatting.

image

object (StaticImagePrompt)

Optional. A hero image for the card. The height is fixed to 192dp.

imageFill

enum (ImageFill)

Optional. How the image background will be filled.

button

object (StaticLinkPrompt)

Optional. A clickable button to be shown in the Card.

StaticImagePrompt

An image displayed in the card.

JSON representation
{
  "url": string,
  "alt": string,
  "height": integer,
  "width": integer
}
Fields
url

string

Required. The source url of the image. Images can be JPG, PNG and GIF (animated and non-animated). For example,https://www.agentx.com/logo.png.

alt

string

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

height

integer

Optional. The height of the image in pixels.

width

integer

Optional. The width of the image in pixels.

StaticLinkPrompt

Defines a link which will be displayed as a suggestion chip and can be opened by the user.

JSON representation
{
  "name": string,
  "open": {
    object (OpenUrl)
  }
}
Fields
name

string

Name of the link

open

object (OpenUrl)

Defines behavior when the user opens the link.

OpenUrl

Defines behavior when the user opens the link.

JSON representation
{
  "url": string,
  "hint": enum (UrlHint)
}
Fields
url

string

The url field which could be any of: - http/https urls for opening an App-linked App or a webpage

hint

enum (UrlHint)

Indicates a hint for the url type.

StaticTablePrompt

A table card for displaying a table of text.

JSON representation
{
  "title": string,
  "subtitle": string,
  "image": {
    object (StaticImagePrompt)
  },
  "columns": [
    {
      object (TableColumn)
    }
  ],
  "rows": [
    {
      object (TableRow)
    }
  ],
  "button": {
    object (StaticLinkPrompt)
  }
}
Fields
title

string

Optional. Overall title of the table. Must be set if subtitle is set.

subtitle

string

Optional. Subtitle for the table.

image

object (StaticImagePrompt)

Optional. Image associated with the table.

columns[]

object (TableColumn)

Optional. Headers and alignment of columns.

rows[]

object (TableRow)

Optional. Row data of the table. The first 3 rows are guaranteed to be shown but others might be cut on certain surfaces. Please test with the simulator to see which rows will be shown for a given surface. On surfaces that support the WEB_BROWSER capability, you can point the user to a web page with more data.

button

object (StaticLinkPrompt)

Optional. Button.

TableColumn

Describes a column in the table.

JSON representation
{
  "header": string,
  "align": enum (HorizontalAlignment)
}
Fields
header

string

Header text for the column.

align

enum (HorizontalAlignment)

Horizontal alignment of content w.r.t column. If unspecified, content will be aligned to the leading edge.

TableRow

Describes a row in the table.

JSON representation
{
  "cells": [
    {
      object (TableCell)
    }
  ],
  "divider": boolean
}
Fields
cells[]

object (TableCell)

Cells in this row. The first 3 cells are guaranteed to be shown but others might be cut on certain surfaces. Please test with the simulator to see which cells will be shown for a given surface.

divider

boolean

Indicates whether there should be a divider after each row.

TableCell

Describes a cell in a row.

JSON representation
{
  "text": string
}
Fields
text

string

Text content of the cell.

StaticMediaPrompt

Contains information about the media, such as name, description, url, etc. Next id: 9

JSON representation
{
  "mediaType": enum (MediaType),
  "startOffset": string,
  "optionalMediaControls": [
    enum (OptionalMediaControls)
  ],
  "mediaObjects": [
    {
      object (MediaObject)
    }
  ]
}
Fields
mediaType

enum (MediaType)

Media type of this response.

startOffset

string (Duration format)

Start offset of the first media object.

A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s".

optionalMediaControls[]

enum (OptionalMediaControls)

Optional media control types this media response session can support. If set, request will be made to 3p when a certain media event happens. If not set, 3p must still handle two default control type, FINISHED and FAILED.

mediaObjects[]

object (MediaObject)

List of media objects.

MediaObject

Represents a single media object.

JSON representation
{
  "name": string,
  "description": string,
  "url": string,
  "image": {
    object (MediaImage)
  }
}
Fields
name

string

Name of this media object.

description

string

Description of this media object.

url

string

The url pointing to the media content.

image

object (MediaImage)

Image to show with the media card.

MediaImage

Image to be shown inside a MediaPrompt.

JSON representation
{

  // Union field image can be only one of the following:
  "large": {
    object (StaticImagePrompt)
  },
  "icon": {
    object (StaticImagePrompt)
  }
  // End of list of possible types for union field image.
}
Fields
Union field image. Only one type of MediaImage is allowed. image can be only one of the following:
large

object (StaticImagePrompt)

A large image, such as the cover of the album, etc.

icon

object (StaticImagePrompt)

A small image icon displayed on the right from the title. It's resized to 36x36 dp.

StaticListPrompt

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

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

string

Optional. Title of the list.

subtitle

string

Optional. Subtitle of the list.

items[]

object (ListItem)

Required. List items.

ListItem

An item in the list.

JSON representation
{
  "key": string,
  "title": string,
  "description": string,
  "image": {
    object (StaticImagePrompt)
  }
}
Fields
key

string

Required. The NLU key that matches the entry key name in the associated type. When item tapped, this key will be posted back as a select option parameter.

title

string

Required. Title of the item. When tapped, this text will be posted back to the conversation verbatim as if the user had typed it. Each title must be unique among the set of items.

description

string

Optional. Body text of the item.

image

object (StaticImagePrompt)

Optional. Item image.

StaticCollectionPrompt

A card for presenting a collection of options to select from.

JSON representation
{
  "title": string,
  "subtitle": string,
  "items": [
    {
      object (CollectionItem)
    }
  ],
  "imageFill": enum (ImageFill)
}
Fields
title

string

Optional. Title of the collection.

subtitle

string

Optional. Subtitle of the collection.

items[]

object (CollectionItem)

Required. Collection items.

imageFill

enum (ImageFill)

Optional. Type of image display option.

CollectionItem

An item in the collection.

JSON representation
{
  "key": string,
  "title": string,
  "description": string,
  "image": {
    object (StaticImagePrompt)
  }
}
Fields
key

string

Required. The NLU key that matches the entry key name in the associated Type. When item tapped, this key will be posted back as a select option parameter.

title

string

Required. Title of the item. When tapped, this text will be posted back to the conversation verbatim as if the user had typed it. Each title must be unique among the set of items.

description

string

Optional. Body text of the item.

image

object (StaticImagePrompt)

Optional. Item image.

Suggestion

Represents a suggestion chip, a UI element shown to the user for convenience.

JSON representation
{
  "title": string
}
Fields
title

string

Required. The text shown in the suggestion chip. When tapped, this text will be posted back to the conversation verbatim as if the user had typed it. Each title must be unique among the set of suggestion chips. Max 25 chars

StaticCanvasPrompt

Represents a Interactive Canvas response to be sent to the user. This can be used in conjunction with the "firstSimple" field in the containing prompt to speak to the user in addition to displaying a interactive canvas response.

JSON representation
{
  "url": string,
  "data": [
    value
  ],
  "suppressMic": boolean
}
Fields
url

string

Required. URL of the web view to load.

data[]

value (Value format)

Optional. JSON data to be passed through to the immersive experience web page as an event. If the "override" field in the containing prompt is "false" data values defined in this Canvas prompt will be added after data values defined in previous Canvas prompts.

suppressMic

boolean

Optional. A true value means that the mic won't be opened for capturing input after this immersive response is presented to the user.