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

# Conversations

> How OpenCX processes Front conversations, hands off to your team, syncs tags, and resolves conversations.

Once your Front workspace is [connected](/integrations/front/connect), OpenCX listens for conversation events via webhook and processes them in real time. This page covers the shared flow that applies to every channel — see the [channel pages](/integrations/front/channels/email) for per-channel specifics.

## How conversations flow

```mermaid theme={"dark"}
flowchart LR
  A[Customer messages] --> B[Front webhook]
  B --> C[OpenCX AI]
  C --> D{Can resolve?}
  D -- Yes --> E[AI replies + archives]
  D -- No --> F[Handoff note + unassign]
  F --> G[Rep picks up in Front]
```

## What the AI listens for

OpenCX processes conversation events from the Front webhook:

| Event                         | What OpenCX does                                                                          |
| ----------------------------- | ----------------------------------------------------------------------------------------- |
| **Inbound message**           | Creates a session (or continues an existing one) and generates an AI reply.               |
| **Outbound (teammate reply)** | Skipped to avoid duplicate processing. The AI does not respond to teammate-sent messages. |
| **Conversation archived**     | Marks the OpenCX session as resolved and logs a history entry.                            |
| **Assignment changes**        | Logged for debugging. No automatic state change.                                          |
| **Tags added/removed**        | Logged for debugging. No automatic state change.                                          |

## Who the AI responds to

The AI processes a conversation only when one of these conditions is met:

1. The conversation is **assigned to the AI teammate** you selected during [setup](/integrations/front/connect).
2. The conversation is **unassigned** and **Handle unassigned conversations** is enabled.

Conversations assigned to other teammates are ignored — the AI does not interfere with your reps' work.

## Handoff to your team

When the AI decides it cannot resolve a conversation, it hands off in three steps:

<Steps>
  <Step title="Post an internal comment">
    OpenCX posts an internal comment to the Front conversation. The comment contains:

    * **Summary** of what the customer asked and the conversation so far.
    * **Sentiment** detected from the customer's messages (e.g. frustrated, neutral, positive).

    Your rep sees this immediately when they open the conversation.
  </Step>

  <Step title="Unassign the conversation">
    The AI teammate is removed from the conversation. The conversation enters your team's unassigned queue, where your routing rules or reps can pick it up.
  </Step>

  <Step title="Session stays open">
    The OpenCX session remains open so the human rep's replies are tracked. The conversation history stays intact for reporting and audit.
  </Step>
</Steps>

## AI resolution

When the AI fully resolves a conversation without needing human help:

<Steps>
  <Step title="Post a resolution note">
    OpenCX posts an internal comment with the resolution summary and sentiment.
  </Step>

  <Step title="Archive the conversation">
    The conversation is <Tooltip tip="Front's equivalent of closing a conversation. Archived conversations move out of the active inbox but remain searchable and can be reopened.">archived</Tooltip> in Front. Your team can still find it in the archived view and reopen it if needed.
  </Step>
</Steps>

<Note>
  The AI only archives conversations it owns. If the conversation has been reassigned to a human rep, the AI checks the current assignee and skips the archive step.
</Note>

## Tags

OpenCX can sync session tags to Front conversations. Tags are created in Front if they don't already exist, then applied to the conversation.

Your team can use these tags to:

* Filter Front views by AI-handled conversations.
* Build analytics rules and reports.
* Route conversations based on AI-applied tags.

## Contact resolution

When a customer sends the first message, OpenCX resolves their identity:

1. The sender's handle (email address, phone number, or username) is extracted from the webhook payload.
2. OpenCX looks for an existing contact with a matching email.
3. If no match is found, a new contact is created with the sender's name and handle.

This ensures every conversation is linked to a contact for reporting and continuity across sessions.

## Deduplication

OpenCX deduplicates inbound messages by content hash with a 24-hour window. If Front retries a webhook delivery or sends a duplicate event, the second instance is silently dropped.

***

## Related Documentation

<CardGroup cols={2}>
  <Card title="Connect Front" icon="plug" href="/integrations/front/connect">
    API token, webhook, teammate selection, and settings.
  </Card>

  <Card title="Knowledge Sync" icon="book" href="/knowledge/sources/front/connect">
    Train the AI on your Front Help Center articles.
  </Card>

  <Card title="Channels" icon="grid-2" href="/integrations/front/channels/email">
    Per-channel details for Email, Chat, SMS, and Phone.
  </Card>

  <Card title="Troubleshooting" icon="wrench" href="/integrations/front/troubleshooting">
    Handoff not firing, AI not replying, duplicate messages.
  </Card>
</CardGroup>
