KnowledgeBaseDelegate

The ZohoSalesIQKnowledgeBaseDelegate API provides resource event callbacks, allowing you to monitor various visitor actions related to the resources. These actions include opening, closing, liking, and disliking a resource.

Implementation

To start receiving various events within the Mobilisten, your class must conform to the  ZohoSalesIQKnowledgeBaseDelegate protocol. Then, set an instance of your class to the  ZohoSalesIQKnowledgeBaseDelegate property to set your class as the delegate.

Setting the delegate

Copiedlet myKnowledgeBaseEventHandler = MyKnowledgeBaseEventHandler()
ZohoSalesIQ.Chat.delegate = myKnowledgeBaseEventHandler

Implementation

Copiedclass MyKnowledgeBaseEventHandler: ZohoSalesIQKnowledgeBaseDelegate {
    
    func handleResourceOpened(_ type: SIQResourceType, resource: SIQKnowledgeBaseResource?) {
        // your code goes here
    }
    
 
    func handleResourceClosed(_ type: SIQResourceType, resource: SIQKnowledgeBaseResource?) {
        // your code goes here
    }
    
  
    func handleResourceLiked(_ type: SIQResourceType, resource: SIQKnowledgeBaseResource?) {
        // your code goes here
    }
    
    func handleResourceDisliked(_ type: SIQResourceType, resource: SIQKnowledgeBaseResource?) {
        // your code goes here
    }
    
}