Qiscus Omnichannel Widget's API (Callback)

Implementing Qiscus Omnichannel's widget is easy. You just need to navigate to the integration page of Qiscus, copy the snippet, and voila the widget is ready to use. But for those who are eager to tinker a bit. Here's detailed information about the API.

new Qismo('YOUR-APP-ID', {
// params
options: {
  channel_id: 'CHANNEL-ID',
  extra_fields: [],
  widgetCustomCSS: ''
},
onLoginSuccess(data) {},
...
}
)
 

Parameters

ParamDetail
AppIdYour Application ID, located inside settings > app information. You'll get this data filled automatically when you use the snippet inside the integration page.
ParamsAdditional Configuration for modifying the widget further. See the Parameters section.

Parameters

ParamDetail
onLoginSuccessThis is a callback function that is triggered when the user is successfully logged in.
onLoginSuccess(data) {	console.log(data) // user object}
onLoginErrorThis is a callback function that is triggered when the user failed to log in.
onLoginError(error) {	console.log(error) // Error Message}
onRoomChangedThis is a callback function that is triggered when the user is changing to an active room.
onRoomChanged(data) {	console.log(data) // Room Object e.g.: room name, participants, etc.}
onNewMessagesThis is a callback function that is triggered when there's an incoming message.
onNewMessages(data) {	console.log(data) // Message object e.g.: message, sender, extra params, etc.}
onMaximizeThis is a callback function that is triggered when the widget is maximized.
onMaximize() {	console.log("maximized") // Any functions you want to call when maximized}
onMinimizeThis is a callback function that is triggered when the widget is minimized.
onMinimize() {	console.log("minimized") // Any functions you want to call when minimized}

Need further assistance?

Our helpful customer support team is available to help you with any inquiries you may have

Contact Us