onSearchKnowledgeBase
This is the handler to perform an external Knowledge Base search from the Agent Desktop Communicator Widget; returned results will be displayed as a search result list. Note: If you set multiple handlers that all return some data, only the result from the last handler will be used.
Request
Syntax
on('ON_SEARCH_KNOWLEDGE_BASE', handler: OnSearchKnowledgeBaseHandler): void
id: string text: string } |
Parameters
Parameter | Parameter Values | Data Type | Optional/Required | Description |
query | String | Required | The desired search query for the external Knowledge Base |
Example Request
Microsoft Dynamics 365 has its own Knowledge Base (KB) with KB articles. The callback onSearchKnowledgeBase allows your contact center to perform a search in the Microsoft Dynamics 365 Knowledge Base from our Agent Desktop application..
jsApi.on("ON_SEARCH_KNOWLEDGE_BASE", function (query) {
// Search external KB by query from your contact center
const results = searchExternalKBArticles(query);
// Return search results back to your contact center
return results;
});
Return Value
Object | Object Values | Data Type | Optional? (Y/N) | Value Description |
ExternalKBSearchResult | ||||
id | String | N | The unique ID of the article that will be requested by the handler onGetKnowledgeBaseArticle | |
text | String | N | A text preview of the article’s content |