Chat with us, powered by LiveChat
Long Arrow Right External Link angle-right Search Times Spinner angle-left

Get KnowledgeBase answers directly in Chatbot chat

If you want to get KnowledgeBase article suggestions during a ChatBot session, you can use our integration to send cards in response to a customer query.

In this article, we'll go through creating a webhook and adding it to the chatbot story.

Preparations

For integration to work, you need KnowledgeBase license number. You can find it in My Profile in the left navigation. 

undefined

When you click on the License ID element, your license number will be copied to the clipboard.

Creating the webhook integration in ChatBot

  • Login to Chatbot account and go to integrations section. Select Webhooks
undefined

  • Then click Add new webhook:
undefined

  • During webhook creation, put following details in the form:

undefined

  • Webhook name: Knowledge Base
  • Webhook url: https://api.knowledgebase.ai/integrations/chatbot-answers
  • Verification token: knowledgebase-verification
  • Headers:
    • X-Forwarded-License: your license number from step #1.

Then hit Save and go to your ChatBot Story

Adding KnowledgeBase integration to your story

Here is a simple story that utilizes the webhook integration: 

undefined

In webhook story block, you should select Knowledge Base. Then any user input defined in user says will be forwarded to KnowledgeBase and if any articles were found that match user query, it'll be returned as cards. 

Customizing response cards

You cannot change article title or contents that is displayed in the integration, but you can pick the image that is displayed along the card. In order to set the image, you need to go to Help Center section of KnowledgeBase app and change Preview image in the Appearance section.

Fallback if no answers found

You need to define your own behaviour in case that no answers were found in the KnowledgeBase. You should add a bot response and a filter to make sure that only empty searches would trigger that:

undefined

Click Add filter and then select Add filter for custom attribute. It should be configured as follows:

undefined

You can also add your own custom logic based on articles that were found. Remember that integration will only return top 3 articles, even though that the search could yield more results.