How tickets flow
What the AI listens for
OpenCX processes one type of Gorgias event: customer messages on tickets assigned to the AI user.| Condition | What OpenCX does |
|---|---|
| Customer sends a message on a ticket assigned to the AI user | Creates or continues a session and generates an AI reply. |
| Customer sends a message on a ticket assigned to a different user | Ignores the message — the ticket belongs to a human agent. |
| Agent replies on a ticket | Not 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: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.
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.
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
Assignment-based processing
Assignment-based processing
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.
Duplicate message protection
Duplicate message protection
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.
Session continuity across messages
Session continuity across messages
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.
Reply format
Reply format
After handoff, the AI stops
After handoff, the AI stops
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.
Related Documentation
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.