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

# Conversation flow

> How Freshchat conversations reach the AI, how handoff routes the chat with a private note, and how resolutions sync both ways.

After setup, every Freshchat conversation that matches your routing mode flows through OpenCX. The AI replies inline as your default agent, hands off when it can't resolve, and closes conversations when it can.

## How a chat lands on the AI

```mermaid theme={"dark"}
flowchart LR
  A[Customer message in Freshchat] --> B[Freshchat webhook]
  B --> C[OpenCX matches conversation]
  C --> D[AI replies as default agent]
```

The match step is the load-bearing one. OpenCX uses the Freshchat conversation ID to decide whether to append to an existing session or open a new one — the session back-links to the Freshchat thread so your reps can jump straight into Freshchat from the [OpenCX Inbox](https://platform.open.cx/inbox).

## Routing modes

The **Auto Handle All Incoming Chats** toggle on the [FreshChat integration settings](https://platform.open.cx/settings/integrations) picks which conversations the AI answers. See [Connect Freshchat](/integrations/freshchat/connect) for setup.

* **Auto-handle all incoming chats** — the AI claims every unassigned Freshchat conversation and replies.
* **Assigned-only** — the AI only replies to conversations Freshchat has already assigned to the default agent email.

## 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="OpenCX routes the Freshchat conversation">
    OpenCX applies your configured handoff strategy. The default `unassign`
    strategy sets the conversation back to **new**, removes the default agent, and
    keeps the current group so Freshchat routing or your reps' unassigned queue
    can pick it up. Other strategies can mark the conversation for Freshchat
    automation, assign it directly to a configured human agent, or move it into a
    Freshchat support group. Group handoffs arrive with status **new** so
    IntelliAssign can still pick the agent within the group — see [Connect
    Freshchat](/integrations/freshchat/connect) for strategy setup.
  </Step>

  <Step title="A private handoff note lands on the Freshchat conversation">
    OpenCX posts a private note containing the AI summary and detected sentiment. The note is Freshchat-internal — your customer never sees it.

    <Info>
      Your rep reads the summary before typing. The note is the primary handoff-to-rep observability surface; there is no separate OpenCX link inside Freshchat today.
    </Info>
  </Step>

  <Step title="Your rep picks up the conversation">
    Your rep replies in Freshchat as normal. OpenCX marks the OpenCX session as handed off so the AI stops auto-replying. Rep replies from Freshchat are not ingested as new customer messages.
  </Step>
</Steps>

## 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 Freshchat conversation">
    The Freshchat conversation status moves to **resolved** and a private resolution note is posted with the summary and sentiment. Your reporting picks up the resolution on both sides.
  </Step>
</Steps>

## When a rep closes in Freshchat

When a rep resolves the conversation directly in Freshchat, the **Conversation Resolution** webhook event flows back to OpenCX and closes the matching session as **resolved**. If the conversation is later reopened in Freshchat, the **Conversation Reopen** event reopens the session. If these events are not subscribed in your Freshchat webhook, sessions drift out of sync — see [Troubleshooting](/integrations/freshchat/troubleshooting).

## Channel-specific details

<AccordionGroup>
  <Accordion title="One contact per email, even across Freshchat users" icon="users">
    OpenCX maps contacts by email. If two Freshchat users share the same email, the second conversation links to the first user's contact in OpenCX — history stays on one record. This is by design to keep customer histories merged. If you need separate contacts, use distinct emails in Freshchat.
  </Accordion>

  <Accordion title="Rep replies sync to OpenCX without waking the AI" icon="reply">
    When a rep types in Freshchat after handoff, OpenCX records the reply on the
    session timeline — public replies as agent messages, private notes as internal
    comments — including any attachments. The reply is never treated as a new
    customer message, so the AI stays silent on handed-off conversations.
  </Accordion>

  <Accordion title="Attachments flow through, both directions" icon="paperclip">
    Inbound, images and files sent through Freshchat message parts land on the
    matching OpenCX session — from customers and from your reps — so the AI and
    your inbox see them alongside text. Outbound, when the AI's answer contains an
    image, OpenCX renders it as a native inline image in Freshchat rather than a
    bare link.
  </Accordion>

  <Accordion title="Anonymous visitors are backfilled when they identify" icon="user-plus">
    If a Freshchat visitor starts anonymous and later shares an email, name, or
    phone, OpenCX backfills those details onto the contact. If another contact
    already owns that email, the session re-links to the existing contact so
    history stays on one record.
  </Accordion>

  <Accordion title="Channel and group names become session tags" icon="tags">
    OpenCX tags each session with the Freshchat conversation's channel and group
    names, so inbox filters and reports can segment by where the chat came from
    and which team owns it.
  </Accordion>

  <Accordion title="Very long messages" icon="align-left">
    OpenCX does not truncate outbound messages before sending them to Freshchat.
    Freshchat itself may reject messages that exceed its per-message size limit
    without an error surfaced to you — keep replies within typical chat lengths.
  </Accordion>

  <Accordion title="Duplicate webhook deliveries" icon="rotate-right">
    Freshchat sometimes re-delivers the same webhook. OpenCX ignores repeated deliveries of the same message (content, attachments, and timestamp) for 24 hours, so retries do not produce double replies or duplicate sessions.
  </Accordion>
</AccordionGroup>

***

## Related Documentation

<CardGroup cols={2}>
  <Card title="Troubleshooting" icon="wrench" href="/integrations/freshchat/troubleshooting">
    AI not replying, handoff note missing, conversations not closing.
  </Card>

  <Card title="Connect Freshchat" icon="plug" href="/integrations/freshchat/connect">
    Re-verify credentials, webhook events, and routing mode.
  </Card>

  <Card title="Overview" icon="comment" href="/integrations/freshchat/overview">
    What the Freshchat 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>
