Skip to main content
Once your Gorgias helpdesk is connected, OpenCX listens for customer messages via webhook and processes them in real time. This page covers how messages flow, when the AI replies, and what happens on handoff.

How tickets flow

What the AI listens for

OpenCX processes one type of Gorgias event: customer messages on tickets assigned to the AI user.
ConditionWhat OpenCX does
Customer sends a message on a ticket assigned to the AI userCreates or continues a session and generates an AI reply.
Customer sends a message on a ticket assigned to a different userIgnores the message — the ticket belongs to a human agent.
Agent replies on a ticketNot processed. Gorgias webhooks for agent messages are filtered out.
OpenCX only processes messages where the sender email matches the customer email on the ticket. Internal notes and agent replies are ignored.

AI reply

When the AI generates a response, it posts the reply directly on the Gorgias ticket via the API. The reply appears as a message from AI Assistant ([email protected]), visible to the customer in whatever channel they used (email, chat, social).
AI replies are posted through the Gorgias REST API, not as the configured Gorgias user. The sender name in Gorgias shows “AI Assistant.” To control how this appears to customers, configure your Gorgias email templates.

Handoff to your team

When the AI determines it cannot resolve a ticket, three things happen:
1

AI posts a final reply

The AI sends a response on the ticket — typically acknowledging the customer’s request and letting them know a team member will follow up.
2

Session is marked as handed off

The OpenCX session state changes to handed off. The AI will not process further messages on this ticket, even if it remains assigned to the AI user.
3

Ticket is reassigned

OpenCX reassigns the ticket to the configured default user and team (if set) via the Gorgias API. If you configured a default team, the ticket moves into that team’s view.
Set up a Gorgias workflow rule to route handed-off tickets to the right agent. Since the AI stops processing after handoff, the ticket needs a human to pick it up. A Gorgias rule that triggers on assignment change or team change is the recommended approach.

What the rep sees

  • The ticket appears in their Gorgias inbox — routed there by your Gorgias workflow rule.
  • The full AI-to-customer conversation is already in the ticket thread — no separate tool to check.
  • The customer’s email, name, and order context (if Gorgias has it) are on the ticket as usual.

Good to know

The AI only touches tickets assigned to the default user ID you configured. If a ticket is assigned to anyone else — or is unassigned — OpenCX ignores it entirely. This prevents the AI from interfering with tickets your human agents are already working on.
OpenCX deduplicates incoming messages using a content hash. If Gorgias delivers the same webhook event twice (e.g. due to a retry), the AI will not reply a second time. The deduplication window is 1 hour.
All messages on the same Gorgias ticket map to the same OpenCX session. The AI sees the full conversation history when generating each reply, not just the latest message.
AI replies are posted via the Gorgias API as text messages from “AI Assistant” ([email protected]). On the Gorgias side, they appear as API-sourced messages. The customer receives them in whatever channel they originally used — the display format depends on your Gorgias email templates and channel settings.
Once a session is marked as handed off, the AI ignores all further messages on that ticket — even if the ticket remains assigned to the AI user in Gorgias. This prevents the AI from interfering after your team takes over.

Connect Gorgias

Credentials, webhook URL, and default assignee setup.

Troubleshooting

Webhook not firing, AI not replying, handoff not reassigning.

Gorgias Overview

What the integration does and supported channels.

Autopilot

Configure which topics the AI handles and which it skips.