We expose some functions in the Frontend to programmtically control the Chat window.


Opens the chat window. Useful for programmatically triggering the chat window from an explicit support flow or button on your site.


Closes the chat window.


Pass in a callback function that is called when the unread message count changes. If you pass in null as the callback function, the existing callback is removed.

window.Pylon("onChangeUnreadMessagesCount", function(unreadCount) {
  console.log("unread changed!", unreadCount)