getResourceDepartments()

The ZohoSalesIQ.KnowledgeBase.getResourceDepartments API allows fetching the list of resource departments associated with the brand. Upon execution, the array of `SIQResourceDepartment` objects will include the resource departments under the brand settings (Settings > Brand > Select your brand > Flow Controls > Department responsible for chats/Use the resource of associated department). 

Parameters

  • completion - A closure that receives an array of SIQResourceDepartment as its parameter, when the operation is completed.  

Syntax

CopiedZohoSalesIQ.KnowledgeBase.getResourceDepartments { SIQError, [SIQResourceDepartment] in
                    
}

Example

CopiedZohoSalesIQ.KnowledgeBase.getResourceDepartments { error, departments in
    if let resourceDepartmentList: [SIQResourceDepartment] = departments {
                    
    } else {
                    
    }
}