ServiceBell
Search…
Listening to Events
Integrate your application with the ServiceBell widget by listening for and reacting to events
The ServiceBell widget triggers events on the global window object in JavaScript that can be listened for and reacted to. Some of these events will get triggered by calls to the ServiceBell JavaScript API, but they can also be triggered by visitor interaction with the widget, or by admins interacting with visitors via the ServiceBell dashboard.

Events

Event name
Description
sb:initialized
Emits when the widget is fully initialized and ready to be interacted with.
sb:error
Emits if a critical error is encountered during widget initialization. The error is included in event.detail.
sb:expand
Emits on the widget going into its expanded state, either by the visitor clicking on the widget or by calling ServiceBell.expand().
sb:collapse
Emits on the widget going into its collapsed state, either by the visitor clicking on the widget or by calling ServiceBell.collapse().
sb:dialstart
Emits on the widget requesting assistance, either by the visitor clicking on the dial button or by calling ServiceBell.dial()
sb:dialcancel
Emits on the dial canceling, either by the visitor clicking "Cancel" or the "X" button on the top right of the widget while dialing.
sb:dialmiss
Emits on the widget going into the dial missed state after a period of time elapses after dialing but nobody answered the request for help.
sb:callstart
Emits on an admin starting a call with a visitor. This will emit before the visitor explicitly presses "accept" on the call.
sb:callend
Emits on a call ending, either by the visitor ending it, the admin ending it, or from a network connectivity issue.
Last modified 1mo ago
Copy link
Contents
Events