Skip to main content

Let chatters search your knowledge base content

Important

This feature is now called Smart Search, and it has its own block and its own Answer. Check out Let chatters search your Zendesk or Salesforce knowledge base content to learn more.

Overview

With use of the HTTP Request Block, your bot can provide curious chatters with a list of relevant articles from your knowledge base. The Knowledge Base Search is a graceful fallback when a Question falls outside of your bot’s Training. Knowledge Base Search helps chatters get access to more information as soon as it becomes available.

Requirements

In order to set up the Knowledge Base Search, you will need:

Set Up the Request Block for the Knowledge Base Fallback

Note

We have chosen to use a Not Understood Answer to host the HTTP Request Block, but a similar flow can be set up in any other Answer.

Follow the steps below to ensure that when a “Not Understood” Answer is surfaced, your bot will respond to the chatter with 3 relevant support articles.

  1. Open up your “Not Understood” Answer.

    NotUnderstood.jpg
  2. Insert the HTTP Request Block into your Not Understood Answer, just below the Text Block.

  3. Add the knowledge base endpoint API in the URL section.

    For example, the Zendesk Guide API endpoint you should use is:

    https://SUBDOMAIN.zendesk.com/api/v2/help_center/articles/search.json?query=

    Include your specific subdomain in the URL. For more information on this step, see this article.

    If you are using a different knowledge base, please insert the API endpoint that applies.

    HTTPposition.jpg
  4. To ensure your bot surfaces articles directly related to the chatter’s question, insert a Meta Variable for last_question_asked in the URL. For a refresher on Variables, check out our article on variables.

  5. Next, choose a basic Error Answer, with a message such as “Try again with different words.” This error message will only be served if there is an error in the flow configuration.

    erroranswer1.jpg
  6. In the Save as Variable section, you’ll need to create and insert the Variables that will help surface 3 articles to the chatter. Each article requires a Variable for the article URL. You will need to manually create three Variables by clicking the green plus button. Please copy the example we have provided below.

    variablesnew.jpg

    The variables you will need are:

    • html_url

    • html_url2

    • html_url3

    In the Data Key section, you’ll need to mirror these inputs:

    • results[0].html_url

    • results[1].html_url

    • results[2].html_url

  7. Next, add in 3 Conditional Blocks.

    1. For the first condition and value the Variable should meet, set it up so that the html_url Variable is not null. This means that if at least the first article is surfaced from the API call, this flow will proceed.

      conditionalwithList.jpg
    2. Within the first Conditional block, insert the Link Message block.

    3. In the URL field, insert the variable for html_url. The link text and the title will be auto-generated.

    4. Make sure that Generate Preview and Open in a New Window are both toggled on.

    5. Next, you will need to insert a fallback message after this initial block. This message will only be served to chatters if there are no articles that match their last message.

      fallback.jpg
    6. The second Conditional block should also include a Link Message Block, and the variable you created for html_url2. The third Conditional Block should mirror this format, but with the html_url3 variable in the URL field.

      htmlurl2.jpg

When a chatter asks a Question that your bot has not been trained to answer, they will receive a list of relevant articles from your knowledge base, as illustrated below.

botfrontend.jpg

Have any questions? Contact your Ada team—or email us at help@ada.support.