No results return from Zendesk integration

If this is the wrong forum I apologize in advance…

I downloaded the latest version of algoliasearch for Zendesk from Github on my Mac.
I ran the crawler and populated algolia with some records.

I added the app to Zendesk sandbox and when I search I can see in the developer console traffic going out to Algolia (200 Ok) but no results are being returned.
aka no hits in the response body.
The search term is correct and using the same search term returns results when searching in the index directly or using the demo interface.

Can anyone help me understand how/what to check why no hits are being returned when running it in zendesk?

I have implemented this before in a different company and I don’t see what I am doing wrong.
Any help appreciated.

It’s the good forum. :slight_smile:
If the response is 200, there’s a chance there’s simply no records indexed in Algolia.

Do you see records in your dashboard ( https://www.algolia.com/dashboard ) on the index zendesk_<your-subdomain>_articles?

Jeska, thank you for responding.

That is the weird part.
I have 4 records in the index and when searching for the word Beta in the index it returns hits. see image below

Index is zendesk_xxxxxx_articles

I ran the index.html test from the app folder and I see the network traffic going out…

Here is the request URL
https://jlpu52s6rb-dsn.algolia.net/1/indexes/zendesk_xxxxxx_articles/query?x-algolia-agent=Algolia for JavaScript (3.35.1); Browser; Zendesk Integration (2.30.1)&x-algolia-application-id=xxxxxxxx&x-algolia-api-key=xxxxxxxxx

And here is the response where you can see the query word “Beta” but 0 hits returning.
{"hits":[],"nbHits":0,"page":0,"nbPages":0,"hitsPerPage":5,"exhaustiveNbHits":true,"exhaustiveTypo":true,"query":"Beta","params":"analytics=false&hitsPerPage=5&facetFilters=%5B%22locale.locale%3Adanielbechtel%22%5D&highlightPreTag=%3Cspan%20class%3D%22aa-article-hit--highlight%22%3E&highlightPostTag=%3C%2Fspan%3E&attributesToSnippet=%5B%22body_safe%3A45%22%5D&snippetEllipsisText=...&clickAnalytics=false&query=Beta&optionalWords=%5B%5D","renderingContent":{},"processingTimeMS":1}

And I can see the same query in the Search API Logs in the index with the same results so it is hitting the index correctly.

While putting this all together I noticed that locale.locale shows

%5B%22locale.locale%3Adanielbechtel%22%5D
[“locale.locale:danielbechtel”]

That does not look right. In the index it is “en-us”!
Where would that come from?

Definitely!
The locale is taken from the URL, it takes the second parameter.

If your URL doesn’t match the common pattern of Zendesk Help Centers of /hc/<LOCALE>/..., then indeed it won’t work as-is.

1 Like

Arghghgh, I was so fixated on the index.html…
Thank you