sendCustomEvent()

Sends a custom event to the client-side chat window for a chat with a specific chat key. Available in API version 29.0 or later.

NameTypeDescription
chatKeyStringThe chatKey associated with the chat to which to send a custom event.
typeStringThe name of the custom event you want to send to the chat window.
dataStringAdditional data you want to send to the chat window along with the custom event.
callbackfunctionJavaScript method called upon completion of the method.

This method is asynchronous so it returns its response in an object in a callback method. The response object contains the following properties:

NameTypeDescription
successBooleantrue if sending the custom event was successful; false if sending the custom event wasn’t successful.