UserMessage

使用者傳送給代理程式的訊息。

代理程式會從 Google Pub/Sub 訂閱項目接收「訊息」物件的「資料」欄位,找到 UserMessage。「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 Business Messaging 設定。

聯集欄位 contentcontent 訊息的內容只能採用下列其中一種格式:
text

string

文字,具體是指透過自然使用者輸入內容產生的字串,而非建議回覆。

userFile

object (UserFile)

媒體檔案。

location

object (LatLng)

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

suggestionResponse

object (SuggestionResponse)

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