# Hand off AI agent conversations to a human > Let your AI agent hand a conversation to your team by creating a ticket in QwryAI Tickets or your connected helpdesk The **Escalations** Action lets your QwryAI agent hand a conversation to a person by creating a support ticket. The ticket goes to QwryAI **Tickets** or to a connected helpdesk such as Zendesk, Salesforce, Intercom or Freshdesk, with the customer's details and a summary of the conversation, so your team can pick up where the agent left off. Escalations can run on every channel, including the Chat bubble, Help page, WhatsApp, Instagram, Messenger, email, Slack and phone. **Best for:** issues the agent can't resolve and that don't need an answer this second: anything your team can work as a ticket and follow up on. **Common use cases:** * "I want to speak to a human" * "Connect me to support" * "This didn't solve my issue" * "I need help with my billing" ![The Create Action gallery with the pointer on the Escalations card, which creates a support ticket on your chosen ticketing system.](annotated/01-gallery.webp "Create Action › Escalations.") > [!NOTE] > > Escalations open a ticket for your team to follow up. To hand the customer to a person in real time instead, use [QwryAI live chat](/docs/user-guides/chatbot/actions/qwryai-live-chat). ## Before you start The Action creates tickets in QwryAI **Tickets** or in a helpdesk you've connected. Only those appear in the **Ticket Platform** list. * **QwryAI** is always in the list. Tickets appear in **Tickets** in the sidebar. * To use another helpdesk, open **Integrations** in the sidebar and connect it first. Supported platforms: * [QwryAI Tickets](/docs/user-guides/chatbot/help-desk/help-desk-overview) * [Zendesk](/docs/user-guides/integrations/zendesk) * [Salesforce](/docs/user-guides/integrations/salesforce) * [Intercom](/docs/user-guides/integrations/intercom) * [Zoho Desk](/docs/user-guides/integrations/zohodesk) * [Freshdesk](/docs/user-guides/integrations/freshdesk) * [HubSpot](/docs/user-guides/integrations/hubspot) * [Gorgias](/docs/user-guides/integrations/gorgias) ## How to create the Action **1. Open Actions** In your [QwryAI dashboard](https://www.qwryai.com), select your agent and click **Build › Actions** in the sidebar. **2. Create the Action** Click **Create Action**, then the **Escalations** card. The dialog shows a sample chat that ends in a submitted ticket. Click **Start customizing**. ![The Escalations dialog with a sample chat that ends in a submitted ticket card, and a Start customizing button.](annotated/01-gallery--open.webp "Select Start customizing to open the editor.") **3. Configure General** **Action name:** a name that tells the agent what the Action is for, such as `create_ticket`, `create_ticket_refunds` or `create_ticket_whatsapp`. Spaces turn into underscores. The name needs at least 3 characters and must differ from your other Actions' names. ![The General section with create_ticket_orders typed in Action name, Ticket Platform set to QwryAI, and the default When to use instructions.](annotated/03-name.webp "Name the Action after the requests it handles.") **Ticket Platform:** where tickets are created. The sections that follow depend on this choice. ![The Ticket Platform dropdown open below the Action name, listing QwryAI. Helpdesks you connect in Integrations are listed here too.](annotated/04-platform.webp "Ticket Platform lists QwryAI and every helpdesk you've connected.") **When to use:** when the agent should create a ticket. It comes prefilled with a default you can edit, and **Reset** restores it: ```text Create a ticket when: 1. The user explicitly asks to submit a complaint or requests support from a human. 2. The user asks a question you don't know the answer to, but confirm before creating the ticket. Required steps: 1. Request the email if you don't have it, and confirm it if known. 2. Understand the topic fully. 3. Tell the user that support will contact them, then create the ticket. ``` ![The When to use box with the default instructions and a Reset button below it.](annotated/05-when-to-use.webp "When to use comes prefilled; Reset restores the default.") To run the Action only as a step in a [Procedure](/docs/user-guides/chatbot/procedures/procedures-overview), turn on [**Only use in Procedures**](/docs/user-guides/chatbot/actions/actions-overview#only-use-in-procedures). **When to use** is then hidden, because the agent no longer decides when to call the Action. Click **Continue** to save the section. ![The General section with the pointer on Continue.](annotated/06-continue.webp "Continue saves General and opens the next section.") **4. Configure Details collection** With **QwryAI** as the platform, choose how the agent collects the customer's details and which extra fields it asks for. See [Details collection by platform](#details-collection-by-platform). **5. Add Tags** With **QwryAI** as the platform, the **Tags** section lets the agent tag each ticket it creates. See [Tags](#tags), or click **Skip** to leave it empty. **6. Choose Channels** Turn the Action on or off for each configured channel. Channels you haven't set up yet are listed under **Unconfigured channels** with a **Setup** link. See [Channels](/docs/user-guides/chatbot/actions/actions-overview#channels). **7. Enable and test** Click **Enable**. The header shows an **Enabled** switch, and the Action is live for your agent straight away. Then test it in the **Preview** on the right. ## Details collection by platform ### QwryAI Tickets When the platform is **QwryAI**, you choose how the agent collects the customer's details before it opens the ticket. **How should details be collected?** This applies to the Chat bubble and the Help page. Other channels, such as WhatsApp and Instagram, always collect details conversationally. | Option | What it does | | - | - | | **Collect from a form** | Visitors fill out the fields in a widget inside the chat. | | **Collect conversationally** | The agent asks for the details in the conversation. | **Collect additional details:** the fields collected before the ticket is created. **Email**, **Name**, **Subject** and **Description** are built in: | Field | Collected as | | - | - | | **Email** | Where the support team replies | | **Name** | Who the ticket is from | | **Subject** | A short summary of what the ticket is about | | **Description** | The full details of the request | Click **Add field** to add one of your [custom fields](/docs/user-guides/chatbot/help-desk/custom-fields), such as an order number or a product. Use **Search fields...** to find one. A field you add is required by default. > [!TIP] > > Custom fields are shared by your whole workspace. Create and edit them in [Custom fields](/docs/user-guides/chatbot/help-desk/custom-fields), then add them to any Escalations Action. #### Tags The **Tags** section lets the agent label each ticket it creates with tags from your [tag list](/docs/user-guides/chatbot/help-desk/tags). It sits between **Details collection** and **Channels**. Click **Add tag** and pick a tag. Then describe when it applies in **When should the AI agent use this tag?**, for example `The customer reports a damaged or missing item`. Descriptions can be up to 200 characters. The agent reads each description and adds every tag that fits, so a ticket can get several tags or none. If the tag you need doesn't exist yet, type its name in **Search or create a tag** and click **Create**. Typing the name of an archived tag offers **Restore** instead. An archived tag stays on the Action marked **Archived** until you restore it or remove it. ### Zendesk When the platform is **Zendesk**, you control what goes on the ticket. **Conversation context:** what the ticket includes. | Option | What it does | | - | - | | **AI summary** | Puts a concise, AI-written summary on the ticket. | | **Full conversation** | Puts the literal transcript on the ticket instead, with any files the user sent attached to it. | **Internal note (optional):** a private note added to the ticket for your team. Use variables in double curly braces to have the agent fill in details from the conversation: ```text Reason of contact: {{reason_of_contact}} Order ID: {{order_id}} Status: {{status}} ``` **Custom fields (optional):** your own Zendesk ticket fields, such as an order number or request type. Select them with **Search custom fields...**, and the agent fills them in from the conversation. **Brand:** shown when your Zendesk account has more than one brand. The ticket is created under the brand you pick, and the default brand is selected to start with. ### Other platforms Salesforce, Intercom, Zoho Desk and Gorgias have no platform-specific options. Two platforms show extra fields when you pick them: | Platform | Fields | | - | - | | **HubSpot** | **HubSpot pipeline ID (optional)** and **HubSpot pipeline stage ID**. Leave the pipeline ID empty to use your portal's default pipeline. Leave the stage ID as `1` for the default **New** stage, or set it to a valid stage in your custom pipeline. | | **Freshdesk** | **Freshdesk ticket type**, sent as the ticket's Type. Leave it unset to omit it. If your Freshdesk marks Type as required, you must pick one to save. | ## How it works When the Action runs, the agent: 1. Collects any details it still needs from the customer. 2. Creates a ticket on the selected platform. 3. Adds the customer's details and the conversation to the ticket. Your team continues from the helpdesk. **Example.** A customer writes "Hi, my order #1042 arrived with a cracked mug. Can someone from your team sort this out?" Following the default **When to use**, the agent asks for an email address if it doesn't have one, makes sure it understands the problem, tells the customer that support will contact them, and creates the ticket with a subject and description it writes from the conversation. > [!TIP] > > The **Preview** beside the editor, the [Playground](/docs/user-guides/chatbot/playground) and Compare show what the customer would see, but don't create a real ticket. To check the whole flow, ask your agent for a person on your website and confirm the ticket appears on your platform. ### Handover with QwryAI Tickets When the platform is **QwryAI**, creating a ticket hands the conversation to your team: * The agent stops replying, and the customer's follow-up messages go to the ticket. * Your team replies from **Tickets**, and the replies reach the customer in the same chat or thread. * Closing or cancelling the ticket hands the conversation back to the agent. If the conversation has several open tickets, this happens when the last one closes. If the ticket is created during a [Procedure](/docs/user-guides/chatbot/procedures/procedures-overview), the agent finishes the Procedure first. See [Ticket lifecycle](/docs/user-guides/chatbot/help-desk/ticket-lifecycle) for what happens next. ## When should the AI agent escalate? **When to use** decides when the agent creates a ticket, so it decides how often customers reach your team. Escalate too eagerly and your team answers questions the agent could have handled. Escalate too late and customers get stuck. Good reasons to escalate: * **The customer asks for a person.** "I want to speak to a human" should always work. * **The agent can't answer from its content.** Have it confirm with the customer before it opens the ticket, as the default **When to use** does. * **The request needs something no Action can do,** such as a refund your team must approve. * **The topic needs a person by policy,** such as legal complaints or account security. Here's a sample **When to use** that adds these rules to the default: ```text Create a ticket when: 1. The customer asks to speak to a person, or to file a complaint. 2. You can't answer the question from your knowledge. Confirm with the customer before creating the ticket. 3. The customer asks for a refund or a change to an order that has shipped. 4. The customer reports a legal issue or a problem accessing their account. Do not create a ticket for questions you can answer, such as shipping times or the return policy. Required steps: 1. Request the email if you don't have it, and confirm it if known. 2. Understand the topic fully. 3. Tell the user that support will contact them, then create the ticket. ``` For a dedicated flow, add a second Escalations Action with its own name and rules, such as `create_ticket_refunds`, or turn on **Only use in Procedures** and call it from a [Procedure](/docs/user-guides/chatbot/procedures/procedures-overview) step. ## Limitations * **Only Zendesk can carry the full transcript.** Other platforms receive an AI-written summary of the conversation. * **Form collection applies to the Chat bubble and Help page only.** Other channels always collect details conversationally. * **Details collection and Tags are available with QwryAI Tickets only.** Other platforms don't show these sections. * **An Action holds up to 5 tags.** **Add tag** is greyed out at the limit. Remove a tag to make room. ## Best practices > [card] Clear escalation criteria | /docs/user-guides/chatbot/actions/actions-overview | Spell out when the agent should escalate and when it should keep trying, so customers aren't handed off too early or left stuck. > [card] One Action per context | /docs/user-guides/chatbot/procedures/procedures-overview | Create separate Actions, such as create_ticket_refunds and create_ticket_whatsapp, when they need different rules or fields. > [card] Collect what your team needs | /docs/user-guides/chatbot/help-desk/custom-fields | Add the fields your team would otherwise have to ask for, so the ticket arrives ready to work. > [card] Tag as you go | /docs/user-guides/chatbot/help-desk/tags | Let the agent tag tickets so triggers and saved views can route them. ## Frequently asked questions > [accordion] What does the customer see when the AI agent escalates? > > It depends on the platform. With **QwryAI**, the agent collects the details you set up, from a form in the chat or by asking in the conversation, then creates the ticket and tells the customer it was opened. In the Chat bubble the customer sees a ticket card marked **Submitted**. The agent then stops replying, and your team's replies appear in the same chat. See [How it works](#how-it-works). > [accordion] What happens if no one on my team is available? > > The ticket is still created. In QwryAI **Tickets**, it's assigned by your [assignment settings](/docs/user-guides/chatbot/help-desk/assignment-algorithm), or waits unassigned until someone picks it up. > [accordion] What's the difference between Escalations and live chat? > > Escalations open a ticket for follow-up and work with QwryAI Tickets and connected helpdesks. [QwryAI live chat](/docs/user-guides/chatbot/actions/qwryai-live-chat) hands the conversation to a person on your team in real time. Use live chat for urgent issues when your team is staffed, and Escalations for anything that can wait. > [accordion] Does the ticket include the full conversation? > > Only on Zendesk, with **Conversation context** set to **Full conversation**. Other platforms receive an AI-written summary, along with the customer's details and any fields you collect. > [accordion] How does the conversation go back to the AI agent? > > With QwryAI Tickets, close or cancel the ticket. The agent answers the customer's next message once no other ticket on the conversation is open. ## Next steps > [card] QwryAI live chat | /docs/user-guides/chatbot/actions/qwryai-live-chat | Hand customers to your team in real time. > [card] Custom fields | /docs/user-guides/chatbot/help-desk/custom-fields | Create the fields your Escalations collect. > [card] Tags | /docs/user-guides/chatbot/help-desk/tags | Manage the tags the agent applies. > [card] Triggers | /docs/user-guides/chatbot/help-desk/triggers | Route new tickets to the right team. > [card] Procedures | /docs/user-guides/chatbot/procedures/procedures-overview | Call Escalations as a step in a flow.