State Event
An event representing a change in the chat session's lifecycle state.
StateEvent is delivered through ChatEventListener.onChatStateChanged each time the chat transitions between states. Use the state property to determine the current lifecycle phase, and data for any associated payload.
For Ended and Closed, data contains the EndedReason indicating why the chat ended. Most integrators react to Closed (the terminal state), but Ended also carries EndedReason in cases such as a force-close, an idle timeout, or a recoverable disconnect.
The typical happy-path progression is:
Preparing → Prepared → Started → Ending → Ended → Closed
Parameters
The current state of the chat session. One of the constants defined in the companion object.
Inheritors
Types
Properties
The event category, for example "state" for com.genesys.cloud.integration.core.StateEvent or "error" for com.genesys.cloud.integration.core.ErrorEvent.