See related
Show suggested articles in your knowledge base search bar
Last Update: Nov 2024 • Est. Read Time: 2 MINTo check plan availability, see the pricing page.
You can configure your custom theme to include the ability to suggest articles as a customer types a search term in your knowledge base, making it faster for them to find the information that they are searching for and eliminating the need to submit a support request.
Who can access this feature? | |
User types | Content administrators can access knowledge base settings. |
To turn on this feature:
- Go to Settings
> Knowledge Base > Themes.
- Select Edit
for the Default Theme.
- Select the SearchHeaderWithSuggestions.jsx component and copy it in its entirety.
- Go back to the Themes page and select Edit
for the custom theme your knowledge base is using.
- Select Add.
- Select Component from the Theme Target drop-down menu and enter SearchHeaderWithSuggestions as the name.
- Select Create.
- Paste the file you originally copied into the new component.
- Select your homepage.jsx file.
- Replace your SearchHeader code block with the following:
<SearchHeaderWithSuggestions className="home-search-wrap" left={<h2><Snippet id="sn.kustomer.hello_how_can_we_help" /></h2>} org={org} />
Your file should resemble the following: - Select your Form.css file.
- Add the following code block to style the list of suggestions.
/* ============================== Suggestion ============================== */.form-suggestion { width: auto; padding: 10px; margin-top: 10px; max-height: 200px; overflow-y: scroll; background: white; }.form-suggestion-article { margin-top: 10px; }.form-suggestion-article:hover { cursor:pointer; background-color: #e9eff5; padding: 10px; }.form-suggestion-article:hover a { color:#49a1d2; }.form-suggestion-label-divider { background-color: #e9eff5; height: 2px; width: auto; margin-top: 5px; }
Note: If you are using a custom theme, you may want to modify this css to match your branding.
- Select Save.
Now, whenever someone searches for a topic in your knowledge base, they will get a list of suggested articles that match their search term.