Events

This guide shares the list of events emitted by messenger and can be listened using the Javascript API.

chat_window_maximized

The following event will fire whenever the chat window is opened manually or using the maximize method.

kayako.on('chat_window_maximized', function () {
})

chat_window_minimized

The opposite of the chat_window_maximized.

kayako.on('chat_window_minimized', function () {
})

chat_window_hidden

The following event will fire whenever the chat window display is set to hidden using hide method.

kayako.on('chat_window_hidden', function () {
})

chat_window_shown

Opposite of chat_window_hidden

kayako.on('chat_window_shown', function () {
})

chat_state_changed

This event will fire when status for an on-going chat changes.

kayako.on('chat_state_changed', function (conversation, state) {
})

chat_started

This event will fire whenever a new conversation starts. Also chat_state_changed event will fire. Think of this event as a shorthand.

kayako.on('chat_started', function (conversation) {
})

chat_ended

This event will fire whenever an ongoing conversation ends. Also chat_state_changed event will fire. Think of this event as a shorthand.

kayako.on('chat_ended', function (conversation) {
})

unread_messages_count_changed

This event will fire when unread count of messages will change.

kayako.on('unread_messages_count_changed', function (count) {
})

engagement_block_maximized

This event will fire when engagement block is shown.

kayako.on('engagement_block_maximized', function () {
})