- JSON representation
- ExpectedInput
- InputPrompt
- SpeechResponse
- RichResponse
- Item
- SimpleResponse
- BasicCard
- Button
- StructuredResponse
- OrderUpdate
- Action
- Receipt
- RejectionInfo
- CancellationInfo
- InTransitInfo
- FulfillmentInfo
- ReturnInfo
- UserNotification
- MediaResponse
- MediaObject
- CarouselBrowse
- Item
- TableCard
- ColumnProperties
- Row
- Cell
- HtmlResponse
- Suggestion
- LinkOutSuggestion
- ExpectedIntent
- FinalResponse
- CustomPushMessage
- UserNotification
- Target
AppResponse is the response sent by the fulfillment to Google Assistant. For examples of how this is used in Actions on Google, see https://developers.google.com/assistant/df-asdk/reference/conversation-webhook-json#conversation-response-body
JSON representation | |
---|---|
{ "conversationToken": string, "userStorage": string, "resetUserStorage": boolean, "expectUserResponse": boolean, "expectedInputs": [ { object ( |
Fields | |
---|---|
conversationToken |
An opaque token that is recirculated to the Action every conversation turn. |
userStorage |
An opaque token controlled by the Action that is persisted across conversations for a particular user. If empty or unspecified, the existing persisted token will be unchanged. The maximum size of the string is 10k bytes. If multiple dialogs are occurring concurrently for the same user, then updates to this token can overwrite each other unexpectedly. |
resetUserStorage |
Whether to clear the persisted userStorage. If set to true, then in the next interaction with the user, the userStorage field will be empty. |
expectUserResponse |
Indicates whether the Action is expecting a user response. This is true when the conversation is ongoing, false when the conversation is done. |
expectedInputs[] |
List of inputs the Action expects, each input can be a common actions on Google intent (start with 'actions.'), or an input taking list of possible intents. Only one input is supported for now. |
finalResponse |
Final response when the Action does not expect user's input. |
customPushMessage |
A custom push message that allows developers to send structured data to actions on Google. |
isInSandbox |
Indicates whether the response should be handled in sandbox mode. This bit is needed to push structured data to Google in sandbox mode. |
ExpectedInput
JSON representation | |
---|---|
{ "inputPrompt": { object ( |
Fields | |
---|---|
inputPrompt |
The customized prompt used to ask user for input. |
possibleIntents[] |
List of intents that can be used to fulfill this input. To have actions on Google just return the raw user input, the app should ask for the |
speechBiasingHints[] |
List of phrases the Action wants Google to use for speech biasing. Up to 1000 phrases are allowed. |
InputPrompt
The input prompt used for assistant to guide user to provide an input for the app's question.
JSON representation | |
---|---|
{ "initialPrompts": [ { object ( |
Fields | |
---|---|
initialPrompts[] |
Initial prompts asking user to provide an input. Only a single initial_prompt is supported. |
richInitialPrompt |
Prompt payload. |
noInputPrompts[] |
Prompt used to ask user when there is no input from user. |
SpeechResponse
Response that only contains speech. DEPRECATED.
JSON representation | |
---|---|
{ // Union field |
Fields | ||
---|---|---|
Union field type . Types of speech output: text to speech or SSML. type can be only one of the following: |
||
textToSpeech |
Plain text of the speech output, e.g., "where do you want to go?"/ |
|
ssml |
Structured spoken response to the user in the SSML format, e.g. " |
RichResponse
A rich response that can include audio, text, cards, suggestions and structured data.
JSON representation | |
---|---|
{ "items": [ { object ( |
Fields | |
---|---|
items[] |
A list of UI elements which compose the response The items must meet the following requirements: 1. The first item must be a |
suggestions[] |
A list of suggested replies. These will always appear at the end of the response. If used in a |
linkOutSuggestion |
An additional suggestion chip that can link out to the associated app or site. |
Item
Items of the response.
JSON representation | |
---|---|
{ "name": string, // Union field |
Fields | ||
---|---|---|
name |
Optional named identifier of this Item. |
|
Union field item . Type of item. item can be only one of the following: |
||
simpleResponse |
Voice and text-only response. |
|
basicCard |
A basic card. |
|
structuredResponse |
Structured payload to be processed by Google. |
|
mediaResponse |
Response indicating a set of media to be played. |
|
carouselBrowse |
Carousel browse card, use collectionBrowse instead.. |
|
tableCard |
Table card. |
|
htmlResponse |
Html response used to render on Canvas. |
SimpleResponse
A simple response containing speech or text to show the user.
JSON representation | |
---|---|
{ "textToSpeech": string, "ssml": string, "displayText": string } |
Fields | |
---|---|
textToSpeech |
Plain text of the speech output, e.g., "where do you want to go?" Mutually exclusive with ssml. |
ssml |
Structured spoken response to the user in the SSML format, e.g. |
displayText |
Optional text to display in the chat bubble. If not given, a display rendering of the textToSpeech or ssml above will be used. Limited to 640 chars. |
BasicCard
A basic card for displaying some information, e.g. an image and/or text.
JSON representation | |
---|---|
{ "title": string, "subtitle": string, "formattedText": string, "image": { object ( |
Fields | |
---|---|
title |
Overall title of the card. Optional. |
subtitle |
Optional. |
formattedText |
Body text of the card. Supports a limited set of markdown syntax for formatting. Required, unless image is present. |
image |
A hero image for the card. The height is fixed to 192dp. Optional. |
buttons[] |
Buttons. Currently at most 1 button is supported. Optional. |
imageDisplayOptions |
type of image display option. Optional. |
Button
A button object that usually appears at the bottom of a card.
JSON representation | |
---|---|
{
"title": string,
"openUrlAction": {
object ( |
Fields | |
---|---|
title |
title of the button. Required. |
openUrlAction |
Action to take when a user taps on the button. Required. |
StructuredResponse
The response defined for app to respond with structured data.
JSON representation | |
---|---|
{ // Union field |
Fields | ||
---|---|---|
Union field data . The container of payload response from 3P agents. data can be only one of the following: |
||
orderUpdate |
App provides an order update (e.g. |
|
orderUpdateV3 |
App provides an order update in API v3 format after receiving the order. |
OrderUpdate
Deprecated: Use V3 Proto instead. Update to an order.
JSON representation | |
---|---|
{ "googleOrderId": string, "actionOrderId": string, "orderState": { object ( |
Fields | ||
---|---|---|
googleOrderId |
Id of the order is the Google-issued id. |
|
actionOrderId |
Required. The canonical order id referencing this order. If integrators don't generate the canonical order id in their system, they can simply copy over googleOrderId included in order. |
|
orderState |
The new state of the order. |
|
orderManagementActions[] |
Updated applicable management actions for the order, e.g. manage, modify, contact support. |
|
receipt |
Receipt for order. |
|
updateTime |
When the order was updated from the app's perspective. A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds. Example: |
|
totalPrice |
New total price of the order |
|
lineItemUpdates |
Map of line item-level changes, keyed by item id. Optional. An object containing a list of |
|
userNotification |
If specified, displays a notification to the user with the specified title and text. Specifying a notification is a suggestion to notify and is not guaranteed to result in a notification. |
|
infoExtension |
Extra data based on a custom order state or in addition to info of a standard state. An object containing fields of an arbitrary type. An additional field |
|
Union field info . Extra information associated with the state of the order. info can be only one of the following: |
||
rejectionInfo |
Information about rejection state. |
|
cancellationInfo |
Information about cancellation state. |
|
inTransitInfo |
Information about in transit state. |
|
fulfillmentInfo |
Information about fulfillment state. |
|
returnInfo |
Information about returned state. |
Action
A follow-up action associated with the order update.
JSON representation | |
---|---|
{ "type": enum ( |
Fields | |
---|---|
type |
type of action. |
button |
Button label and link. |
Receipt
Deprecated: Use V3 Proto instead. Receipt when state is CONFIRMED or any other state (e.g. IN_TRANSIT, FULFILLED) inclusive of CONFIRMED state.
JSON representation | |
---|---|
{ "confirmedActionOrderId": string, "userVisibleOrderId": string } |
Fields | |
---|---|
confirmedActionOrderId |
Confirmed order id when order has been received by the integrator. This is the canonical order id used in integrator's system referencing the order and may subsequently be used to identify the order as Note that this field is deprecated. Please pass the field through OrderUpdate.action_order_id instead. |
userVisibleOrderId |
Optional. The user facing id referencing to current order, which will show up in the receipt card if present. This should be the id that usually appears on a printed receipt or receipt sent to user's email. User should be able to use this id referencing her order for customer service provided by integrators. Note that this field must be populated if integrator does generate user facing id for an order with a printed receipt / email receipt. |
RejectionInfo
The rejection info when state is REJECTED. This message can be populated in the initial order update in conversation or through subsequent async order update.
JSON representation | |
---|---|
{
"type": enum ( |
Fields | |
---|---|
type |
Rejection type. |
reason |
Reason for the error. |
CancellationInfo
Deprecated: Use V3 Proto instead. The cancellation info when state is CANCELLED.
JSON representation | |
---|---|
{ "reason": string } |
Fields | |
---|---|
reason |
Reason for cancellation. |
InTransitInfo
Deprecated: Use V3 Proto instead. The in-transit info when state is IN_TRANSIT.
JSON representation | |
---|---|
{ "updatedTime": string } |
Fields | |
---|---|
updatedTime |
Last updated time for in transit. A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds. Example: |
FulfillmentInfo
Deprecated: Use V3 Proto instead. The fulfillment info when state is FULFILLED.
JSON representation | |
---|---|
{ "deliveryTime": string } |
Fields | |
---|---|
deliveryTime |
When the order will be fulfilled. A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds. Example: |
ReturnInfo
Deprecated: Use V3 Proto instead. The return info when state is REJECTED.
JSON representation | |
---|---|
{ "reason": string } |
Fields | |
---|---|
reason |
Reason for return. |
UserNotification
Optional user notification to display as part of the Order update.
JSON representation | |
---|---|
{ "title": string, "text": string } |
Fields | |
---|---|
title |
The title for the user notification. |
text |
The contents of the notification. |
MediaResponse
The response indicating a set of media to be played within the conversation.
JSON representation | |
---|---|
{ "mediaType": enum ( |
Fields | |
---|---|
mediaType |
type of the media within this response. |
mediaObjects[] |
The list of media objects. |
MediaObject
Represents one media object which is returned with MediaResponse. Contains information about the media, such as name, description, url, etc.
JSON representation | |
---|---|
{ "name": string, "description": string, "contentUrl": string, // Union field |
Fields | ||
---|---|---|
name |
name of this media object. |
|
description |
description of this media object. |
|
contentUrl |
The url pointing to the media content. |
|
Union field image . Image to show with the media card. image can be only one of the following: |
||
largeImage |
A large image, such as the cover of the album, etc. |
|
icon |
A small image icon displayed on the right from the title. It's resized to 36x36 dp. |
CarouselBrowse
Presents a set of AMP documents as a carousel of large-tile items. Items may be selected to launch their associated AMP document in an AMP viewer.
JSON representation | |
---|---|
{ "items": [ { object ( |
Fields | |
---|---|
items[] |
Min: 2. Max: 10. |
imageDisplayOptions |
type of image display option. Optional. |
Item
Item in the carousel.
JSON representation | |
---|---|
{ "title": string, "description": string, "footer": string, "image": { object ( |
Fields | |
---|---|
title |
title of the carousel item. Required. |
description |
description of the carousel item. Optional. |
footer |
Footer text for the carousel item, displayed below the description. Single line of text, truncated with an ellipsis. Optional. |
image |
Hero image for the carousel item. Optional. |
openUrlAction |
URL of the document associated with the carousel item. The document can contain HTML content or, if "urlTypeHint" is set to AMP_CONTENT, AMP content. Required. |
TableCard
A table card for displaying a table of text.
JSON representation | |
---|---|
{ "title": string, "subtitle": string, "image": { object ( |
Fields | |
---|---|
title |
Overall title of the table. Optional but must be set if subtitle is set. |
subtitle |
Subtitle for the table. Optional. |
image |
Image associated with the table. Optional. |
columnProperties[] |
Headers and alignment of columns. |
rows[] |
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. |
buttons[] |
Buttons. Currently at most 1 button is supported. Optional. |
ColumnProperties
Keeps properties of columns (including headers).
JSON representation | |
---|---|
{
"header": string,
"horizontalAlignment": enum ( |
Fields | |
---|---|
header |
Header text for the column. |
horizontalAlignment |
Horizontal alignment of content w.r.t column. If unspecified, content will be aligned to the leading edge. |
Row
Describes a row in the table.
JSON representation | |
---|---|
{
"cells": [
{
object ( |
Fields | |
---|---|
cells[] |
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. |
dividerAfter |
Indicates whether there should be a divider after each row. |
Cell
Describes a cell in a row.
JSON representation | |
---|---|
{ "text": string } |
Fields | |
---|---|
text |
Text content of the cell. |
HtmlResponse
Response which displays HTML using the interactive canvas feature. The maximum size of the response is 50k bytes.
JSON representation | |
---|---|
{ "updatedState": value, "suppressMic": boolean, "url": string } |
Fields | |
---|---|
updatedState |
Communicate the following JSON object to the app. |
suppressMic |
Provide an option so that mic won't be opened after this immersive response. |
url |
The url of the application. |
Suggestion
A suggestion chip that the user can tap to quickly post a reply to the conversation.
JSON representation | |
---|---|
{ "title": string } |
Fields | |
---|---|
title |
The text shown the 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 Required |
LinkOutSuggestion
Creates a suggestion chip that allows the user to jump out to the App or Website associated with this agent.
JSON representation | |
---|---|
{
"destinationName": string,
"url": string,
"openUrlAction": {
object ( |
Fields | |
---|---|
destinationName |
The name of the app or site this chip is linking to. The chip will be rendered with the title "Open |
url |
Deprecated. Use OpenUrlAction instead. |
openUrlAction |
The URL of the App or Site to open when the user taps the suggestion chip. Ownership of this App/URL must be validated in the actions on Google developer console, or the suggestion will not be shown to the user. Open URL Action supports http, https and intent URLs. For Intent URLs refer to: https://developer.chrome.com/multidevice/android/intents |
ExpectedIntent
The expected intent the app is asking the assistant to provide.
JSON representation | |
---|---|
{ "intent": string, "inputValueData": { "@type": string, field1: ..., ... }, "parameterName": string } |
Fields | |
---|---|
intent |
The built-in intent name, e.g. |
inputValueData |
Additional configuration data required by a built-in intent. Possible values for the built-in intents: An object containing fields of an arbitrary type. An additional field |
parameterName |
Optionally, a parameter of the intent that is being requested. Only valid for requested intents. Used for speech biasing. |
FinalResponse
The final response when the user input is not expected.
JSON representation | |
---|---|
{ // Union field |
Fields | ||
---|---|---|
Union field response . Possible response types. response can be only one of the following: |
||
speechResponse |
Spoken response when user is not required to provide an input. |
|
richResponse |
Rich response when user is not required to provide an input. |
CustomPushMessage
A custom push message that holds structured data to push for the actions Fulfillment API.
JSON representation | |
---|---|
{ "target": { object ( |
Fields | ||
---|---|---|
target |
The specified target for the push request. |
|
Union field content . The different types of payload. content can be only one of the following: |
||
orderUpdate |
An order update updating orders placed through transaction APIs. |
|
userNotification |
If specified, displays a notification to the user with specified title and text. |
UserNotification
User notification to display with a request.
JSON representation | |
---|---|
{ "title": string, "text": string } |
Fields | |
---|---|
title |
The title for the notification. |
text |
The content of the notification. |
Target
The specified target for the push request.
JSON representation | |
---|---|
{
"userId": string,
"intent": string,
"argument": {
object ( |
Fields | |
---|---|
userId |
The user to target. |
intent |
The intent to target. |
argument |
The argument to target for an intent. For V1, only one Argument is supported. |
locale |
The locale to target. Follows IETF BCP-47 language code. Can be used by a multi-lingual app to target a user on a specified localized app. If not specified, it will default to en-US. |