UserMessage

使用者傳送給服務專員的訊息。

UserMessage 會顯示在代理程式透過 Google Pub/Sub 訂閱收到的「message」物件的「data」欄位中。「data」欄位是 Base64 編碼的字串,代理程式必須解碼才能符合 UserMessage 結構。

JSON 表示法
{
  "senderPhoneNumber": string,
  "messageId": string,
  "sendTime": string,
  "agentId": string,

  // Union field content can be only one of the following:
  "text": string,
  "userFile": {
    object (UserFile)
  },
  "location": {
    object (LatLng)
  },
  "suggestionResponse": {
    object (SuggestionResponse)
  }
  // End of list of possible types for union field content.
}
欄位
senderPhoneNumber

string

傳送訊息的使用者電話號碼 (E.164 格式)。

messageId

string

傳送使用者 RCS 用戶端指派的專屬郵件 ID。

sendTime

string (Timestamp format)

傳送郵件的時間。

使用 RFC 3339,產生的輸出內容一律會經過 Z 標準化,並使用 0、3、6 或 9 個小數點後位數。系統也接受「Z」以外的偏移量。例如:"2014-10-02T15:01:23Z""2014-10-02T15:01:23.045123456Z""2014-10-02T15:01:23+05:30"

agentId

string

代理程式的專屬 ID。由企業專用 RCS 設定。

聯集欄位 content。訊息 content 的內容只能是下列其中一項:
text

string

文字,具體來說,是透過自然使用者輸入建立的字串,而非建議的回覆。

userFile

object (UserFile)

媒體檔案。

location

object (LatLng)

。請注意,這不一定是使用者的位置。使用者可以將任意位置傳送給服務專員。

suggestionResponse

object (SuggestionResponse)

使用者輕觸建議的回覆或動作後產生的回覆。