AppResponse

AppResponse is the response for the HTTP API call from the Assistant to the app. The response to AppRequest must occur within 5 seconds of the app receiving a request.

JSON representation
{
  "conversationToken": string,
  "userStorage": string,
  "resetUserStorage": boolean,
  "expectUserResponse": boolean,
  "expectedInputs": [
    {
      object(ExpectedInput)
    }
  ],
  "finalResponse": {
    object(FinalResponse)
  },
  "customPushMessage": {
    object(CustomPushMessage)
  },
  "isInSandbox": boolean
}
Fields
conversationToken

string

An opaque token that is recirculated to the app every conversation turn.

userStorage

string

An opaque token controlled by the application 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

boolean

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

boolean

Indicates whether the app is expecting a user response. This is true when the conversation is ongoing, false when the conversation is done.

expectedInputs[]

object(ExpectedInput)

List of inputs the app expects, each input can be a built-in intent, or an input taking list of possible intents. Only one input is supported for now.

finalResponse

object(FinalResponse)

Final response when the app does not expect user's input.

customPushMessage

object(CustomPushMessage)

Custom Push Message allows developers to send structured data to Google for interactions on the Assistant.

isInSandbox

boolean

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(InputPrompt)
  },
  "possibleIntents": [
    {
      object(ExpectedIntent)
    }
  ],
  "speechBiasingHints": [
    string
  ]
}
Fields
inputPrompt

object(InputPrompt)

The customized prompt used to ask user for input.

possibleIntents[]

object(ExpectedIntent)

List of intents that can be used to fulfill this input. To have the Google Assistant just return the raw user input, the app should ask for the actions.intent.TEXT intent.

speechBiasingHints[]

string

List of phrases the app 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(SpeechResponse)
    }
  ],
  "richInitialPrompt": {
    object(RichResponse)
  },
  "noInputPrompts": [
    {
      object(SimpleResponse)
    }
  ]
}
Fields
initialPrompts[]
(deprecated)

object(SpeechResponse)

Initial prompts asking user to provide an input. Only a single initial_prompt is supported.

richInitialPrompt

object(RichResponse)

Prompt payload.

noInputPrompts[]

object(SimpleResponse)

Prompt used to ask user when there is no input from user.

SpeechResponse

Response that only contains speech. DEPRECATED.

JSON representation
{

  // Union field type can be only one of the following:
  "textToSpeech": string,
  "ssml": string
  // End of list of possible types for union field type.
}
Fields
Union field type. Types of speech output: text to speech or SSML. type can be only one of the following:
textToSpeech

string

Plain text of the speech output, e.g., "where do you want to go?"/

ssml

string

Structured spoken response to the user in the SSML format, e.g. " Say animal name after the sound. ". Mutually exclusive with textToSpeech.

RichResponse

A rich response that can include audio, text, cards, suggestions and structured data.

JSON representation
{
  "items": [
    {
      object(Item)
    }
  ],
  "suggestions": [
    {
      object(Suggestion)
    }
  ],
  "linkOutSuggestion": {
    object(LinkOutSuggestion)
  }
}
Fields
items[]

object(Item)

A list of UI elements which compose the response The items must meet the following requirements: 1. The first item must be a SimpleResponse 2. At most two SimpleResponse 3. At most one card (e.g. BasicCard or StructuredResponse or MediaResponse 4. Cards may not be used if an actions.intent.OPTION intent is used ie ListSelect or CarouselSelect

suggestions[]

object(Suggestion)

A list of suggested replies. These will always appear at the end of the response. If used in a FinalResponse, they will be ignored.

Item

Items of the response.

JSON representation
{

  // Union field item can be only one of the following:
  "simpleResponse": {
    object(SimpleResponse)
  },
  "basicCard": {
    object(BasicCard)
  },
  "structuredResponse": {
    object(StructuredResponse)
  },
  "mediaResponse": {
    object(MediaResponse)
  },
  "carouselBrowse": {
    object(CarouselBrowse)
  },
  "tableCard": {
    object(TableCard)
  }
  // End of list of possible types for union field item.
}
Fields
Union field item. Type of item. item can be only one of the following:
simpleResponse

object(SimpleResponse)

Voice and text-only response.

basicCard

object(BasicCard)

A basic card.

structuredResponse

object(StructuredResponse)

Structured payload to be processed by Google.

mediaResponse

object(MediaResponse)

Response indicating a set of media to be played.

carouselBrowse

object(CarouselBrowse)

Carousel browse card.

tableCard

object(TableCard)

Table card.

SimpleResponse

A simple response containing speech or text to show the user.

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

string

Plain text of the speech output, e.g., "where do you want to go?" Mutually exclusive with ssml.

ssml

string

Structured spoken response to the user in the SSML format, e.g. <speak> Say animal name after the sound. <audio src = 'https://www.pullstring.com/moo.mps' />, what’s the animal? </speak>. Mutually exclusive with textToSpeech.

displayText

string

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(Image)
  },
  "buttons": [
    {
      object(Button)
    }
  ],
  "imageDisplayOptions": enum(ImageDisplayOptions)
}
Fields
title

string

Overall title of the card. Optional.

subtitle

string

Optional.

formattedText

string

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

image

object(Image)

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

buttons[]

object(Button)

Buttons. Currently at most 1 button is supported. Optional.

imageDisplayOptions

enum(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(OpenUrlAction)
  }
}
Fields
title

string

Title of the button. Required.

openUrlAction

object(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
{
  "orderUpdate": {
    object(OrderUpdate)
  }
}
Fields
orderUpdate

object(OrderUpdate)

App provides an order update (e.g. Receipt) after receiving the order.

OrderUpdate

Update to an order.

JSON representation
{
  "googleOrderId": string,
  "actionOrderId": string,
  "orderState": {
    object(OrderState)
  },
  "orderManagementActions": [
    {
      object(Action)
    }
  ],
  "receipt": {
    object(Receipt)
  },
  "updateTime": string,
  "totalPrice": {
    object(Price)
  },
  "lineItemUpdates": {
    string: {
      object(LineItemUpdate)
    },
    ...
  },
  "userNotification": {
    object(UserNotification)
  },
  "infoExtension": {
    "@type": string,
    field1: ...,
    ...
  },

  // Union field info can be only one of the following:
  "rejectionInfo": {
    object(RejectionInfo)
  },
  "cancellationInfo": {
    object(CancellationInfo)
  },
  "inTransitInfo": {
    object(InTransitInfo)
  },
  "fulfillmentInfo": {
    object(FulfillmentInfo)
  },
  "returnInfo": {
    object(ReturnInfo)
  }
  // End of list of possible types for union field info.
}
Fields
googleOrderId

string

Id of the order is the Google-issued id.

actionOrderId

string

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

object(OrderState)

The new state of the order.

orderManagementActions[]

object(Action)

Updated applicable management actions for the order, e.g. manage, modify, contact support.

receipt

object(Receipt)

Receipt for order.

updateTime

string (Timestamp format)

When the order was updated from the app's perspective.

A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds. Example: "2014-10-02T15:01:23.045123456Z".

totalPrice

object(Price)

New total price of the order

lineItemUpdates

map (key: string, value: object(LineItemUpdate))

Map of line item-level changes, keyed by item id. Optional.

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

userNotification

object(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

object

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 "@type" contains a URI identifying the type. Example: { "id": 1234, "@type": "types.example.com/standard/id" }.

Union field info. Extra information associated with the state of the order. info can be only one of the following:
rejectionInfo

object(RejectionInfo)

Information about rejection state.

cancellationInfo

object(CancellationInfo)

Information about cancellation state.

inTransitInfo

object(InTransitInfo)

Information about in transit state.

fulfillmentInfo

object(FulfillmentInfo)

Information about fulfillment state.

returnInfo

object(ReturnInfo)

Information about returned state.

Action

A follow-up action associated with the order update.

JSON representation
{
  "type": enum(ActionType),
  "button": {
    object(Button)
  }
}
Fields
type

enum(ActionType)

Type of action.

button

object(Button)

Button label and link.

Receipt

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
(deprecated)

string

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 actionOrderId.

userVisibleOrderId

string

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(ReasonType),
  "reason": string
}
Fields
type

enum(ReasonType)

Rejection type.

reason

string

Reason for the error.

CancellationInfo

The cancellation info when state is CANCELLED.

JSON representation
{
  "reason": string
}
Fields
reason

string

Reason for cancellation.

InTransitInfo

The in-transit info when state is IN_TRANSIT.

JSON representation
{
  "updatedTime": string
}
Fields
updatedTime

string (Timestamp format)

Last updated time for in transit.

A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds. Example: "2014-10-02T15:01:23.045123456Z".

FulfillmentInfo

The fulfillment info when state is FULFILLED.

JSON representation
{
  "deliveryTime": string
}
Fields
deliveryTime

string (Timestamp format)

When the order will be fulfilled.

A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds. Example: "2014-10-02T15:01:23.045123456Z".

ReturnInfo

The return info when state is REJECTED.

JSON representation
{
  "reason": string
}
Fields
reason

string

Reason for return.

UserNotification

Optional user notification to display as part of the Order update.

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

string

The title for the user notification.

text

string

The contents of the notification.

MediaResponse

The response indicating a set of media to be played within the conversation.

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

enum(MediaType)

Type of the media within this response.

mediaObjects[]

object(MediaObject)

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 image can be only one of the following:
  "largeImage": {
    object(Image)
  },
  "icon": {
    object(Image)
  }
  // End of list of possible types for union field image.
}
Fields
name

string

Name of this media object.

description

string

Description of this media object.

contentUrl

string

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

object(Image)

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

icon

object(Image)

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(Item)
    }
  ],
  "imageDisplayOptions": enum(ImageDisplayOptions)
}
Fields
items[]

object(Item)

Min: 2. Max: 10.

imageDisplayOptions

enum(ImageDisplayOptions)

Type of image display option. Optional.

Item

Item in the carousel.

JSON representation
{
  "title": string,
  "description": string,
  "footer": string,
  "image": {
    object(Image)
  },
  "openUrlAction": {
    object(OpenUrlAction)
  }
}
Fields
title

string

Title of the carousel item. Required.

description

string

Description of the carousel item. Optional.

footer

string

Footer text for the carousel item, displayed below the description. Single line of text, truncated with an ellipsis. Optional.

image

object(Image)

Hero image for the carousel item. Optional.

openUrlAction

object(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(Image)
  },
  "columnProperties": [
    {
      object(ColumnProperties)
    }
  ],
  "rows": [
    {
      object(Row)
    }
  ],
  "buttons": [
    {
      object(Button)
    }
  ]
}
Fields
title

string

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

subtitle

string

Subtitle for the table. Optional.

image

object(Image)

Image associated with the table. Optional.

columnProperties[]

object(ColumnProperties)

Headers and alignment of columns.

rows[]

object(Row)

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[]

object(Button)

Buttons. Currently at most 1 button is supported. Optional.

ColumnProperties

Keeps properties of columns (including headers).

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

string

Header text for the column.

horizontalAlignment

enum(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(Cell)
    }
  ],
  "dividerAfter": boolean
}
Fields
cells[]

object(Cell)

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

boolean

Indicates whether there should be a divider after each row.

Cell

Describes a cell in a row.

JSON representation
{
  "text": string
}
Fields
text

string

Text content of the cell.

Suggestion

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

JSON representation
{
  "title": string
}
Fields
title

string

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(OpenUrlAction)
  }
}
Fields
destinationName

string

The name of the app or site this chip is linking to. The chip will be rendered with the title "Open ". Max 20 chars. Required.

url
(deprecated)

string

Deprecated. Use OpenUrlAction instead.

openUrlAction

object(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

string

The built-in intent name, e.g. actions.intent.TEXT, or intents defined in the action package. If the intent specified is not a built-in intent, it is only used for speech biasing and the input provided by the Google Assistant will be the actions.intent.TEXT intent.

inputValueData

object

Additional configuration data required by a built-in intent. Possible values for the built-in intents: actions.intent.OPTION -> google.actions.v2.OptionValueSpec, actions.intent.CONFIRMATION -> google.actions.v2.ConfirmationValueSpec, actions.intent.TRANSACTION_REQUIREMENTS_CHECK -> google.actions.v2.TransactionRequirementsCheckSpec, actions.intent.DELIVERY_ADDRESS -> google.actions.v2.DeliveryAddressValueSpec, actions.intent.TRANSACTION_DECISION -> google.actions.v2.TransactionDecisionValueSpec, actions.intent.PLACE -> google.actions.v2.PlaceValueSpec, actions.intent.Link -> google.actions.v2.LinkValueSpec

An object containing fields of an arbitrary type. An additional field "@type" contains a URI identifying the type. Example: { "id": 1234, "@type": "types.example.com/standard/id" }.

parameterName

string

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 response can be only one of the following:
  "speechResponse": {
    object(SpeechResponse)
  },
  "richResponse": {
    object(RichResponse)
  }
  // End of list of possible types for union field response.
}
Fields
Union field response. Possible response types. response can be only one of the following:
speechResponse
(deprecated)

object(SpeechResponse)

Spoken response when user is not required to provide an input.

richResponse

object(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(Target)
  },

  // Union field content can be only one of the following:
  "orderUpdate": {
    object(OrderUpdate)
  },
  "userNotification": {
    object(UserNotification)
  }
  // End of list of possible types for union field content.
}
Fields
target

object(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

object(OrderUpdate)

An order update updating orders placed through transaction APIs.

userNotification

object(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

string

The title for the notification.

text

string

The content of the notification.

Target

The specified target for the push request.

JSON representation
{
  "userId": string,
  "intent": string,
  "argument": {
    object(Argument)
  },
  "locale": string
}
Fields
userId

string

The user to target.

intent

string

The intent to target.

argument

object(Argument)

The argument to target for an intent. For V1, only one Argument is supported.

locale

string

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.