Listen for Chat events

Learn how to add listeners for chat events.

You can add listeners to receive and respond to chat updates. For example, you can set up a listener to automatically open the Kustomer Chat UI when a message is received.

To listen for chat events, implement and add the KusChatListener interface to your Kustomer Chat instance.


KusChatListener supported events

The KusChatListener interface supports the following events:

  • When an agent or customer receives a message
  • When the agent starts and stops typing
  • When the unread count updates for a conversation
  • When information about an agent changes (for example, when an agent joins chat or responds to a conversation for the first time)
  • When the conversation preview text updates after receipt of a new message
  • When a conversation ends