Algolia - Zendesk Integration - Timeline Community integration

Hi there,
is there any timeline available if / when Community Topics will be included in the Zendesk Connector?

Hi @daniel.bechtel. Our Zendesk integration is today only maintained and not actively improved. We unfortunately don’t have the resources today to actively improve it.

That being said, indexing of community posts is already implemented.
You can find the source code of the our Zendesk connector here:
https://github.com/algolia/algoliasearch-zendesk/tree/master/crawler

You can then use the types config parameter to also index community posts:

types: ['articles', 'posts']

You’ll then however have to build your own front-end to display them.
You could also extend our front-end code, which is available here:
https://github.com/algolia/algoliasearch-zendesk/tree/master/app
If you chose to do this, know that we’re definitely open to Pull Requests!

1 Like

Hi Jerska,
thank you for the reply. I finally found time to start on this.
My goal, I build a new index including Zendesk Articles, Zendesk Community, and articles from another site where we keep our documentation.

I got the index build and populated.

Essentially i wanted to start by changing the App to point to my new index vs. the default index Zendesk_xxxxx_articles. I assume there is probably more to it then that but that is where I wanted to start.

So I downloaded the repo from github, changed the appropriate sections where it pointed to the default index and tried to get the js files recompiled so I can link to it instead of the default ones.

I am new to JS and packaging etc and run into problems.
My assumption is that running npm install would download all the dev dependencies but it appears something is missing.

Initially it could not find gulp and in the logs I saw references to missing python etc.

Could you help me understand how the dev environment is setup. There might be an easier way to do this but as I said I am new to this.

And I did not wanted to copy all the JS files into Zendesk.

Thanks for your help.

You shouldn’t have to modify our code to target an alternative index.
What you can do is simply to use a different index prefix, which can be configured for both the crawler and front-end code.

Now for the front-end part. You are correct, npm install should have installed everything.
I believe your issue in this case is that you need to change your PATH to include the node_modules/.bin/ folder.
To try this, you can run:

export PATH="./node_modules/.bin/:$PATH"
npm run dev

If this works, to have this applied for any new terminal session, you should simply add this line to your ~/.bashrc or ~/.zshrc.

I’ve edited a little bit our README to include an example on how to make this work after running npm run dev : https://github.com/algolia/algoliasearch-zendesk/blob/master/app/README.md#development

2 Likes

OMG that did it.
THANK YOU

I might have more questions but I am good for now.

1 Like

Hi Jerska,
another question…

When you submit tickets in the ticket window, after you populate the Subject of the Ticket and tab into the next field, Zendesk searches the KB for potential matches and displays them in the ticket entry screen under the subject field.
I don’t think algoliasearch is integrated there.

Have you tried to integrate / replace that search function with Algoliasearch?
Any tips / tricks to make that work?

Actually, for this, you should only need to set autocomplete.inputSelector to also match this field.
With the default Zendesk theme, this should look something like this:

  algoliasearchZendeskHC({
    applicationId: '<YOUR APPLICATION_ID>',
    apiKey: '<YOUR SEARCH ONLY API KEY>',
    subdomain: '<YOUR ZENDESK APPLICATION NAME>',
    autocomplete: {
      inputSelector: '#query,#request_subject',            // the DOM selector to select the search box
    }
  });

Hi Jerska,
everything worked great so far. thanks for your help.
Moving now to Google Analytics capturing search queries:

i saw that you can implement GA via https://community.algolia.com/instantsearch.js/v2/widgets/analytics.html

What confuses me, where you would implement that widget (below) in the Zendesk App in Zendesk as the integration appears to be in document_heads.hbs.

search.addWidget(
instantsearch.widgets.analytics({
pushFunction: function(formattedParameters, state, results) {
// Google Analytics
// window.ga(‘set’, ‘page’, window.location.pathname + window.location.search);
// window.ga(‘send’, ‘pageView’);

I am using both autosearch and the search results page i have covered. The autosearch i am trying to figure out.

Appreciate your help