If you need to setup a Callback event for your HelpDesk provider (i.e. such as when the Chat widget is closed or opened, then this can be achieved by adding a "callbacks" item to your helpShelfSettings object.
When initialising the HelpShelf script, simply add a "callback" item to the helpShelfSettings object, as shown below.
window.helpShelfSettings = {
"siteKey": "xxxxxxx",
"callbacks": {
onChatClosed: function() {
// Do something special here
},
}
};
Please note that the name of the Callback (onChatClosed in the example above) must match the name of a valid callback as defined by the Helpdesk provider.
For example, if you are using Customerly as your Helpdesk provider, then they have a callback called onChatClosed (as described here), as such registering a callback with that name will work. Whereas, Intercom may not have a callback by that name. You must therefore make sure to refer to the Helpdesk providers documentation to establish which callbacks are actually available.
Our team is ready to support you with any inquiries you may have. We're just a message away!