Question
How do I make my Web Widget (Classic) show top suggested articles when a visitor opens the widget, before they even search?
Answer
By default the Web Widget (Classic) Help Center Search feature allows your customers to type in a search and find articles that may help them. If you want your Web Widget (Classic) to automatically suggest some top recommended articles before a customer searches, you can set that up as well. See below for two different options.
Use the Contextual Help Feature
If you want the Web Widget (Classic) to automatically suggest articles to the visitor based on context from the webpage they are on you can use the Contextual Help feature described in this article: About Contextual Help for the Web Widget (Classic). Contextual help uses context of the webpage the user is on to search your help center and recommend articles to them.
Use custom code
If you would rather the recommended articles are based on search terms you specify rather than based on webpage context, you can use the SetHelpSuggestions API method to dictate specifically what is automatically searched when the user clicks the Web Widget (Classic).
The SetHelpSuggestions API works by adding a line of code into your Web Widget (Classic) implementation. For example, if you wanted to automatically search for the term 'refund' and display any matching articles when a user clicks the Web Widget (Classic), the code would look like this:
zE(function() { zE.setHelpCenterSuggestions({ search: 'refund' }); });
If you are using the Web Widget (Classic) on your own website, the above code would be added into your Web Widget (Classic) snippet in the sites source code. For more information on how to use the Web Widget (Classic) on your own website, please see Adding the widget to your website.
This is an example of what your JavaScript would look like:
<script type="text/javascript"> zE(function() { zE.setHelpCenterSuggestions({ search: 'refund' }); }); </script>
If you are using the Web Widget (Classic) in your Help Center, you can add the code by modifying your Help Center theme's script.js template file. For more information on adding the Web Widget (Classic) to your Help Center, see Adding the widget to your help center. For more information on customizing your Web Widget (Classic) in your Help Center using the Web Widget (Classic) API, see How do I customize the Web Widget (Classic) in my Help Center using APIs?
This is an example of what your script.js template file would look like with the extra code:
12 comments
Steve
Italo, I too would like to know if it is possible to open a specific article in the web widget directly from a link on a page. The ability to open the widget at the exact article would be very useful to our users.
0
Brett Bowser
Hey Italo and Steve,
I double checked with one of our web-widget experts and it doesn't look like there's a way to configure the widget to open up the web browser automatically when the article is selected. You'd need to first select the article in the widget, then click "view original article".
Let me know if you have any other questions!
0
Steve
Hi Brett,
thanks for confirming, I think I reached that conclusion too. What's the best way to submit this as a feature request for future consideration?
Thanks!
0
Nicole Saunders
Hi Steve -
You will want to create a new post in our product feedback topic in the community. Here are the product feedback guidelines on how to write an effective feedback post.
0
Steve
Thanks for that Nicole.
0
David
@... Using SetHelpSuggestions API method, we attempt to have labeled articles show up in the widget on-click. i.e. zE.setHelpCenterSuggestions({ labels: ['label1'] })
The issue here is that only three articles can be shown when using labeled suggestions, though the label is available on multiple articles. Also, this leaves a big blank space beneath the suggested articles.
Is there a way to solve this?
1
Jeff C
Hi David,
Unfortunately, this is a limitation and is not currently configurable and is fixed to only show 3 articles. There has been ongoing discussions about this in previous Product Feedback posts and is currently considered a Feature Request.
Please be on the look out on our Announcements page if a change to this limit has been implemented.
0
Waseem Khan
Hi,
Is it posssible to add multiple keywords like refund, lost card etc., if yes how? Please share the sample code
Regards,
Waseem Khan
0
Jeff C
Hi Waseem,
If you are referring to labels and not search string, this should be possible (for Guide Professional and Higher) and a sample below:
You may also read thru our documentation where it's important to note that labels and search strings are different from each other.
0
Ronald Jay Buayan (ron)
Any update regarding the max shown number of article on default "top suggestions"?
Also is there a way to show the FAQS category instead of a string search?
1
Jeff C
Hey Ronald,
The limit for Help Center suggestions currently remains at 3 at this time. Unfortunately, the ones listed in the API documentation are the current options available and not a way to display categories at this time.
0
George Felton
I am also interested in being able to show more than 3 suggestions, or more specifically, I would like to be able to customize `per_page` via updateSettings to be able to set the number of results that can display on different queries. I don't want to go through the trouble of building the queries manually, but this is important functionality.
0