As documented at the support documentation link below, we do not index private articles for security reasons:
Our Zendesk integration can only provide front-end code. This code is inspectable by anyone visiting your website. So while we could restrict the search depending on the current user permissions, nothing would prevent a malicious user from modifying the request sent to Algolia and being able to list private articles.
As a result, we chose the safe and secure route to only index in Algolia public articles.
Workaround to show private articles to agents
Our suggestion in this case is to use our autocomplete menu.
The standard integration does two things out of the box:
- Replace your search page (/hc/xx-xx/search) by an Algolia-powered search, with filters on the side and pagination. We call this "instantsearch".
- Add a dropdown menu on all the search inputs on other pages. We call this "autocomplete".
The next step is to disable instantsearch, thus restoring the default Zendesk search (with private article support) on the search page.
The end result is that:
- an end-user will be able to use Algolia to quickly find their answer
- a Help Center agent will be suggested public articles while typing, but can still press Enter to find private articles
If you would like to have this functionality, changing our integration to behave this way is easy. You need to replace in your Help Center document_head template this code:
algoliasearchZendeskHC({
applicationId: '<YOUR APPLICATION_ID>',
apiKey: '<YOUR SEARCH ONLY API KEY>',
subdomain: '<YOUR ZENDESK APPLICATION NAME>'
});
with this code (there's an extra comma at the end of the "subdomain" line, don't miss it or you'll get a syntax error):
algoliasearchZendeskHC({
applicationId: '<YOUR APPLICATION_ID>',
apiKey: '<YOUR SEARCH ONLY API KEY>',
subdomain: '<YOUR ZENDESK APPLICATION NAME>',
instantsearch: { enabled: false }
});