Integrations
Gorgias
Connect Gorgias so your AI agent can escalate a conversation by opening a ticket for your support team
Overview
The QwryAI Gorgias integration lets your AI agent escalate a conversation to your support team by opening a ticket in Gorgias. It's for ecommerce teams that run customer support in Gorgias and want the AI agent to answer routine questions, then hand the rest to a person with an AI-written summary and a link to the full conversation.
What you can do
Let the AI resolve routine questions on its own, and hand off to Gorgias the moment a case needs a person, with the full context already attached.
Gorgias isn't available on HIPAA-compliant accounts.
Before you start
- A QwryAI account with an AI agent
- Your Gorgias subdomain, account email, and API key (see Find your Gorgias API key)
How to connect Gorgias
1. Open your QwryAI AI agent
Go to your QwryAI dashboard and select the AI agent you want to connect.
2. Connect Gorgias
Choose Integrations, then click Connect under Gorgias.
3. Enter your subdomain, email, and API key
To authorize the integration, you'll need your Gorgias subdomain, account email, and API key. QwryAI checks the email and API key together, so the email usually needs to be the one of the Gorgias user who owns the key. Escalation tickets are addressed to this email, and the internal notes QwryAI adds are posted as this user.
4. Create the Escalations Action
Configure your Escalations Action to route tickets to Gorgias: go to Build → Actions → Create Action → Escalations and choose Gorgias as the ticket platform. Gorgias has no extra ticket fields.
Find your Gorgias API key
- Log in to your Gorgias account.
- Go to Settings > REST API.
- Create a new API key, or copy an existing one.
- Paste the API key into the QwryAI integration form, along with your account email and subdomain.
The connection belongs to this AI agent only. Each AI agent connects to one Gorgias account, so repeat these steps on every AI agent that should escalate to Gorgias.
What the ticket contains
When the AI agent escalates, it first asks the customer for their email and name. If the channel or contact record already has them, such as the sender's address on the email channel, those are used. QwryAI then creates the ticket through the Gorgias API:
| Part of the ticket | What QwryAI sends |
|---|---|
| Channel | Email. The ticket shows up as an email ticket created through the API, not as a chat. |
| Customer | The customer's name and email. |
| Subject | A short subject the AI agent writes from the customer's issue. The customer isn't asked for it. |
| First message | A short summary of the request that the AI agent writes as the customer, in the customer's language, sent as an email from the customer's address to your connected Gorgias email. |
| Internal note | A link to the conversation in your QwryAI dashboard, so your team can read the whole chat. |
QwryAI doesn't set tags, priority, or custom ticket fields in Gorgias. Files and images the customer sent in the chat aren't attached.
Repeat escalations in the same conversation
If the same conversation already created a Gorgias ticket that's still open, a new escalation doesn't open a second ticket. Only the new request is added to the existing ticket, as a message starting with "Update:", and the AI agent tells the customer it was added to their existing request. If that ticket is closed, deleted, or can't be found, QwryAI creates a new one.
What the customer sees
The AI agent tells the customer the ticket was created and shares the ticket number in its reply, on every channel. On the Chat Bubble and Help Page, a ticket card follows with the ticket number, its subject and description, and the name and email it was submitted by.
If the ticket couldn't be created, the AI agent says so and that the request hasn't reached your team, and the Chat Bubble and Help Page show a "Failed to create ticket" card.
The AI agent keeps replying in the chat after the ticket is created. Because the ticket is an email ticket, your team's replies from Gorgias usually reach the customer by email, not in the original chat. Nothing syncs back from Gorgias.
Troubleshooting
Connecting shows "Invalid email or API key."
Gorgias rejected the email and key as a pair. Copy the key again from Settings > REST API in Gorgias, and check that the email is the one of the Gorgias user who owns the key.
Connecting shows "Invalid subdomain." or "Failed to connect to Gorgias. Please check your subdomain."
The subdomain doesn't match a Gorgias account. Enter only the part before .gorgias.com, for example yourstore.
The customer was told no ticket was created
Gorgias refused the request or couldn't be reached. If it keeps happening, the API key was probably revoked or regenerated. The Gorgias card still shows Connected, so disconnect and connect again with a current key.
A second escalation didn't open a new ticket
This is expected. While the conversation's earlier Gorgias ticket is open, new requests are added to it as a message starting with "Update:". Look for the update on the existing ticket.
Tickets aren't appearing in Gorgias
Check that the Create ticket Action is enabled, uses Gorgias as the Ticket Platform, and is turned on for the channel you're testing. Check its When to use instructions too, because the AI agent only creates a ticket when those conditions are met.
Managing the integration
Disconnect Gorgias
Go to the Integrations tab, open the menu on the Gorgias card, and click Disconnect. Disconnecting deletes the Create ticket Actions that use Gorgias. A confirmation dialog lists them before anything is deleted.