From Bright Pattern Documentation
Jump to: navigation, search
• 5.19


This handler is used to retrieve a full Knowledge Base (KB) article data to display in the Agent Desktop Communicator Widget. When the user clicks on one of the search result items, it is shown from the onsearchKnowledgeBase data. Note: If you set multiple handlers that all return some data, only the result from the last handler will be used.



on('ON_GET_KNOWLEDGE_BASE_ARTICLE', handler: OnGetKnowledgeBaseArticle): void

type OnGetKnowledgeBaseArticle = (articleId: string) => ExternalKBArticle | null | Promise<ExternalKBArticle | null>

type ExternalKBArticle = {

    id: string

    title: string

    keywords: string

    answer: string

    notes: string

    language: string

    createdByUser: string

    lastEditedByUser: string

    customFields: Record<string, string>



Parameter Parameter Values Data Type Optional/Required Description
articleId String Required The ID of the article that was obtained from the onsearchKnowledgeBase return object ExternalKBSearchResult

Return Value

Object Object Values Data Type Optional? (Y/N) Value Description
ExternalKBArticle Y
id String The unique ID of the article. It is usually identical to the request parameter articleId
title String The title of the Knowledge Base article
keywords String The Knowledge Base article’s keywords
answer String Knowledge Base article’s main content,which can include HTML
notes String Any usage notes or any other additional information associated with the Knowledge Base article
language String The Knowledge Base article’s language
createdByUser String The Knowledge Base article’s author (i.e., the identity of the user in the external system who is the author of a particular KB article).
lastEditedByUser String The name of the last user who edited the Knowledge Base article
customFields Record<string, string> Any supplementary information related to the Knowledge Base article
null Y Note that the value null may be returned instead of ExternalKBArticle; null is returned when no match is found for the articleId.
< Previous | Next >