Notification.addListener()
The ZohoSalesIQ.Notification.addListener allows you to register a callback that is to be invoked whenever an event is triggered regarding the notification.
Event | Invoked when |
NOTIFICATION_CLICKED | when the notification clicked. |
Example
Copied const { Event } = ZohoSalesIQ.Notification
ZohoSalesIQ.Notification.addListener(({event, body}) => {
switch (event) {
case Event.NOTIFICATION_CLICKED:
// body: NotificationPayloadResult
console.log("EVENT_NOTIFICATION_CLICKED", body)
ZohoSalesIQ.Chat.open(body);
break;
default:
break;
}
})