Context

与消息相关的情境数据。

JSON 表示法
{
  "entryPoint": enum (EntryPoint),
  "userInfo": {
    object (UserInfo)
  },
  "widget": {
    object (Widget)
  },
  "resolvedLocale": string,
  "customContext": string,

  // Union field place can be only one of the following:
  "placeId": string,
  "nearPlaceId": string
  // End of list of possible types for union field place.
}
字段
entryPoint

enum (EntryPoint)

用户点击的入口点。

userInfo

object (UserInfo)

撰写消息的用户的身份。

widget

object (Widget)

用于发起对话的微件的相关信息。

resolvedLocale

string

已解析的语言区域。基于位置、可能的语言偏好和其他因素匹配用户和支持的代理语言区域。语言区域值是格式正确的 IETF BCP 47 语言标记。

customContext

string

合作伙伴指定的上下文数据。

联合字段 place。可以设置 placeId 或 closePlaceId。place 只能是下列其中一项:
placeId

string

营业地点的地点 ID,即 Google 商家信息中使用的唯一标识符。

nearPlaceId

string

距离用户最近营业地点的地点 ID,即 Google 商家信息中使用的唯一标识符。

UserInfo

与消息关联的用户身份数据。

JSON 表示法
{
  "displayName": string,
  "userDeviceLocale": string
}
字段
displayName

string

用户的显示名。

userDeviceLocale

string

用户的语言区域。取决于设备的语言设置。

widget

与消息关联的微件信息。

JSON 表示法
{
  "url": string,
  "widgetContext": string
}
字段
url

string

集成微件的网址。

widgetContext

string

与 widget 关联的上下文字符串。由 widget 的 data-bm-widget-context 属性指定。