AI-generated Key Takeaways
-
A UserEvent represents an event on the user's RCS client related to a conversation with the agent, such as typing or reading a message.
-
UserEvent data is received in the "data" field of the "message" object from the Google Pub/Sub subscription and needs to be base64-decoded.
-
The JSON structure of a UserEvent includes fields like
senderPhoneNumber
,eventType
,eventId
,messageId
,sendTime
, andagentId
.
An event that occurred on the user's RCS client and was related to a conversation with the agent.
For instance, an event can indicate that the user is typing or that an earlier message from the agent was read by the user.
The UserEvent 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 UserEvent structure.
JSON representation |
---|
{
"senderPhoneNumber": string,
"eventType": enum ( |
Fields | |
---|---|
senderPhoneNumber |
Phone number (in E.164 format) of the user involved in the event. |
eventType |
Type of the event. |
eventId |
A unique event ID, assigned by the sending user's RCS client. |
messageId |
The ID of the message that is associated with the event. For example, a message that was delivered to the user's RCS client or read by the user. This field is populated for DELIVERED and READ events. |
sendTime |
Time at which RCS client sends the event. 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. |