AI-generated Key Takeaways
-
Agents receive user messages within the
data
field of amessage
object, encoded as base64 strings. -
Agents need to decode the
data
field and parse it using theUserMessage
protocol buffer to access the message content. -
The
UserMessage
object contains various fields likerequestId
,conversationId
,agent
,context
, and more to provide context about the message. -
The
payload
field withinUserMessage
can contain different types of user interactions, such as a regular message, receipts, user status (like typing or requesting a live agent), survey responses, suggestion responses, and authentication responses. -
UserStatus
provides information about the user's current state, including whether they are typing or have requested a live agent.
A message sent from a user to an agent.
UserMessage
appears in data
field of the message
object that agents receive. The data
field is a base64-encoded strings that agents must convert to bytes and parse with the UserMessage
protocol buffer.
JSON representation |
---|
{ "requestId": string, "conversationId": string, "customAgentId": string, "agent": string, "context": { object ( |
Fields | |
---|---|
requestId |
The unique identifier of the user message. Use this field to de-duplicate incoming messages. |
conversationId |
The unique identifier of the conversation. |
customAgentId |
A custom identifier for the agent. Defined by the partner during agent registration. |
agent |
Identifier for the agent. Set during agent creation. |
context |
Contextual data associated to the message. |
sendTime |
Time at which the message was sent. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
dialogflowResponse |
The Dialogflow response. |
Union field payload . The payload of the user message. payload can be only one of the following: |
|
message |
The content of the message. |
receipts |
The content of the receipts. |
userStatus |
The content of the user status. |
surveyResponse |
The survey response. |
suggestionResponse |
The suggestion response. |
authenticationResponse |
The authentication response. |
UserStatus
A user status.
JSON representation |
---|
{ "createTime": string, // Union field |
Fields | |
---|---|
createTime |
The time that the user status changed. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
Union field
|
|
isTyping |
Whether user is typing. |
requestedLiveAgent |
Whether user requested a live agent. |