# Connect your AI agent to Zendesk tickets > Let your AI agent reply to Zendesk tickets, draft replies for your team, or escalate a conversation by opening a Zendesk ticket The Zendesk integration connects your QwryAI agent to Zendesk Support tickets. The agent can reply to tickets as one of your Zendesk agents, draft replies your team reviews before sending, and open a Zendesk ticket when a conversation on another channel needs a person. One connection covers all three, and ticket replies and escalation can run on the same agent at the same time. ## Which Zendesk option should I choose? QwryAI has three Zendesk integrations. Pick the one that matches where your customers write in and how your team works. | Option | What it does | Best for | | - | - | - | | **Zendesk** ticket replies (this page) | **Auto-respond** lets the agent answer tickets as a Zendesk agent. **Draft responses** puts a QwryAI button in the Zendesk reply editor that writes a reply for your team to review. | Teams whose customers write in through Zendesk tickets | | **Zendesk** escalation (this page) | An [Escalations](/docs/user-guides/chatbot/actions/escalate-to-human) Action opens a Zendesk ticket when a conversation on another channel, such as the Chat bubble or email, needs a person. | Teams that chat through QwryAI and work follow-ups in Zendesk | | [Zendesk Messaging](/docs/user-guides/integrations/zendesk-messaging) | The agent answers inside your Zendesk Messaging channels and hands the chat to your team in Agent Workspace. | Teams already using Zendesk's Web Widget, mobile SDKs or other messaging channels | | [Sunshine](/docs/user-guides/integrations/sunshine) | Live chat from QwryAI's own Chat bubble, Center Stage or Help page to a Zendesk agent, whose replies come back into the chat. | Real-time handoff to Zendesk agents from the QwryAI widget | Ticket replies and escalation use the same Zendesk connection. Zendesk Messaging has its own connection and doesn't need this one. Sunshine needs this connection first. Zendesk Messaging and Sunshine can't both be connected on one agent. ## Available capabilities | Capability | What it does | | - | - | | [AI ticket responses in Zendesk](#ai-ticket-responses-in-zendesk) | The agent replies to Zendesk tickets, or drafts a reply for a person to review | | [Human escalation via ticket creation](#human-escalation-via-ticket-creation) | The agent opens a Zendesk ticket when a conversation needs a person | ## Before you start * A QwryAI account with an agent. If you haven't built one yet, follow [Your first AI agent](/docs/user-guides/quick-start/your-first-agent). * A Zendesk Support account, and the subdomain you sign in with (the `yourcompany` in `yourcompany.zendesk.com`). * A Zendesk user who can approve app access for the account. The connection belongs to one agent, and each agent connects to one Zendesk subdomain. ## AI ticket responses in Zendesk ### How to connect Zendesk **1. Open your agent** In your [QwryAI dashboard](https://www.qwryai.com), select the agent you want to connect to Zendesk. **2. Find the Zendesk channel** Open **Channels**, find the **Zendesk** card and select **Setup**. ![The Zendesk card on the Channels page, Let your AI agent draft suggestions or auto-reply to Zendesk tickets., with the pointer on Setup.](annotated/01-channels-card.webp "Channels › Zendesk › Setup.") **3. Authorize the integration** A **Zendesk Integration** window opens: *Allow QwryAI to access your Zendesk Subdomain?* Enter your subdomain between `https://` and `.zendesk.com` and select **Submit**. Zendesk asks you to sign in and allow QwryAI access to your account. When you approve, the window closes and the card shows **Manage**. ![The Zendesk Integration window, Allow QwryAI to access your Zendesk Subdomain?, with yourcompany typed between https:// and .zendesk.com, and the Close and Submit buttons.](annotated/02-subdomain.webp "Enter the subdomain you sign in to Zendesk with.") ![Connecting Zendesk: selecting Setup on the Zendesk channel card, entering the subdomain, selecting Submit, signing in to Zendesk and selecting Allow, then returning to Channels with the card showing Manage.](walkthroughs/zendesk-authorize.gif) **4. Configure Auto-respond** Select **Manage** on the **Zendesk** card and open the **Configuration** tab. Under **Auto-respond**, in **Assign a Zendesk agent**, pick the Zendesk agent your QwryAI agent replies as. Make sure that Zendesk agent has a role that can be assigned tickets. Turn on **Auto-assign to new tickets** to have new tickets assigned to that Zendesk agent automatically. **Unassign agent** removes the agent and stops ticket replies. Each change saves as you make it. ![On Channels › Zendesk › Manage › Configuration: choosing a Zendesk agent under Assign a Zendesk agent, switching on Auto-assign to new tickets, and reading the Steps to enable.](walkthroughs/zendesk-configuration.gif) > [!TIP] > > Follow **Steps to enable** on the same tab: create a test ticket as a customer would, for example by emailing your Zendesk support address from a personal address, assign it to the agent (or check that it was assigned automatically), and allow 1–2 minutes for the reply. The agent replies to customers, not to comments your team writes. To give the agent rules for Zendesk only, such as handing refund requests to your team, use the Zendesk channel's **Overview** tab or your agent's [instructions](/docs/user-guides/chatbot/build). ### Which tickets the AI agent replies to The agent replies to a ticket when all of these are true: * The ticket is assigned to the Zendesk agent you picked. * Its status isn't **Solved** or **Closed**. * It doesn't have the `qwryai-no-ai`, `qwryai-routed-to-team` or `qwryai-relay` tag. QwryAI creates a Zendesk trigger named **QwryAI Agent: Ticket Updated** that sends those tickets to your agent when they change. With **Auto-assign to new tickets** on, it also creates **QwryAI Agent: Auto Assign**, which assigns every new, unassigned ticket without the `qwryai-no-ai` or `qwryai-relay` tag to your chosen Zendesk agent. Tickets aren't filtered by channel, brand or group. Each reply is a **public** comment posted as the chosen Zendesk agent. Allow 1–2 minutes for it to appear. When the agent can't resolve a ticket, or your instructions tell it to route the ticket, it adds the `qwryai-routed-to-team` tag and unassigns the ticket so your team can pick it up. ### Generate draft responses Prefer to check every reply before it goes out? Use **Draft responses** to have the agent write a reply that your team edits and sends. **1. Set the agent as the default chatbot** On the **Configuration** tab, under **Draft responses**, turn on **Set as default chatbot** (**Recommended**). This installs the QwryAI app in your Zendesk. If several QwryAI agents connect to the same Zendesk, the default one writes the drafts; to change it, set another agent as the default. **2. Draft a reply in a ticket** Open a ticket in Zendesk and select the QwryAI logo in the reply editor to draft a response. Review and edit it, then send it as usual. ![In a Zendesk ticket: selecting the QwryAI logo in the reply editor's toolbar, waiting for the draft, and editing the drafted reply before submitting.](walkthroughs/zendesk-draft.gif) ### Tag management system Use the tags the agent adds to tickets to track how it's doing. | Tag | When it's applied | | - | - | | `qwryai-involved` | Every ticket the agent replied to | | `qwryai-routed-to-team` | Tickets the agent couldn't resolve, or was told to route to your team. The ticket is also unassigned | | `qwryai-soft-resolved` | Tickets the agent thinks are resolved, but the customer hasn't confirmed | | `qwryai-hard-resolved` | Tickets where the customer confirmed the problem is resolved | | `qwryai-no-ai` | Add it yourself to keep the agent off a ticket: it won't auto-assign or reply | The agent also doesn't reply to tickets tagged `qwryai-relay`, which QwryAI uses on tickets that carry your team's replies back to a customer. ## Human escalation via ticket creation **1. Connect Zendesk** Open **Integrations** and select **Connect** on the **Zendesk** card, then authorize the same way. If you already connected Zendesk from **Channels**, it's the same connection and you can skip this step. Once connected, the card's menu offers **Reconnect** and **Disconnect**. ![The Zendesk card on the Integrations page, Connect Zendesk so that your AI agent can escalate tickets to humans, draft suggestions or auto-reply to tickets., with the pointer on Connect.](annotated/03-integrations-card.webp "Integrations › Zendesk › Connect.") **2. Create the Escalations Action** Go to **Build › Actions**, create an **Escalations** Action and set **Ticket Platform** to **Zendesk**. Only connected platforms are listed. See the [Escalations guide](/docs/user-guides/chatbot/actions/escalate-to-human). ![The Ticket Platform dropdown open in a new Create ticket Action, listing QwryAI, with the note Select the platform where tickets will be created. Only integrated platforms are shown.](annotated/04-ticket-platform.webp "Ticket Platform lists every helpdesk you've connected.") With Zendesk selected, you choose the **Conversation context** (an AI-written summary or the full conversation), an optional **Internal note**, optional **Custom fields** and the **Brand**. See [Details collection by platform](/docs/user-guides/chatbot/actions/escalate-to-human#zendesk). ![Creating a Create ticket Action: choosing Zendesk as the Ticket Platform, picking Full conversation under Conversation context, writing an Internal note, selecting a custom field, then Continue and Enable.](walkthroughs/zendesk-escalation.gif) > [!TIP] > > Test it by asking your agent to speak to a person on your website, and check that the ticket appears in Zendesk. Escalation tickets open with a **private** first comment: the customer's description, followed by the summary or the full conversation. With **Full conversation**, files the customer sent are attached too. A second private comment holds your **Internal note**, with a link to the conversation in QwryAI. Creating the ticket costs no credits beyond the agent's reply. The Escalations Action can't run on the Zendesk channel itself, because those tickets are already in Zendesk. > [!TIP] > > Zendesk is the only escalation platform that can receive the **full conversation**. Every other platform receives an AI-written summary. ## Disconnecting or switching subdomains Open the menu on the **Zendesk** card in **Integrations** and select **Disconnect**. QwryAI lists the Actions that use Zendesk and asks you to confirm, because disconnecting deletes them. Disconnecting Zendesk also disconnects [Sunshine](/docs/user-guides/integrations/sunshine), which depends on it. Each agent connects to one Zendesk subdomain. To move to another one, disconnect and connect again with the new subdomain. One subdomain can serve several agents. ## Troubleshooting > [accordion] The AI agent doesn't reply to a ticket > > Check that the ticket is assigned to the Zendesk agent chosen under **Auto-respond**, that it isn't **Solved** or **Closed**, and that it doesn't carry `qwryai-no-ai`, `qwryai-routed-to-team` or `qwryai-relay`. Replies take 1–2 minutes to appear. > [accordion] New tickets aren't assigned to the AI agent > > Turn on **Auto-assign to new tickets** under **Auto-respond**. Tickets that are already assigned, aren't new, or are tagged `qwryai-no-ai` or `qwryai-relay` aren't auto-assigned. > [accordion] Escalation tickets stopped appearing > > If Zendesk access was revoked, the Zendesk card shows *Zendesk access was revoked* with a **Reconnect** button. Reconnect, then open the conversation in [Inbox](/docs/user-guides/chatbot/activity) to see what the customer was told. > [accordion] The QwryAI logo doesn't appear in the reply editor > > Turn on **Set as default chatbot** under **Draft responses**, which installs the QwryAI app in Zendesk, then refresh Zendesk. ## Frequently asked questions > [accordion] Do ticket replies and escalation need separate Zendesk connections? > > No. **Channels › Zendesk** and **Integrations** use the same connection, and both features can run on one agent at the same time. > [accordion] How do I stop the AI agent from replying to a ticket? > > Add the `qwryai-no-ai` tag to the ticket, or assign it to someone other than the agent chosen under **Auto-respond**. > [accordion] Are AI replies public or internal? > > Public. Each reply is a public comment posted as the Zendesk agent you chose. To review replies first, use [draft responses](#generate-draft-responses) instead. > [accordion] What's the difference between Zendesk, Zendesk Messaging and Sunshine? > > **Zendesk** works with tickets. [Zendesk Messaging](/docs/user-guides/integrations/zendesk-messaging) puts the agent inside your Zendesk messaging channels. [Sunshine](/docs/user-guides/integrations/sunshine) hands customers from the QwryAI widget to a live Zendesk agent. See [Which Zendesk option should I choose?](#which-zendesk-option-should-i-choose) > [accordion] Can I connect one agent to several Zendesk subdomains? > > No. Each agent connects to one subdomain. Several agents can connect to the same subdomain. ## Next steps > [card] Escalations Action | /docs/user-guides/chatbot/actions/escalate-to-human | Choose when your agent escalates, what goes on the ticket, the internal note and the Zendesk custom fields it fills in.