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

使用者訊息的專屬 ID。這個欄位可用於刪除重複收到的郵件,

conversationId

string

對話的專屬 ID。

customAgentId

string

代理程式的自訂 ID。合作夥伴在註冊服務專員時定義。

agent

string

代理程式的 ID。在建立代理程式時設定。

context

object (Context)

與訊息相關的內容比對資料。

sendTime

string (Timestamp format)

傳送訊息的時間。

RFC3339 世界標準時間「Zulu」格式的時間戳記,採用奈秒解析度,且最多 9 個小數位數。範例:"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 世界標準時間「Zulu」格式的時間戳記,採用奈秒解析度,且最多 9 個小數位數。範例:"2014-10-02T15:01:23Z""2014-10-02T15:01:23.045123456Z"

聯集欄位 status

status 只能採用下列其中一種設定:

isTyping

boolean

使用者是否在輸入訊息。

requestedLiveAgent

boolean

使用者是否要求真人服務專員。