Qiscus Omnichannel Widget's API (Callback)

  • Updated

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

Param Detail
AppId Your Application ID, located inside settings > app information. You'll get this data filled automatically when you use the snippet inside the integration page.
Params Additional Configuration for modifying the widget further. See the Parameters section.

 

Parameters

Param Detail
onLoginSuccess This is a callback function that is triggered when the user is successfully logged in.
onLoginSuccess(data) {
	console.log(data) // user object
}
onLoginError This is a callback function that is triggered when the user failed to log in.
onLoginError(error) {
	console.log(error) // Error Message
}
onRoomChanged This 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.
}
onNewMessages This 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.
}
onMaximize This is a callback function that is triggered when the widget is maximized.
onMaximize() {
	console.log("maximized") // Any functions you want to call when maximized
}
onMinimize This is a callback function that is triggered when the widget is minimized.
onMinimize() {
	console.log("minimized") // Any functions you want to call when minimized
}

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.