Setting up custom callbacks for your HelpDesk provider

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.

How did we do?

Powered by HelpDocs (opens in a new tab)

Powered by HelpDocs (opens in a new tab)