> ## 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.

# Freshdesk ticket flow

> How Freshdesk tickets reach the AI, how autopilot and assist mode reply, how handoff routes the ticket, and how resolutions sync both ways.

After setup, every Freshdesk ticket that passes your intake gate flows through OpenCX. The AI replies on the ticket as the OpenCX agent, hands off when it can't resolve, and resolves tickets when it can.

## How a ticket lands on the AI

```mermaid theme={"dark"}
flowchart LR
  A[Customer opens or updates a ticket] --> B[Freshdesk automation rule fires webhook]
  B --> C[OpenCX matches the ticket to a session]
  C --> D[AI replies as the OpenCX agent]
```

The match step is the load-bearing one. OpenCX uses the Freshdesk ticket ID to decide whether to append to an existing session or open a new one, and ingests the **whole ticket thread** — customer messages, public agent replies, and private notes — so the [OpenCX Inbox](https://platform.open.cx/inbox) mirrors what your reps see in Freshdesk.

The ticket's source picks the OpenCX channel: email tickets become **Email** sessions, portal/chat/feedback-widget tickets become **Web** sessions, and phone tickets become **Phone** sessions. Channel settings — including autopilot vs assist mode — apply per channel.

## Intake gate

The **Auto Handle All Incoming Tickets** toggle on the [Freshdesk integration settings](https://platform.open.cx/settings/integrations) picks which **new** tickets the AI answers. See [Connect Freshdesk](/integrations/freshdesk/connect) for setup.

* **Auto-handle all incoming tickets** — the AI answers every new ticket.
* **Assigned-only** — the AI only answers new tickets assigned to the OpenCX agent or placed in your configured default group.

Once a ticket is tracked, the gate no longer applies: replies, notes, and status changes keep syncing even after the ticket moves to a human.

## How the AI replies

<AccordionGroup>
  <Accordion title="Autopilot — public reply" icon="paper-plane">
    On channels with autopilot, the AI posts a **public reply** as the OpenCX agent. On email tickets this emails the requester; on portal tickets it appears in the thread.
  </Accordion>

  <Accordion title="Assist mode — private draft" icon="pen-to-square">
    On channels with assist mode, the AI posts its answer as a **private note** the customer never sees. Your rep reviews and sends it. The optional assist-mode footer is appended so drafts are recognizable.
  </Accordion>
</AccordionGroup>

Either way, OpenCX tags the ticket with `opencx` plus `opencx_autopilot` or `opencx_assist_mode`, so you can build Freshdesk views and reports on AI-touched tickets.

## When the AI hands off

<Steps>
  <Step title="The AI decides it cannot resolve">
    Handoff triggers follow your global handoff rules — topics not in the Autopilot allowlist, explicit customer asks for a human, confidence thresholds, office-hours rules.
  </Step>

  <Step title="A private handoff note lands on the ticket">
    OpenCX posts a private note containing the AI summary and detected sentiment.
    The note is Freshdesk-internal — your customer never sees it. Your rep reads
    the summary before typing.
  </Step>

  <Step title="OpenCX reopens and routes the ticket">
    The ticket moves back to **Open**, then your configured routing applies:
    unassign it, unassign + set the handoff marker for your Freshdesk automation,
    assign it to your handoff agent, or assign it to your handoff group. If a
    configured target is invalid, OpenCX falls back to unassign + marker — a
    handed-off ticket is never left assigned to the AI.
  </Step>

  <Step title="Your rep picks up the ticket">
    Your rep replies in Freshdesk as normal. Their public replies and private notes sync into the OpenCX session timeline, but the AI stays silent — assignment to a human marks the session as handed off.
  </Step>
</Steps>

<Info>
  **Assignment is the switch.** Reassign the ticket back to the OpenCX agent in
  Freshdesk and the AI resumes answering on the next customer message. Assign it
  to a human and the AI goes quiet. No OpenCX-side toggle needed.
</Info>

## When the AI resolves

<Steps>
  <Step title="The AI session auto-resolves">
    OpenCX's auto-resolution logic closes the session when the conversation is complete — for example, after a successful answer with no further customer response.
  </Step>

  <Step title="OpenCX resolves the Freshdesk ticket">
    OpenCX posts a private resolution note with the summary and sentiment, then sets the ticket status to **Resolved**. If the ticket is no longer assigned to the AI agent — a human took it, or it was unassigned — OpenCX leaves its status alone.
  </Step>
</Steps>

## When a rep changes status in Freshdesk

Status syncs on every webhook delivery:

* Rep sets the ticket to **Resolved** or **Closed** → the OpenCX session closes as resolved.
* Ticket is **reopened** (by a rep or a customer reply) → the closed OpenCX session reopens.
* Ticket is marked **spam** or deleted → the linked session closes.

## Channel-specific details

<AccordionGroup>
  <Accordion title="Attachments are re-hosted, both directions" icon="paperclip">
    Customer and agent attachments on the ticket are copied into OpenCX storage (Freshdesk's links expire) and land on the session, so the AI sees them alongside text. AI replies can carry attachments back onto the ticket. Freshdesk caps attachments at 20 MB total per reply or note.
  </Accordion>

  <Accordion title="Contact identity comes from the requester" icon="fingerprint">
    OpenCX resolves the ticket requester to a contact using the email and phone on
    the Freshdesk contact record. If requester details are missing, the session is
    still created — just without contact details.
  </Accordion>

  <Accordion title="Freshdesk tags and group mirror onto the session" icon="tags">
    The ticket's Freshdesk tags and assigned group name become OpenCX session tags
    on every sync, so inbox filters and reports can segment by Freshdesk
    attributes.
  </Accordion>

  <Accordion title="Own replies are not re-ingested" icon="rotate-right">
    Freshdesk fires the update webhook for the AI's own replies too. OpenCX
    recognizes the OpenCX agent's messages and skips them, so the AI never answers
    itself and nothing is duplicated. Re-delivered webhooks are deduplicated by
    message ID.
  </Accordion>

  <Accordion title="Historical tickets from before the integration" icon="clock-rotate-left">
    On first connect, OpenCX backfills open and pending tickets from the last \~180 days as read-only history. The AI never replies to backfilled tickets — it only engages from the next customer message after connection.
  </Accordion>
</AccordionGroup>

***

## Related Documentation

<CardGroup cols={2}>
  <Card title="Troubleshooting" icon="wrench" href="/integrations/freshdesk/troubleshooting">
    AI not replying, handoff not routing, tickets not closing.
  </Card>

  <Card title="Connect Freshdesk" icon="plug" href="/integrations/freshdesk/connect">
    Re-verify credentials, automation rules, and routing settings.
  </Card>

  <Card title="Overview" icon="ticket" href="/integrations/freshdesk/overview">
    What the Freshdesk integration does and how it fits with your team.
  </Card>

  <Card title="Human handoff" icon="user-group" href="/handoff/introduction">
    Global handoff rules and office hours.
  </Card>
</CardGroup>
