AI-generated Key Takeaways
- 
          
UserMessageis sent from a user to an agent and is found in the base64-encodeddatafield of themessageobject that agents receive. - 
          
Agents must convert the base64-encoded
datafield to bytes and parse it with theUserMessageprotocol buffer. - 
          
The
UserMessageobject contains various fields such asrequestId,conversationId, andsendTime, as well as a union fieldpayloadwhich can contain different types of user interactions like messages, receipts, or user status. - 
          
The
UserStatusobject indicates changes in user status such as typing or requesting a live agent, and includes acreateTimetimestamp. 
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.  |