- Installation
- Push Notifications
- UI Customization
- API Reference
- .setTabOrder()
- Launcher Button Customization
- Zoho SalesIQ
- Launcher
- Chat
- .Chat.start()
- .Chat.addListener()
- .Chat.startWithTrigger()
- .Chat.setWaitingTime()
- .Chat.get()
- .setLanguage()
- .setDepartment()
- .setOperatorEmail()
- .Chat.setVisibility()
- .showOperatorImageInLauncher()
- .setChatTitle()
- .shouldOpenUrl()
- .showOperatorImageInChat()
- .setLauncherVisibility()
- .setThemeColorforiOS()
- .endChat()
- .showOfflineMessage()
- .setFeedbackVisibility()
- .setRatingVisibility()
- .getChats()
- .getChatsWithFilter()
- .openChat()
- .openChatWithID()
- .endChat()
- .fetchAttenderImage()
- .getDepartments()
- .isMultipleOpenChatRestricted()
- .getChatUnreadCount()
- .isChatEnabled()
- .showFeedbackAfterSkip()
- .hideQueueTime()
- .open()
- Chat Actions
- Visitors
- Notification Icon
- Notification
- Loggers
- Visitor Tracking
- In-App Notification
- Conversation
- Knowledge Base
- FAQ
- Download Sample App
- Release Notes
KnowledgeBase.addListener()
The ZohoSalesIQ.KnowledgeBase.addListener API provides resource event callbacks, allowing you to monitor various visitor actions related to the resources. These actions includes opening, closing, liking and disliking a resource.
Events | Invoked when |
RESOURCE_OPENED | a resource is opened |
RESOURCE_CLOSED | a resource is closed |
RESOURCE_LIKED | a resource is liked |
RESOURCE_DISLIKED | a resource is disliked |
Example
Copied const { Event } = ZohoSalesIQ.KnowledgeBase;
ZohoSalesIQ.KnowledgeBase.addListener(({event, body}) => {
switch (event) {
case Event.RESOURCE_OPENED:
console.log(body.resource, 'EVENT_RESOURCE_OPENED');
console.log(body.type, 'EVENT_RESOURCE_OPENED');
break;
case Event.RESOURCE_CLOSED:
console.log(body.resource, 'EVENT_RESOURCE_CLOSED');
console.log(body.type, 'EVENT_RESOURCE_CLOSED');
break;
case Event.RESOURCE_LIKED:
console.log(body.resource, 'EVENT_RESOURCE_LIKED');
console.log(body.type, 'EVENT_RESOURCE_LIKED');
break;
case Event.RESOURCE_DISLIKED:
console.log(body.resource, 'EVENT_RESOURCE_DISLIKED');
console.log(body.type, 'EVENT_RESOURCE_DISLIKED');
break;
default:
break;
}
});
© 2025, Zoho Corporation Pvt. Ltd. All Rights Reserved.