Skip to main content

Let chatters search your knowledge base content

important

This guide is for organizations that have knowledge bases that can serve content via API.

If you use Zendesk Guide or Salesforce Knowledge, you can use Ada’s Article Suggestions feature, which automates knowledge base search for those tools. See Let chatters search your Zendesk or Salesforce knowledge base content to set up Article Suggestions.

Overview

With use of the HTTP Request block, your bot can provide curious chatters with a list of relevant articles from your knowledge base. Knowledge Base Search is a graceful fallback when a question falls outside of your bot’s training and 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.

  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, if you were using the Zendesk Guide API, the endpoint you would use is:

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

    You would include your specific subdomain in the URL. For more information on this step, see Admin's guide to the Zendesk API in Zendesk's documentation.

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

  4. To ensure your bot surfaces articles directly related to the chatter’s question, insert a metavariable for last_question_asked in the URL. For a refresher on variables, check out Use variables in Answers.

  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.

  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.

    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.

    1. Within the first Conditional block, insert the Link Message block.

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

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

    4. 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.

    1. 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.

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.


Have any questions? Contact your Ada team—or email us at .