Zendesk search in custom page

I installed algolia on my Zendesk page support. That’s OK!

Now I want install a field on my application and i will like result equal of the result zendesk.

Would you help me?

You’ve just posted in the Announcements category, please use the Open Q&A next time.
Also, please add tags matching your topic, in this case zendesk would be the right one.
I’ve changed those myself this time, but it would be super cool if you could do this with your next question.

Reusing our Zendesk-specific front-end lib

For websites, you might be able to reuse the same library than the one you’re using on Zendesk.
It was initially made for Zendesk websites only, but I believe that by modifying the right parameters you should be able to use it on any website.

Its options are here : https://community.algolia.com/zendesk/documentation/#available-options .
There are a few options that you should probably set so that this would work on your website:

  • autocomplete.inputSelector (default: '#query') - CSS selector used to know on which input we should plug our autocompletion menu
  • instantsearch.enabled (default: true) : if you only want the autocompletion menu, just set it to false. If you’ve disabled it, you won’t need the next parameters in this list.
  • instantsearch.selector (default: '.search-results') : CSS selector to know where we should put our instantsearch block. This should be a div block in which we will replace the content.
  • instantsearch.paginationSelector (default: .pagination) - Same than above
  • instantsearchPage: function used to determine if we’re on the search page or not
    function instantsearchPage() {
      return window.location.pathname.match(/\/search$/) !== null;

If you want to customize the inner workings though, the code is open-source: algolia/algoliasearch-zendesk. Feel free to fork it and change things to match your needs.

Using the built index directly

If the above solution doesn’t work, either because the library didn’t exactly fit your needs, or because you’re building a mobile app and you can’t use JavaScript, you can build your own front-end solution that will use the index that we built.

If you head to your Algolia dashboard, you’ll see that you have an index called zendesk_your-zendesk-subdomain_articles.

We do have multiple Guides and tutorials to get you started on this side.
Here’s a good entry point: https://www.algolia.com/doc/guides/searching/searching-overview/ .

1 Like