UserMessage

用户发送给代理的消息。

UserMessage 出现在代理收到的 message 对象的 data 字段中。data 字段是一个 base64 编码的字符串,代理必须将其转换为字节并使用 UserMessage 协议缓冲区进行解析。

JSON 表示法
{
  "requestId": string,
  "conversationId": string,
  "customAgentId": string,
  "agent": string,
  "context": {
    object (Context)
  },
  "sendTime": string,
  "dialogflowResponse": {
    object (DialogflowResponse)
  },

  // Union field payload can be only one of the following:
  "message": {
    object (Message)
  },
  "receipts": {
    object (Receipts)
  },
  "userStatus": {
    object (UserStatus)
  },
  "surveyResponse": {
    object (SurveyResponse)
  },
  "suggestionResponse": {
    object (SuggestionResponse)
  },
  "authenticationResponse": {
    object (AuthenticationResponse)
  }
  // End of list of possible types for union field payload.
}
字段
requestId

string

用户消息的唯一标识符。使用此字段可删除重复的传入邮件。

conversationId

string

对话的唯一标识符。

customAgentId

string

代理的自定义标识符。由合作伙伴在注册代理期间定义。

agent

string

代理的标识符。在创建代理期间设置。

context

object (Context)

与消息相关的上下文数据。

sendTime

string (Timestamp format)

消息的发送时间。

时间戳,采用 RFC3339 世界协调时间 (UTC)(即“祖鲁时”)格式,具有纳秒级分辨率,最多包含九个小数位。示例:"2014-10-02T15:01:23Z""2014-10-02T15:01:23.045123456Z"

dialogflowResponse

object (DialogflowResponse)

Dialogflow 响应。

联合字段 payload。用户消息的载荷。payload 只能是下列其中一项:
message

object (Message)

消息的内容。

receipts

object (Receipts)

收据的内容。

userStatus

object (UserStatus)

用户状态的内容。

surveyResponse

object (SurveyResponse)

调查问卷回复。

suggestionResponse

object (SuggestionResponse)

建议响应。

authenticationResponse

object (AuthenticationResponse)

身份验证响应。

UserStatus

用户状态。

JSON 表示法
{
  "createTime": string,

  // Union field status can be only one of the following:
  "isTyping": boolean,
  "requestedLiveAgent": boolean
  // End of list of possible types for union field status.
}
字段
createTime

string (Timestamp format)

用户状态发生更改的时间。

时间戳,采用 RFC3339 世界协调时间 (UTC)(即“祖鲁时”)格式,具有纳秒级分辨率,最多包含九个小数位。示例:"2014-10-02T15:01:23Z""2014-10-02T15:01:23.045123456Z"

联合字段 status

status 只能是下列其中一项:

isTyping

boolean

用户是否正在输入。

requestedLiveAgent

boolean

用户是否请求了人工客服。