> ## Documentation Index
> Fetch the complete documentation index at: https://algolia.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Algolia for Zendesk

> Connect your users with your help center content with the Algolia integration for Zendesk.

export const Index = () => <Tooltip tip="An Algolia index is a searchable dataset that consists of records and configuration settings. These settings define how the records are searched and ranked.">
    index
  </Tooltip>;

Improve your help center search experience with Algolia.
The Algolia integration syncs your Zendesk Guide articles with Algolia,
providing instant search results.

<Columns>
  <Card title="View Zendesk demo" icon="monitor-play" href="https://algolia-test.zendesk.com/hc/en-us">
    Open the help center demo powered by the Algolia integration for Zendesk.
  </Card>

  <Card title="Explore source code" icon="github" href="https://github.com/algolia/algoliasearch-zendesk">
    Browse the Zendesk integration source on GitHub.
  </Card>
</Columns>

## Set up the Algolia connector

1. Sign in to the [Algolia dashboard](https://dashboard.algolia.com).

2. On the left sidebar,
   select <Icon icon="database" color="var(--tw-prose-body)" /> **Data sources**.

3. On the [Connectors](https://dashboard.algolia.com/connectors) page,
   find **Zendesk Knowledge Base** and click **Connect**

4. Click **Create a new source** to start the setup.

5. If you've already allowed Algolia to access your Zendesk account, select the authentication from the OAuth 2.0 list.
   Otherwise, enter your [Zendesk subdomain](https://support.zendesk.com/hc/en-us/articles/4409381383578-Where-can-I-find-my-Zendesk-subdomain) and click **Connect to Zendesk**.
   1. A new window will redirect you to Zendesk. There, allow Algolia to read your Zendesk Help Center.
   2. When you are redirected back to the Algolia Dashboard, select **Create a new OAuth 2.0 authentication** in the modal's input, update the *Zendesk authentication URL* with your Zendesk subdomain, optionally specify a name for the authentication and click **Create authentication**.
   3. You can now refresh the connector setup page and select the authentication in the list.

6. Fill the form with the following values:

   * **Account name**:
     Your Zendesk subdomain.
     For example, if your Zendesk URL is `https://my-zendesk-app.zendesk.com`,
     then your account name is `my-zendesk-app`.

   * **Content to index**:
     The Zendesk object you want to index.
     Choose between `articles` or `posts`.
     Each connector can only index one type of content.
     If you want to index both objects,
     select one and create a new connector for the other.

   * **Max Content Size**:
     The connector will truncate the content to the specified size. The default value is 5,000 characters. To keep the size of your Algolia <Index /> small, keep the default value.

7. Click **Create source** to continue.

## Configure the Algolia index

1. Configure the Algolia index as destination for your Zendesk content.
2. Create the task for indexing the Zendesk content.
   You can define how often the content is synced.

When the connector is created,
you can directly trigger a crawl by clicking **run task**.

## Update your theme

To replace the default search with Algolia Search,
you need to update your help center theme.
For more information, see [Customizing your help center theme](https://support.zendesk.com/hc/en-us/articles/4408839332250-Customizing-your-help-center-theme) in the Zendesk documentation.

### Replace the default Zendesk search with Algolia

<video controls>
  <source src="https://mintcdn.com/algolia/TTlnKswkCK2YkCpC/doc/integration/zendesk/update-document-head-template.webm?fit=max&auto=format&n=TTlnKswkCK2YkCpC&q=85&s=7f64ff50864d27ab37b8d4cf71c8b642" type="video/webm" data-path="doc/integration/zendesk/update-document-head-template.webm" />

  <source src="https://mintcdn.com/algolia/TTlnKswkCK2YkCpC/doc/integration/zendesk/update-document-head-template.mp4?fit=max&auto=format&n=TTlnKswkCK2YkCpC&q=85&s=6134f410dfc0d785412ab2fbdb00851d" type="video/mp4" data-path="doc/integration/zendesk/update-document-head-template.mp4" />
</video>

1. In your Zendesk Guide, on the sidebar, click **Customize design**.
2. In the **Themes** section, select the theme you want to modify.
3. From the list of templates, select the template `document_head.hbs`.
4. Add the following code to the end of the `document_head.hbs` template:

   ```html HTML icon=code-xml theme={"system"}
   <link
     rel="stylesheet"
     type="text/css"
     href="https://cdn.jsdelivr.net/npm/algoliasearch.zendesk-hc@3.0.0/dist/algoliasearch.zendesk-hc.min.css"
   />
   <script
     type="text/javascript"
     src="https://cdn.jsdelivr.net/npm/algoliasearch.zendesk-hc@3.0.0/dist/algoliasearch.zendesk-hc.min.js"
   ></script>
   <script type="text/javascript">
     algoliasearchZendeskHC({
       applicationId: "ALGOLIA_APPLICATION_ID",
       apiKey: "ALGOLIA_SEARCH_API_KEY",
       subdomain: "ZENDESK_SUBDOMAIN",
       indexName: "ALGOLIA_INDEX_NAME",
     });
   </script>
   ```

### Preview your changes

<video controls>
  <source src="https://mintcdn.com/algolia/TTlnKswkCK2YkCpC/doc/integration/zendesk/paste-algolia-snippet.webm?fit=max&auto=format&n=TTlnKswkCK2YkCpC&q=85&s=40ae7b17fa94302d775ea7e96def73e7" type="video/webm" data-path="doc/integration/zendesk/paste-algolia-snippet.webm" />

  <source src="https://mintcdn.com/algolia/TTlnKswkCK2YkCpC/doc/integration/zendesk/paste-algolia-snippet.mp4?fit=max&auto=format&n=TTlnKswkCK2YkCpC&q=85&s=0c5f1bd8641976eaa4e0a50ac9ee0e88" type="video/mp4" data-path="doc/integration/zendesk/paste-algolia-snippet.mp4" />
</video>

1. Click **Preview**. For more information, see [Previewing your changes](https://support.zendesk.com/hc/en-us/articles/4408845893274-Previewing-your-help-center-theme) in the Zendesk documentation.
2. Enter a few letters in the search box. The autocomplete menu should show results from Algolia.
   If you just connected Algolia with your help center, the initial upload of your articles might take a moment.

If you want to change the look of your search,
see [Customize the CSS](/doc/integration/zendesk/theming#customize-the-css).

## Next steps

After installing the Algolia for Zendesk integration and replacing the default search in your help center,
you can [change the configuration](/doc/integration/zendesk/indexing),
you can [customize the theme](/doc/integration/zendesk/theming),
or you can update the [translations](/doc/integration/zendesk/localization).
