--- title: Deployment procedure for Zendesk Guide slug: kcme0093 canonical_url: https://docs.coveo.com/en/kcme0093/ collection: coveo-for-zendesk source_format: adoc --- # Deployment procedure for Zendesk Guide Once you've [added a Zendesk source](https://docs.coveo.com/en/1880/) in your [Coveo organization](https://docs.coveo.com/en/185/), you must: * [Import](#import-javascript-files) [Coveo JavaScript Search Framework](https://docs.coveo.com/en/187/) files to the document header. * [Add the Coveo search box](#add-coveo-search-box) to the portal header. * Finalize the integration by [adding the search page](#add-coveo-search-page) to the interface. > **Note** > > The Zendesk Guide integration may vary depending on the template used during the initial Guide setup. > The instructions below correspond to the [**Copenhagen (2.2.4) Zendesk Template**](https://support.zendesk.com/hc/en-us/articles/231747427). ## Import JavaScript files For more information on accessing the folders in the **Customize design** window of Zendesk Guide, see [**Customizing your help center theme**](https://support.zendesk.com/hc/en-us/articles/203664326). . Go to **Themes** > **Customize** > **Edit code** > **document_head.hbs**. . Add the following to the header code: ** The latest [CSS](https://docs.coveo.com/en/2075#css) stylesheet ** The latest [framework script](https://docs.coveo.com/en/2075#framework-script) ** The JavaScript file for Coveo for Zendesk: ```javascript ``` **Example** After adding the files, the **document_head.hbs** code should be similar to the following: ```html ``` . Click **Publish**. ## Add Coveo search box . Go to **Themes** > **Customize** > **Edit code** > **home_page.hbs**. . Replace the Zendesk search box with the Coveo search box by inserting the following code in place of the Zendesk search box code that's located inside `
`: ```html
``` > **Note** > > There are several occurrences of Zendesk search boxes in other sections of the theme code, such as in `
`. > Find and replace them with the Coveo search box code. > If they aren't replaced, users may experience issues such as performing a search and landing on a blank results page. . Click **Publish**. . On the [**API Keys**](https://platform.cloud.coveo.com/admin/#/orgid/organization/api-access/) ([platform-ca](https://platform-ca.cloud.coveo.com/admin/#/orgid/organization/api-access/) | [platform-eu](https://platform-eu.cloud.coveo.com/admin/#/orgid/organization/api-access/) | [platform-au](https://platform-au.cloud.coveo.com/admin/#/orgid/organization/api-access/)) page in the Coveo Administration Console, [create an API Key](https://docs.coveo.com/en/1718#create-an-api-key) using the **Anonymous search** [template](https://docs.coveo.com/en/1718#api-key-templates). . Return to the **Customization design** page, and under the **templates** folder, select **script.js**. . Enter the following code _after_ the `DomContentLoaded` section: ```javascript var options = { APIKey: "", searchBoxId: "searchbox", searchPageId: "search" } CoveoForZendesk.init(options); ``` . Replace `` with the new API key. . Add the following options as needed after `CoveoForZendesk.init(options)`: [%header,cols="~,~"] |=== |Option |Information |`APIKey` (required) |The API key required to execute the search. |`searchPageUrl`` |The destination URL when a user executes a search (if different from the default search page). |`searchBoxId` (required) |The HTML ID of your CoveoSearchBox component div (generally `searchbox`). |`searchPageId` (required) |The HTML ID of your CoveoSearchInterface component div (generally `search`). |`searchPageName` |The URL fragment of the search page name. For example, for `go.coveo.com/search`, the fragment would be `/search`. |`searchOptions` |Additional [options](https://coveo.github.io/search-ui/globals.html) for the Coveo search interface. |=== . Click **Preview** to review the Help Center interface. The search box should now be visible on the header. ![Help-center-search-box](https://docs.coveo.com/en/assets/images/coveo-for_zendesk/guide-search-box.png) ## Add Coveo search page . In the **templates** folder of the **Customize design** window, select **search_results.hbs**. . Remove the all of the existing code under the `
` section. . On the [**Search Pages**](https://platform.cloud.coveo.com/admin/#/orgid/search/search-pages/) ([platform-ca](https://platform-ca.cloud.coveo.com/admin/#/orgid/search/search-pages/) | [platform-eu](https://platform-eu.cloud.coveo.com/admin/#/orgid/search/search-pages/) | [platform-au](https://platform-au.cloud.coveo.com/admin/#/orgid/search/search-pages/)) page of the [Coveo Administration Console](https://docs.coveo.com/en/183/), [create a legacy search page](https://docs.coveo.com/en/1656#create-a-hosted-search-interface) with the [Interface Editor](https://docs.coveo.com/en/1852/) to generate a page template markup. . Copy the Coveo page template markup, and then paste the it under the `
` section in **search_results.hbs**. . Remove the markup in the `
` and `
` sections to ensure that you don't have multiple search boxes. . Click **Publish**.