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

# Ticket Deflector on Zendesk

> Integrate the IrisAgent Ticket Deflector into your Zendesk Ticket Submission Form to automatically suggest AI answers and reduce ticket volume

A lightweight, drop-in JavaScript widget that adds AI-powered ticket deflection to your Zendesk Help Center. It listens to user input on the "Submit a Request" page and suggests relevant answers from your knowledge base before a ticket is created.

## Prerequisites

1. Admin access to your Zendesk Help Center (Suite Growth or above, or Guide Professional or above)
2. Access to IrisAgent dashboard

## Edit the Zendesk theme template

Edit your Zendesk Help Center theme to load the widget:

1. Log in to Zendesk and click the **Zendesk Products** icon in the top bar, then select **Knowledge**
2. In **Knowledge admin**, click the **Customize design** icon in the sidebar to open the Themes page
3. Click **Customize** on your theme, then click **Edit code**
4. Select `new_request_page.hbs` from the **Templates** section and paste the following code snippet after the last closing `</div>` tag (outside `<div class="container">`):

```html theme={null}
<script
  src="https://chatbot.irisagent.com/scripts/irisagent-deflector.js"
  data-api-key="YOUR_IRIS_AGENT_API_KEY"
  defer>
</script>
```

5. Replace `YOUR_IRIS_AGENT_API_KEY` in the above code with your key by going to the [Configure page](https://web.irisagent.com/manage-chatbot) on IrisAgent dashboard
6. Since the IrisAgent Ticket Deflector replaces the built-in search bar, remove the entire `<div class="search-container">` element and everything inside it.

<Accordion title="Full example of new_request_page.hbs (with search-container removed)">
  ```html theme={null}
  <div class="container-divider"></div>
  <div class="container">
    <nav class="sub-nav">
      {{breadcrumbs}}
    </nav>

    <h1>
      {{t 'submit_a_request'}}
      <span class="follow-up-hint">
        {{follow_up}}
      </span>
    </h1>

    <div id="main-content" class="form">
      {{request_form wysiwyg=true}}
    </div>
  </div>

  <script
    src="https://chatbot.irisagent.com/scripts/irisagent-deflector.js"
    data-api-key="YOUR_IRIS_AGENT_API_KEY"
    defer>
  </script>
  ```

  <p>Remember to replace <code>YOUR\_IRIS\_AGENT\_API\_KEY</code> with your actual API key (see step 5).</p>
</Accordion>

## Save, preview, and verify

After adding the script, confirm that the deflector behaves correctly before publishing:

1. Click **Save** in the theme editor, then click **Preview** to open the help center in a new tab and navigate to the **Submit a request** page
2. Enter a test subject and description; the deflector should surface suggested answers before the ticket is actually submitted
3. Once satisfied, return to the Themes page and click **Set as live theme** to deploy the updated version to your production support form
