Server-Sent Events

The Server-Sent Events endpoint is the interface through which clients establish connections to server-sent events to receive messages and events from the server.

These messages encompass a variety of content, such as messages sent by agents or bots, system events, echoes of end-user messages, participant modifications, and similar events. Once a call is made to the endpoint, the browser keeps the connection open and receives the events from the server.



Standard header. The media types that the client can accept from the server. Valid media type is text/event-stream.

Standard header. The authorization token, where is the JSON Web Token (JWT) provided by one of the Messaging for In-App and Web access token APIs. Required.

String. The 15-character org ID of the Salesforce org where Messaging for In-App and Web is set up. Last-Event-Id: String. The ID used to help establish connections to server-sent events (SSE) to receive messages and events from the server. Get the lastEventId value when you generate an access token.

First Term

This text defines the first term.

Property NameTypeDescriptionRequired
channelPlatformKeystringToken used to send notifications to this device.Yes
channelTypestringThe channel type. Set this value to “emedded_messaging”Yes
channelAddressIdentifierThe ID of the Messaging Channel record.Yes
conversationIdThe UUID of the conversation. The UUID must be in lowercase.Yes
conversationEntryobjectAn object representing a conversation entry that’s initiated by an agent, end user, bot, or auto-response.Yes
conversationEntry.senderDisplayNameThe display name of the agent, end user, bot, or auto-response that initiated the conversation entry. Possible display names include Guest (for the end user), Agent, and Automated Process (from a Salesforce-generated automated process).
conversationEntry.identifierThe ID of the conversation entry.
conversationEntry.entryTypeenumThe type of conversation entry. Examples of conversation entries include a block of message text, a participant change, a routing action, an agent status updates, and a typing status.
conversationEntry.entryPayloadThe payload for the conversation entry that the SSE receives.

The payload details depend on the entryType. For example, if entryType is “TypingStoppedIndicator”, then entryPayload includes the ID and timestamp details for the CONVERSATION_TYPING_STOPPED_INDICATOR event.


See SSE Events Structure for a list of supported SSEs and their sample payloads.
conversationEntry.senderThe participant who sent the conversation entry and the details associated with the conversation, including the role (role) of the participant that is responsible for the event, such as System, Chatbot, Agent, End User, Router, the app type (appType) used for the conversation, which is always set to “conversation”, and the unique subject ID (subject) of the sender participant.

"role": "System",
"appType": "conversation",
"subject": "005SB000000AEo5",
"clientIdentifier": "
conversationEntry.transcriptedTimestampThe date and time (in UTC) when the conversation entry was received by the Salesforce server.Yes
conversationEntry.clientTimestampThe date and time (in UTC) when the conversation entry was sent by the client.Yes