Let chatters search your knowledge base content
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.
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.
In order to set up the Knowledge Base Search, you will need:
Set up the Request block for the knowledge base fallback
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.
Open up your “Not Understood” Answer.
Insert the HTTP Request block into your Not Understood Answer, just below the Text block.
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:
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.
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.
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.
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:
In the Data Key section, you’ll need to mirror these inputs:
Next, add in 3 Conditional blocks.
- 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.
Within the first Conditional block, insert the Link Message block.
In the URL field, insert the variable for html_url. The link text and the title will be auto-generated.
Make sure that Generate Preview and Open in a New Window are both toggled on.
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.
- 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 [email protected].