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

# AI Email Support

> Create Zendesk tickets from every email handoff so your reps work them from the inbox they already live in.

Email is the one channel that routes through the [Ticketing API](/integrations/zendesk/ticketing-api) path, not Sunshine. Every email handoff creates (or appends to) a Zendesk <Tooltip tip="A unit of work in Zendesk with a status, assignee, comments, and custom fields.">ticket</Tooltip> so your reps work email the way Zendesk is designed to handle it — tickets with SLAs, triggers, and macros.

## Pre-requisites

<Warning>
  **Set up email forwarding first.** No email handoff has anything to ticket until inbound mail is reaching OpenCX — start with [Connect Email](/email/forwarding) and come back here.
</Warning>

* **Email forwarding configured** — see [Connect Email](/email/forwarding).
* **Zendesk Ticketing API credentials, webhook, and trigger saved** — see [Ticketing API](/integrations/zendesk/ticketing-api).

## How conversations land in Zendesk

```mermaid theme={"dark"}
flowchart LR
  A[Customer emails your support address] --> B[AI replies from the same address]
  B --> C{AI can resolve?}
  C -- Yes --> D[Thread stays email-only]
  C -- No --> E[Handoff]
  E --> F[Zendesk ticket created with transcript + custom fields]
  F --> G[Rep replies publicly — lands in customer's inbox]
```

## Setting up

<Steps>
  <Step title="Confirm email forwarding works">
    Open [**Channels → AI Email**](https://platform.open.cx/channels/configure/mail) in the OpenCX dashboard. Your forwarding address should be listed and verified. Send a test email and confirm it reaches the [Inbox](https://platform.open.cx/inbox).
  </Step>

  <Step title="Confirm Zendesk Ticketing is connected">
    In [**Settings → Integrations**](https://platform.open.cx/settings/integrations), open **Zendesk → Ticketing**. The status should show **Active** and the webhook URL should be displayed.
  </Step>

  <Step title="Confirm the Zendesk trigger is active">
    In [**Zendesk Admin Center → Triggers**](https://admin.zendesk.com/objects-rules/rules/triggers), verify the OpenCX trigger fires on `Ticket | Is | Updated` with a public comment present. See [Ticketing API setup](/integrations/zendesk/ticketing-api#create-the-trigger-that-fires-the-webhook) for the exact configuration.
  </Step>

  <Step title="Trigger a test handoff">
    Send a test email to your connected address and respond with something that causes the AI to escalate. Alternatively, go to the [Inbox](https://platform.open.cx/inbox) and manually hand off the session.
  </Step>

  <Step title="Verify the ticket in Zendesk">
    A ticket should appear in Zendesk tagged `opencx`, `opencx_handedoff`, and `opencx_channel_email`. Check:

    * The **summary** is the ticket description.
    * The **full transcript** is the first comment.
    * Any <Tooltip tip="Fields you define in Zendesk beyond the defaults — e.g. Reason, Product Area, Severity. Configure at Settings → Ticketing → AI Fields.">custom fields</Tooltip> you mapped are pre-filled.
    * The **View session in OpenCX** link opens the right session.
  </Step>

  <Step title="Reply and verify sync">
    Post a **public** reply from Zendesk. Confirm it arrives in the customer's email and shows as an agent message in the [OpenCX Inbox](https://platform.open.cx/inbox).
  </Step>
</Steps>

## What the rep sees

* A **Zendesk ticket** tagged `opencx`, `opencx_handedoff`, and `opencx_channel_email`.
* Conversation **summary as the description**, full transcript as the first comment.
* **Custom fields pre-filled** by the AI on the fields you mapped at [Settings → Ticketing](https://platform.open.cx/settings/ticketing) → Zendesk AI Fields.
* **`external_id` set to the OpenCX session UUID** — filter Zendesk views by <Tooltip tip="A Zendesk field that stores your own reference ID on a ticket. OpenCX writes the session ID here so you can trace tickets back to sessions.">`external_id`</Tooltip> to find the ticket later.
* A **View session in OpenCX** link in the first comment — one click opens the full AI reasoning, tool calls, and handoff event.

## Channel-specific details

<AccordionGroup>
  <Accordion title="Ticket-append on returning contacts" icon="rotate">
    If the same contact re-engages before the ticket is closed, OpenCX appends to the existing ticket instead of opening a new one. Your reps keep context; your reports don't inflate.
  </Accordion>

  <Accordion title="Public reply syncs back to the customer's inbox" icon="reply">
    When your rep posts a **public** reply in Zendesk, the webhook fires and OpenCX delivers the reply to the customer's original email thread. Internal notes stay private — they never reach the customer.

    Double-check the trigger payload uses `{{ticket.latest_public_comment}}` — the wrong variable leaks internal notes. See [Troubleshooting](/integrations/zendesk/troubleshooting#internal-notes-reaching-the-contact).
  </Accordion>

  <Accordion title="Attachments" icon="paperclip">
    Attachments the customer sends by email are uploaded to Zendesk and appear on the ticket. Attachments your rep adds to a public reply sync back through the customer's email thread (subject to your email provider's attachment limits).
  </Accordion>

  <Accordion title="Create a ticket for every email, not just on handoff" icon="file-circle-plus">
    By default OpenCX creates a ticket only on handoff. If your compliance or SLA reporting requires a ticket for every email, reach out to support — this flag is set per organization.
  </Accordion>
</AccordionGroup>

***

## Related Documentation

<CardGroup cols={2}>
  <Card title="AI Email Support" icon="envelope" href="/email/introduction">
    The channel itself — forwarding setup, flow, troubleshooting.
  </Card>

  <Card title="Ticketing API setup" icon="plug" href="/integrations/zendesk/ticketing-api">
    Credentials, webhook, trigger, AI Fields, tags.
  </Card>

  <Card title="Zendesk overview" icon="headset" href="/integrations/zendesk/overview">
    What else Zendesk lights up across every channel.
  </Card>

  <Card title="Troubleshooting" icon="wrench" href="/integrations/zendesk/troubleshooting">
    Tickets not created, replies not syncing, AI fields blank.
  </Card>
</CardGroup>
