- JSON 表示法
- ExpectedInput
          <ph type="x-smartling-placeholder">- </ph>
            
- JSON 表示法
 
- InputPrompt
          <ph type="x-smartling-placeholder">- </ph>
            
- JSON 表示法
 
- SpeechResponse
          <ph type="x-smartling-placeholder">- </ph>
            
- JSON 表示法
 
- RichResponse
          <ph type="x-smartling-placeholder">- </ph>
            
- JSON 表示法
 
- 单品
          <ph type="x-smartling-placeholder">- </ph>
            
- JSON 表示法
 
- SimpleResponse
          <ph type="x-smartling-placeholder">- </ph>
            
- JSON 表示法
 
- BasicCard
          <ph type="x-smartling-placeholder">- </ph>
            
- JSON 表示法
 
- 按钮
          <ph type="x-smartling-placeholder">- </ph>
            
- JSON 表示法
 
- StructuredResponse
          <ph type="x-smartling-placeholder">- </ph>
            
- JSON 表示法
 
- OrderUpdate
          <ph type="x-smartling-placeholder">- </ph>
            
- JSON 表示法
 
- 操作
          <ph type="x-smartling-placeholder">- </ph>
            
- JSON 表示法
 
- 收据
          <ph type="x-smartling-placeholder">- </ph>
            
- JSON 表示法
 
- RejectionInfo
          <ph type="x-smartling-placeholder">- </ph>
            
- JSON 表示法
 
- CancellationInfo
          <ph type="x-smartling-placeholder">- </ph>
            
- JSON 表示法
 
- InTransitInfo
          <ph type="x-smartling-placeholder">- </ph>
            
- JSON 表示法
 
- FulfillmentInfo
          <ph type="x-smartling-placeholder">- </ph>
            
- JSON 表示法
 
- ReturnInfo
          <ph type="x-smartling-placeholder">- </ph>
            
- JSON 表示法
 
- UserNotification
          <ph type="x-smartling-placeholder">- </ph>
            
- JSON 表示法
 
- MediaResponse
          <ph type="x-smartling-placeholder">- </ph>
            
- JSON 表示法
 
- MediaObject
          <ph type="x-smartling-placeholder">- </ph>
            
- JSON 表示法
 
- CarouselBrowse
          <ph type="x-smartling-placeholder">- </ph>
            
- JSON 表示法
 
- 单品
          <ph type="x-smartling-placeholder">- </ph>
            
- JSON 表示法
 
- TableCard
          <ph type="x-smartling-placeholder">- </ph>
            
- JSON 表示法
 
- ColumnProperties
          <ph type="x-smartling-placeholder">- </ph>
            
- JSON 表示法
 
- 行
          <ph type="x-smartling-placeholder">- </ph>
            
- JSON 表示法
 
- 单元格
          <ph type="x-smartling-placeholder">- </ph>
            
- JSON 表示法
 
- HtmlResponse
          <ph type="x-smartling-placeholder">- </ph>
            
- JSON 表示法
 
- 建议
          <ph type="x-smartling-placeholder">- </ph>
            
- JSON 表示法
 
- LinkOutSuggestion
          <ph type="x-smartling-placeholder">- </ph>
            
- JSON 表示法
 
- ExpectedIntent
          <ph type="x-smartling-placeholder">- </ph>
            
- JSON 表示法
 
- FinalResponse
          <ph type="x-smartling-placeholder">- </ph>
            
- JSON 表示法
 
- CustomPushMessage
          <ph type="x-smartling-placeholder">- </ph>
            
- JSON 表示法
 
- UserNotification
          <ph type="x-smartling-placeholder">- </ph>
            
- JSON 表示法
 
- 目标
          <ph type="x-smartling-placeholder">- </ph>
            
- JSON 表示法
 
AppResponse 是执行方式向 Google 助理发送的响应。有关如何在 Actions on Google 中使用此操作的示例,请参阅 https://developers.google.com/assistant/df-asdk/reference/conversation-webhook-json#conversation-response-body
| JSON 表示法 | |
|---|---|
| { "conversationToken": string, "userStorage": string, "resetUserStorage": boolean, "expectUserResponse": boolean, "expectedInputs": [ { object ( | |
| 字段 | |
|---|---|
| conversationToken | 
 一个不透明的令牌,会在每个对话回合时循环到 Action。 | 
| userStorage | 
 由 Action 控制的不透明令牌,对于特定用户,在各对话中保持不变。如果为空或未指定,则现有的持久令牌将保持不变。该字符串的大小上限为 10k 字节。如果同一用户同时出现多个对话框,则对此令牌的更新可能会意外地互相覆盖。 | 
| resetUserStorage | 
 是否清除持久化的 userStorage。如果设为 true,那么在下一次与用户互动时,userStorage 字段将为空。 | 
| expectUserResponse | 
 指明 Action 是否需要用户响应。当对话正在进行时,值为 true;如果对话已结束,则值为 false。 | 
| expectedInputs[] | 
 Action 期望的输入列表,每个输入可以是针对 Google intent 的常用操作(以“actions.”开头),也可以是采用一系列可能 intent 的输入。目前仅支持一种输入方式。 | 
| finalResponse | 
 Action 不需要用户输入输入内容时的最终响应。 | 
| customPushMessage | 
 一种自定义推送消息,允许开发者向 Google 上的操作发送结构化数据。 | 
| isInSandbox | 
 指明是否应在沙盒模式下处理响应。要在沙盒模式下将结构化数据推送到 Google,需要使用此位。 | 
ExpectedInput
| JSON 表示法 | |
|---|---|
| { "inputPrompt": { object ( | |
| 字段 | |
|---|---|
| inputPrompt | 
 用于要求用户输入的自定义提示。 | 
| possibleIntents[] | 
 可用于完成此输入的 intent 列表。如需让操作在 Google 上仅返回原始用户输入,应用应请求  | 
| speechBiasingHints[] | 
 Action 希望 Google 用于语音纠偏的短语列表。最多可以输入 1,000 个词组。 | 
InputPrompt
输入提示,供 Google 助理用于引导用户为应用的问题提供输入。
| JSON 表示法 | |
|---|---|
| { "initialPrompts": [ { object ( | |
| 字段 | |
|---|---|
| initialPrompts[] | 
 初始提示,要求用户提供输入。仅支持一个 initial_prompt。 | 
| richInitialPrompt | 
 提示载荷。 | 
| noInputPrompts[] | 
 用于在用户未输入内容时询问用户的提示。 | 
SpeechResponse
回复仅包含语音内容。已弃用。
| JSON 表示法 | |
|---|---|
| { // Union field | |
| 字段 | ||
|---|---|---|
| 联合字段 type。语音输出的类型:文字转语音或 SSML。type只能是下列其中一项: | ||
| textToSpeech | 
 语音输出的纯文本,例如“您想要去哪里?”/ | |
| ssml | 
 以 SSML 格式向用户提供结构化语音回复,例如“ | |
RichResponse
可包含音频、文本、卡片、建议和结构化数据的富响应。
| JSON 表示法 | |
|---|---|
| { "items": [ { object ( | |
| 字段 | |
|---|---|
| items[] | 
 构成响应的界面元素列表。这些项必须满足以下要求:1.第一项必须是  | 
| suggestions[] | 
 建议的回复列表。这些内容将始终显示在回答的末尾。如果用在  | 
| linkOutSuggestion | 
 可链接到关联的应用或网站的其他建议内容信息卡。 | 
项
响应的内容。
| JSON 表示法 | |
|---|---|
| { "name": string, // Union field | |
| 字段 | ||
|---|---|---|
| name | 
 此商品的可选命名标识符。 | |
| 联合字段 item。内容的类型。item只能是下列其中一项: | ||
| simpleResponse | 
 使用语音和短信回复。 | |
| basicCard | 
 基本卡片。 | |
| structuredResponse | 
 要由 Google 处理的结构化载荷。 | |
| mediaResponse | 
 指示要播放的一组媒体的响应。 | |
| carouselBrowse | 
 轮播式浏览卡片,请改用 collectionBrowse。 | |
| tableCard | 
 表格卡片。 | |
| htmlResponse | 
 用于在画布上呈现的 HTML 响应。 | |
SimpleResponse
包含要向用户显示的语音或文本的简单响应。
| JSON 表示法 | |
|---|---|
| { "textToSpeech": string, "ssml": string, "displayText": string } | |
| 字段 | |
|---|---|
| textToSpeech | 
 语音输出的纯文本,例如“您想要去哪里?”与 ssml 相互排斥。 | 
| ssml | 
 以 SSML 格式向用户提供结构化语音回复,例如 | 
| displayText | 
 要在聊天气泡中显示的可选文本。如果未指定,将使用上述 textToSpeech 或 ssml 的显示渲染方式。不得超过 640 个字符。 | 
BasicCard
用于显示某些信息的基本卡片,如图片和/或文字
| JSON 表示法 | |
|---|---|
| { "title": string, "subtitle": string, "formattedText": string, "image": { object ( | |
| 字段 | |
|---|---|
| title | 
 卡片的总体标题。可选。 | 
| subtitle | 
 可选。 | 
| formattedText | 
 卡片的正文。支持一组数量有限的 Markdown 语法。必填,除非显示图片。 | 
| image | 
 卡片的主打图片。高度固定为 192dp。可选。 | 
| buttons[] | 
 按钮。目前最多支持 1 个按钮。可选。 | 
| imageDisplayOptions | 
 图片显示选项的类型。可选。 | 
按钮
通常显示在卡片底部的按钮对象。
| JSON 表示法 | |
|---|---|
| {
  "title": string,
  "openUrlAction": {
    object ( | |
| 字段 | |
|---|---|
| title | 
 按钮的标题。必填。 | 
| openUrlAction | 
 用户点按该按钮时执行的操作。必填。 | 
StructuredResponse
为应用定义的响应,使用结构化数据进行响应。
| JSON 表示法 | |
|---|---|
| { // Union field | |
| 字段 | ||
|---|---|---|
| 联合字段 data。来自第三方代理的载荷响应容器。data只能是下列其中一项: | ||
| orderUpdate | 
 应用在收到订单后提供订单更新(例如  | |
| orderUpdateV3 | 
 收到订单后,应用以 API v3 格式提供订单更新。 | |
OrderUpdate
已弃用:请改用 V3 Proto。更新为订单。
| JSON 表示法 | |
|---|---|
| { "googleOrderId": string, "actionOrderId": string, "orderState": { object ( | |
| 字段 | ||
|---|---|---|
| googleOrderId | 
 订单的 ID 是 Google 签发的 ID。 | |
| actionOrderId | 
 必需。引用此订单的规范订单 ID。如果集成商没有在其系统中生成规范订单 ID,他们只需复制按顺序包含的 googleOrderId。 | |
| orderState | 
 订单的新状态。 | |
| orderManagementActions[] | 
 更新了订单的适用管理操作,例如管理、修改、与支持团队联系。 | |
| receipt | 
 订单收据。 | |
| updateTime | 
 从应用的角度更新订单的时间。 时间戳采用 RFC3339 世界协调时间(UTC,即“祖鲁时”)格式,精确到纳秒。示例: | |
| totalPrice | 
 订单的新总价 | |
| lineItemUpdates | 
 订单项级更改的地图,按项目 ID 键控。可选。 包含一系列  | |
| userNotification | 
 指定此标志时,系统会向用户显示一条包含指定标题和文本的通知。指定通知只是建议发送通知,并不保证一定会带来通知。 | |
| infoExtension | 
 基于自定义订单状态或标准状态信息以外的额外数据。 此对象可以包含任意类型的字段。附加字段  | |
| 联合字段 info。与订单状态相关的额外信息。info只能是下列其中一项: | ||
| rejectionInfo | 
 有关拒绝状态的信息。 | |
| cancellationInfo | 
 有关取消状态的信息。 | |
| inTransitInfo | 
 有关运送状态的信息。 | |
| fulfillmentInfo | 
 有关履单状态的信息。 | |
| returnInfo | 
 有关返回状态的信息。 | |
操作
与订单更新相关的后续操作。
| JSON 表示法 | |
|---|---|
| { "type": enum ( | |
| 字段 | |
|---|---|
| type | 
 操作类型。 | 
| button | 
 按钮标签和链接。 | 
收据
已弃用:请改用 V3 Proto。在状态为 CONFIRMED 或任何其他状态(例如 IN_TRANSIT、FULFILLED)时(包括 CONFIRMED 状态)的收据。
| JSON 表示法 | |
|---|---|
| { "confirmedActionOrderId": string, "userVisibleOrderId": string } | |
| 字段 | |
|---|---|
| confirmedActionOrderId | 
 集成商收到订单时确认的订单 ID。这是集成商系统引用订单时使用的规范订单 ID,随后可能被用于将订单标识为  请注意,此字段已弃用。请改为通过 OrderUpdate.action_order_id 传递该字段。 | 
| userVisibleOrderId | 
 可选。面向用户的 ID,此 ID 引用了当前订单,此 ID 将显示在收据卡片(如果有)中。此 ID 应是通常显示在打印收据或发送至用户电子邮件的收据上的 ID。用户应该能够使用此 ID 引用其订单,以便使用集成商提供的客户服务。请注意,如果集成商为带有打印收据 / 电子邮件收据的订单生成了面向用户的 ID,则必须填写此字段。 | 
RejectionInfo
状态为 REJECTED 时的拒绝信息。此消息可以在对话中的初始订单更新中填充,也可以通过后续的异步订单更新填充。
| JSON 表示法 | |
|---|---|
| {
  "type": enum ( | |
| 字段 | |
|---|---|
| type | 
 拒绝类型。 | 
| reason | 
 错误的原因。 | 
CancellationInfo
已弃用:请改用 V3 Proto。状态为 CANCELLED 时的取消信息。
| JSON 表示法 | |
|---|---|
| { "reason": string } | |
| 字段 | |
|---|---|
| reason | 
 取消原因。 | 
InTransitInfo
已弃用:请改用 V3 Proto。状态为 IN_TRANSIT 时的公交信息。
| JSON 表示法 | |
|---|---|
| { "updatedTime": string } | |
| 字段 | |
|---|---|
| updatedTime | 
 运送时间的上次更新时间。 时间戳采用 RFC3339 世界协调时间(UTC,即“祖鲁时”)格式,精确到纳秒。示例: | 
FulfillmentInfo
已弃用:请改用 V3 Proto。状态为 FULFILLED 时的执行信息。
| JSON 表示法 | |
|---|---|
| { "deliveryTime": string } | |
| 字段 | |
|---|---|
| deliveryTime | 
 履行订单的时间。 时间戳采用 RFC3339 世界协调时间(UTC,即“祖鲁时”)格式,精确到纳秒。示例: | 
ReturnInfo
已弃用:请改用 V3 Proto。状态为 REJECTED 时的返回信息。
| JSON 表示法 | |
|---|---|
| { "reason": string } | |
| 字段 | |
|---|---|
| reason | 
 退货原因。 | 
UserNotification
作为订单更新的一部分显示的可选用户通知。
| JSON 表示法 | |
|---|---|
| { "title": string, "text": string } | |
| 字段 | |
|---|---|
| title | 
 用户通知的标题。 | 
| text | 
 通知的内容。 | 
MediaResponse
指示要在对话中播放的一组媒体的响应。
| JSON 表示法 | |
|---|---|
| { "mediaType": enum ( | |
| 字段 | |
|---|---|
| mediaType | 
 媒体类型。 | 
| mediaObjects[] | 
 媒体对象的列表。 | 
MediaObject
表示随 MediaResponse 返回的一个媒体对象。包含有关媒体的信息,例如名称、说明、网址等。
| JSON 表示法 | |
|---|---|
| { "name": string, "description": string, "contentUrl": string, // Union field | |
| 字段 | ||
|---|---|---|
| name | 
 此媒体对象的名称。 | |
| description | 
 此媒体对象的说明。 | |
| contentUrl | 
 指向媒体内容的网址。 | |
| 联合字段 image。与媒体卡片一起显示的图片。image只能是下列其中一项: | ||
| largeImage | 
 大图片,例如影集的封面等。 | |
| icon | 
 标题右侧会显示一个小图片图标。其大小已调整为 36x36 dp。 | |
CarouselBrowse
以大图块内容轮播形式显示一组 AMP 文档。这些项目可能会被选中,以便在 AMP 查看工具中启动与其关联的 AMP 文档。
| JSON 表示法 | |
|---|---|
| { "items": [ { object ( | |
| 字段 | |
|---|---|
| items[] | 
 最小值:2。最大值:10。 | 
| imageDisplayOptions | 
 图片显示选项的类型。可选。 | 
项
轮播界面中的项。
| JSON 表示法 | |
|---|---|
| { "title": string, "description": string, "footer": string, "image": { object ( | |
| 字段 | |
|---|---|
| title | 
 轮播项的标题。必填。 | 
| description | 
 轮播项的说明。可选。 | 
| footer | 
 轮播项的页脚文字,显示在说明下方。一行文本,用省略号截断。可选。 | 
| image | 
 轮播项的主打图片。可选。 | 
| openUrlAction | 
 与轮播项相关联的文档的网址。文档可以包含 HTML 内容,或者,如果为“urlTypeHint”设为 AMP_CONTENT,即 AMP 内容。必填。 | 
TableCard
用于显示文本表格的表格卡片。
| JSON 表示法 | |
|---|---|
| { "title": string, "subtitle": string, "image": { object ( | |
| 字段 | |
|---|---|
| title | 
 表格的总体标题。可选,但如果设置了字幕,则必须设置该字段。 | 
| subtitle | 
 表格的副标题。可选。 | 
| image | 
 与表关联的图片。可选。 | 
| columnProperties[] | 
 标题和列的对齐方式。 | 
| rows[] | 
 表中的行数据。前 3 行保证会显示,但其他行可能会被在某些平台上剪切。请使用模拟器进行测试,看看将针对给定 Surface 显示哪些行。在支持 WEB_BROWSER 功能的平台上,您可以将用户引导至包含更多数据的网页。 | 
| buttons[] | 
 按钮。目前最多支持 1 个按钮。可选。 | 
ColumnProperties
保留列的属性(包括标题)。
| JSON 表示法 | |
|---|---|
| {
  "header": string,
  "horizontalAlignment": enum ( | |
| 字段 | |
|---|---|
| header | 
 列的标题文本。 | 
| horizontalAlignment | 
 内容与列的水平对齐方式。如果未指定,内容将与前缘对齐。 | 
行
描述表中的行。
| JSON 表示法 | |
|---|---|
| {
  "cells": [
    {
      object ( | |
| 字段 | |
|---|---|
| cells[] | 
 此行中的单元格。前 3 个单元格一定会显示,但其他单元格可能会被在某些表面上剪切。请使用模拟器进行测试,看看将针对给定 Surface 显示哪些单元格。 | 
| dividerAfter | 
 指示每行后是否应有分隔线。 | 
单元格
描述一行中的单元格。
| JSON 表示法 | |
|---|---|
| { "text": string } | |
| 字段 | |
|---|---|
| text | 
 单元格的文本内容。 | 
HtmlResponse
使用交互式画布功能显示 HTML 的响应。最大 响应为 50k 字节。
| JSON 表示法 | |
|---|---|
| { "updatedState": value, "suppressMic": boolean, "url": string } | |
| 字段 | |
|---|---|
| updatedState | 
 将以下 JSON 对象传达给应用。 | 
| suppressMic | 
 提供相应选项,让系统在您做出此沉浸式回答后不打开麦克风。 | 
| url | 
 应用的网址。 | 
建议
一个建议内容信息卡,用户可以点按该信息卡以快速发布对对话的回复。
| JSON 表示法 | |
|---|---|
| { "title": string } | |
| 字段 | |
|---|---|
| title | 
 建议内容信息卡中显示的文本。用户点按后,这些文字会一字不差地重新发布到对话中,就如同用户已经输入了一样。每个标题在一组建议内容信息卡中必须是唯一的。最多 25 个字符(必填) | 
LinkOutSuggestion
创建一个建议内容信息卡,以便用户跳转至与此代理关联的应用或网站。
| JSON 表示法 | |
|---|---|
| {
  "destinationName": string,
  "url": string,
  "openUrlAction": {
    object ( | |
| 字段 | |
|---|---|
| destinationName | 
 此条状标签所链接到的应用或网站的名称。该条状标签将以“打开  | 
| url | 
 已弃用。请改用 OpenUrlAction。 | 
| openUrlAction | 
 用户点按建议内容信息卡后要打开的应用或网站的网址。您必须在 Google 开发者控制台上的操作中验证此应用/网址的所有权,否则相关建议不会向用户显示。“打开网址”操作支持 http、https 和 intent 网址。如需了解 intent 网址,请参阅:https://developer.chrome.com/multidevice/android/intents | 
ExpectedIntent
应用要求 Google 助理提供的预期 intent。
| JSON 表示法 | |
|---|---|
| { "intent": string, "inputValueData": { "@type": string, field1: ..., ... }, "parameterName": string } | |
| 字段 | |
|---|---|
| intent | 
 内置 intent 的名称,例如 | 
| inputValueData | 
 内置 intent 所需的其他配置数据。内置 intent 的可能值: 此对象可以包含任意类型的字段。附加字段  | 
| parameterName | 
 (可选)正在请求的 intent 的参数。仅对请求的 intent 有效。用于语音纠偏。 | 
FinalResponse
不需要用户输入内容的最终响应。
| JSON 表示法 | |
|---|---|
| { // Union field | |
| 字段 | ||
|---|---|---|
| 联合字段 response。可能的响应类型。response只能是下列其中一项: | ||
| speechResponse | 
 无需用户提供输入内容时的语音回复。 | |
| richResponse | 
 无需用户提供输入内容时的富响应。 | |
CustomPushMessage
自定义推送消息,其中包含要为 Actions Fulfillment API 推送的结构化数据。
| JSON 表示法 | |
|---|---|
| { "target": { object ( | |
| 字段 | ||
|---|---|---|
| target | 
 推送请求的指定目标。 | |
| 联合字段 content。不同类型的载荷。content只能是下列其中一项: | ||
| orderUpdate | 
 订单更新会更新通过交易 API 下达的订单。 | |
| userNotification | 
 如果指定,则向用户显示带有指定标题和文本的通知。 | |
UserNotification
随请求一起显示的用户通知。
| JSON 表示法 | |
|---|---|
| { "title": string, "text": string } | |
| 字段 | |
|---|---|
| title | 
 通知的标题。 | 
| text | 
 通知的内容。 | 
目标
推送请求的指定目标。
| JSON 表示法 | |
|---|---|
| {
  "userId": string,
  "intent": string,
  "argument": {
    object ( | |
| 字段 | |
|---|---|
| userId | 
 要定位的用户。 | 
| intent | 
 要定位的意图。 | 
| argument | 
 要作为 intent 目标的参数。V1 仅支持一个参数。 | 
| locale | 
 要定位的语言区域。遵循 IETF BCP-47 语言代码。可供多语言应用用来定位指定的本地化应用的用户。如果未指定,则默认为 en-US。 | 
