Clients subscribe to the Server-Sent Events endpoint to receive server-side events.
These events encompass diverse message entries and provide supplementary information related to the conversation entry.
For a comprehensive understanding of the various supported message types and formats, please refer to the “Message Types & Format Types” section.
CONVERSATION_CLOSE_CONVERSATION
The CONVERSATION_CLOSE_CONVERSATION event handles when the client receives an indicator or a confirmation that the conversation is closed.
This event only triggers when the end user closes the conversation, not when an agent ends a session. To handle when sessions end regardless of who initiated it, see the CONVERSATION_SESSION_STATUS_CHANGED event.
The CONVERSATION_PARTICIPANT_CHANGED event handles when a new participant joins a conversation or an existing participant leaves. This event applies to a participant other than the end user using the Enhanced Chat client.
The CONVERSATION_PROGRESS_INDICATOR event allows you to display a progress indicator when an AI agent is responding to a conversation. Progress indicators are useful to provide more information and context to users when an AI Agent is executing complex actions.
The CONVERSATION_ROUTING_RESULT event handles routing to a rep or chatbot, such as when a conversation is initially created or when a conversation is transferred from a chatbot to a rep.
The CONVERSATION_SESSION_STATUS_CHANGED event notifies when a messaging session’s status changes. For example, this event is triggered when a messaging session status changes to NEW, ACTIVE, INACTIVE, or ENDED. This event allows you to track whether a session was created, accepted, or ended. This event is especially useful because the CONVERSATION_CLOSE_CONVERSATION event only triggers when the end user closes the conversation, not when an agent ends a session. The session status change event fills that gap by letting you detect when sessions end regardless of who initiated it.
The CONVERSATION_STREAMING_TOKEN event allows you to feed partial responses in real time as they become available, engaging users immediately and allowing them to consume content sooner.
1"{\"entryType\":\"StreamingToken\",\"id\":\"5f1085c6-e933-49d3-bf87-f7d52fac149a\",\"streamingToken\":{\"tokenType\":\"MessageStreamingToken\",\"sequenceNumber\":1,\"timestamp\":1741299980669,\"targetMessageIdentifier\":\"1741299974320-REQ-1\",\"token\":{\"formatType\":\"Text\",\"text\":\"Agentforce is a powerful tool that helps companies build AI agents to drive customer\"}}}",
The token type StreamingTokenValidation notifies you when there’s an issue like hallucination in the tokens streamed.
The CONVERSATION_TYPING_STARTED_INDICATOR event handles when the client receives a “typing started” indicator when the other participant, such as a rep or chatbot, starts typing a message.
The CONVERSATION_TYPING_STOPPED_INDICATOR event handles when the client receives a “typing stopped” indicator when the other participant, such as a rep or chatbot, stops typing a message.