AI-generated Key Takeaways
-
UserMessage data is received by the agent in a base64-encoded string within the "data" field of the "message" object, which must be decoded.
-
The UserMessage includes fields such as
senderPhoneNumber
,messageId
,sendTime
, andagentId
, providing details about the sender and message metadata. -
The
content
field of a UserMessage can represent various types of user input, includingtext
,userFile
,location
, orsuggestionResponse
. -
sendTime
follows RFC 3339 format, which supports fractional digits and time offsets, ensuring precise time information. -
The
senderPhoneNumber
is the user's number in E.164 format, andmessageId
is a unique identifier assigned to the message by the user's RCS client.
A message that a user sent to the agent.
The UserMessage appears in the "data" field of the "message" object that the agent receives from its Google Pub/Sub subscription. The "data" field is a base64-encoded string that the agent must decode to match the UserMessage structure.
JSON representation |
---|
{ "senderPhoneNumber": string, "messageId": string, "sendTime": string, "agentId": string, // Union field |
Fields | |
---|---|
senderPhoneNumber |
Phone number (in E.164 format) of the user that sent the message. |
messageId |
A unique message ID, assigned by the sending user's RCS client. |
sendTime |
Time at which the message was sent. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: |
agentId |
The agent's unique identifier. Set by RCS for Business. |
Union field content . Content of the message content can be only one of the following: |
|
text |
Text, specifically a string created through organic user typing and not a suggested reply. |
userFile |
Media file. |
location |
Location. Note that this is not necessarily the user's location. A user is able to send arbitrary locations to an agent. |
suggestionResponse |
Response generated by a user tapping a suggested reply or action. |