> Source: https://builder.ema.ai/v2/ticketing/ticket-tools
> Title: Ticket Tools

# Ticket Tools

Ticketing is the escalation path for your AI Employees. When Autopilot or an AI Employee cannot finish a request, it raises a ticket into the right group's queue and hands the person a link to it, and the same set of Tools lets it read a queue, reply on a ticket, reassign it, or close it once the work is done.

The tools are named `ex_ticket_*`. They are available to Autopilot and to any [Ema MCP](/builder/v2/ema-mcp) client, and they appear only when ticketing is enabled for the Workspace: a Workspace without it sees no ticket Tools at all rather than Tools that fail when called.

## How an escalation finds its queue

Every queue carries free-text routing guidance, written by a group admin (see [Set Up a Ticket Queue](/builder/v2/ticketing/set-up-a-queue)). `ex_ticket_queue_list` returns the routing directory: every group that runs a queue, with its guidance and the request types it accepts. That guidance reaches the model verbatim, so it is the control you actually have over routing decisions.

A typical escalation is three steps:

1.  Read the directory and pick the queue whose guidance matches the request.
2.  Raise the ticket with `ex_ticket_create`, filling in a title, a description, and a priority consistent with the queue's guidance.
3.  Give the requester the ticket's Ema link, so they can follow it on [My Tickets](/builder/v2/ticketing/my-tickets).

> [TIP]
> **Routing guidance is standing instruction.** "Payroll questions, benefits enrollment, and anything about a paycheck. High priority for a missed or incorrect payment, otherwise medium." reads better to a model than a description of who is in the group, and it is what decides whether a request lands here or somewhere else.

## The tools

Tool

What it does

`ex_ticket_queue_list`

The routing directory: every group with a queue, its routing guidance, and the request types it accepts. Resolve a group id here before any per-ticket call.

`ex_ticket_queue_connect`

Give a group with no queue its first one, bound to a ticketing connection.

`ex_ticket_queue_routing_set`

Replace a queue's routing guidance. Whole-value replace, so read the current text first.

`ex_ticket_create`

Raise a ticket in a group's queue.

`ex_ticket_subticket_create`

Raise a sub-ticket under a parent, in the parent's queue or another on the same connection.

`ex_ticket_get`

Fetch one ticket, including whether the calling user may delete it.

`ex_ticket_list`

List a group's queue, newest first, with filters for status, assignee, requester, label, text, and created date.

`ex_ticket_list_mine`

The caller's own tickets across every group they belong to.

`ex_ticket_update`

Edit title, description, priority, request type, and labels. Status and assignee have their own Tools.

`ex_ticket_set_status`

Move a ticket to Open, In progress, or On hold.

`ex_ticket_assign`

Assign a ticket to someone, or clear the assignee.

`ex_ticket_move`

Move a ticket into another queue on the same connection, clearing the assignee.

`ex_ticket_close`

Close a ticket, the only path to Closed. An optional resolution is also recorded as a comment.

`ex_ticket_comment`

Add a public comment (the requester sees it) or an internal note (they do not).

`ex_ticket_list_comments`

List a ticket's comments and notes, oldest first.

`ex_ticket_list_events`

The full activity timeline: comments, notes, and field changes, oldest first.

`ex_ticket_children_list`

List a parent ticket's sub-tickets.

`ex_ticket_delete`

Delete a ticket. Group admins only.

## Rules the tools follow

-   **Group first, ticket second.** Every per-ticket tool takes the group id along with the ticket id, because a queue decides which system the ticket lives in. Resolve the group id from the directory rather than guessing it.
-   **They act as the caller.** Membership of the queue's group is required, exactly as it is in the app, and a System Admin reaches every queue. A ticket read reports whether the calling user may delete it, so an assistant can avoid offering an action that would be refused.
-   **Writes are attributed to the person.** Comments and changes are credited to the user the assistant is acting for, not to a service account, wherever the system of record can express it.
-   **Request types come from the queue.** Use a value the directory published for that queue. An invented one is rejected rather than quietly dropped.
-   **Queue membership is not a label.** Labels are yours to set, and the reserved queue label is refused. Moving a ticket is the only way its queue changes.
-   **Closing is its own tool.** `ex_ticket_set_status` covers the non-terminal statuses only.
-   **Link people to Ema.** A ticket comes back with both its Ema page and, for an external queue, the record in the system of record. Hand users the Ema link.

## What's next

-   [Work a Ticket Queue](/builder/v2/ticketing/working-tickets) for the same operations performed by hand.
-   [Autopilot](/builder/v2/autopilot) for how Autopilot uses Tools in general.
-   [Ema MCP](/builder/v2/ema-mcp) for connecting an MCP client to your Workspace.
-   [Ticketing API](/builder/v2/api-reference/ticketing-api) for the REST equivalents.
