> 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.

## Native Ema ticketing tools

In addition to the `ex_ticket_*` family, builders can add the native Ema ticketing integration to a workflow. These tools call Ema's own ticket queues directly as the authenticated user, with the destination queue pinned by the builder in the connection template. HCM retains RBAC and audit ownership.

**Requirements:** the tools require an authenticated UI chat session. They are unavailable in evaluation, dry-run, or synthetic execution modes. The destination queue is set by the builder when configuring the connection; the model cannot override it.

The six native tools are:

Tool

What it does

`ema-ticketing-list-queues`

List routable Ema ticket queues and their metadata. Does not grant permission to create tickets.

`ema-ticketing-create`

Raise a ticket for the authenticated user in the builder-pinned queue. Repeated calls for the same workflow step and queue reuse the same request key.

`ema-ticketing-get`

Read a ticket in the builder-pinned queue with the current user's permissions.

`ema-ticketing-update`

Update ordinary editable fields on a ticket. Status, assignee, requester, and queue cannot be changed by this tool.

`ema-ticketing-comment`

Add a public or internal comment to a ticket. The authenticated user is recorded as the author.

`ema-ticketing-close`

Resolve and close a ticket. Closing is the only supported terminal transition. Repeated requests return the already-closed ticket state without error.

### Raise an Ema Ticket (`ema-ticketing-create`)

Creates a ticket in the builder-pinned queue as the authenticated user.

Parameter

Required

Description

`title`

Yes

Concise summary of the unresolved query.

`description`

No

Relevant context and attempted resolution steps.

`priority`

No

A priority supported by the destination queue.

`fields`

No

Queue-specific additional fields. Reserved backend columns and requester overrides are rejected.

### Update an Ema Ticket (`ema-ticketing-update`)

Updates ordinary editable fields on an existing ticket. Status, assignee, requester, and queue cannot be changed by this tool.

Parameter

Required

Description

`ticket_id`

Yes

Ticket ID returned by Ema ticketing, not a guessed external identifier.

`title`

No

Updated ticket title.

`description`

No

Updated ticket description.

`priority`

No

Canonical priority supported by the destination queue.

`type`

No

Request type supported by the destination queue.

`tags`

No

Replaces ordinary ticket tags. Reserved queue-membership tags are rejected.

`fields`

No

Backend-specific editable fields. Reserved columns are rejected by Ema ticketing.

At least one field besides `ticket_id` must be provided.

### Add an Ema Ticket Comment (`ema-ticketing-comment`)

Adds a public or internal comment to a ticket. Defaults to public visibility. The authenticated user is recorded as the author.

Parameter

Required

Description

`ticket_id`

Yes

Ticket ID returned by Ema ticketing, not a guessed external identifier.

`body`

Yes

Comment or internal-note text.

`visibility`

No

`public` (requester-visible, default) or `internal` (visible only to the queue and Ema users).

### Close an Ema Ticket (`ema-ticketing-close`)

Resolves and closes a ticket. Closing is the only supported terminal transition. If the ticket is already closed when the tool is called, the current closed state is returned without error.

Parameter

Required

Description

`ticket_id`

Yes

Ticket ID returned by Ema ticketing, not a guessed external identifier.

`resolution`

No

Summary of how the request was resolved. Ema records it in the ticket journal.

## 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.
