Ticket Lifecycle
How tickets work in ZapTicket ā references, status workflow, timestamps, and per-tenant uniqueness.
Overview
Tickets are structured, asynchronous support items for issues that need tracking beyond a real-time conversation. They have a unique reference number, priority, assignee, tags, and a formal status workflow.
Tickets can be created directly by agents or converted from conversations. Either way, they follow the same lifecycle.
Reference Numbers
Every ticket gets an auto-incrementing reference in the format ZT-XXXX. This is a human-friendly identifier that agents and visitors can use to refer to specific issues.
ZT-1001 (first ticket in a workspace)
ZT-1002 (second ticket)
ZT-1042 (42nd ticket)
...
ZT-9999
ZT-10000 (no upper limit)Status Workflow
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā ā
ā Open āāāāāāāāāāŗ In Progress āāāāāāāāāāŗ Resolved āāāāāŗ Closed ā
ā ā ā ā ā ā
ā ā ā ā ā ā
ā ā āāāāāāā Reopen āāāāāāā ā ā
ā ā ā ā
ā āāāāāāāāāāāāāāāāāāāāā Reopen āāāāāāāāāāāāāāāāāāāāāāāāāā ā
ā ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāOpen
Initial state. The ticket has been created but no work has started. It sits in the queue waiting to be picked up or triaged.
In Progress
Work has begun. An agent is actively investigating or working on the issue. This signals to the team that someone owns it.
Resolved
The issue has been addressed. A fix has been deployed, an answer provided, or the request fulfilled. The resolvedAt timestamp is set automatically when transitioning to this state.
Closed
Final confirmation that no further action is needed. Typically set after verifying the resolution holds. Closed tickets can still be reopened if the issue recurs.
Timestamps
{
"createdAt": "2024-01-15T09:00:00Z",
"updatedAt": "2024-01-16T14:30:00Z",
"resolvedAt": "2024-01-16T14:30:00Z"
}createdAtā Set once when the ticket is created. Never changes.updatedAtā Updated on every modification (status change, field edit, reassignment).resolvedAtā Set when status changes to"resolved". Cleared if the ticket is reopened.
resolvedAt timestamp enables resolution time metrics. You can calculate time-to-resolution as resolvedAt - createdAt for reporting and SLA tracking.Creating Tickets
Tickets can be created through two paths:
1. Direct Creation
Agents create tickets directly via POST /tickets for issues that don't start as conversations ā bug reports from internal testing, feature requests from meetings, etc.
2. Conversion from Conversation
When a real-time conversation reveals an issue that needs tracked follow-up, agents can convert it via POST /conversations/{id}/convert-to-ticket. The ticket is linked back to the original conversation.
Conversation conv_abc123 converted to ticket:
ā New ticket created: tkt_xyz789 (ZT-1044)
ā ticket.conversationId = "conv_abc123"
ā Conversation and ticket have independent lifecycles
ā Conversation can be closed while ticket remains open
ā A conversation can only be converted once (409 on retry)Priority Levels
low ā Nice to have, no time pressure
medium ā Standard priority (default when not specified)
high ā Important, should be addressed soon
urgent ā Critical issue, needs immediate attentionPriority is informational and used for sorting/filtering. ZapTicket does not enforce SLA deadlines based on priority ā that's left to your team's workflow.
Tags
Tickets support arbitrary string tags for categorization and filtering:
{
"tags": ["billing", "bug", "high-value-customer"]
}Tags are freeform strings ā there's no predefined list. They're useful for filtering in the dashboard (show all "billing" tickets) and for reporting.
Per-Tenant Uniqueness
Several ticket properties are unique within a tenant but not globally:
- Reference (ZT-XXXX) ā unique per tenant, auto-incremented
- Internal ID ā globally unique UUID
- Tags ā shared namespace within a tenant
This means Workspace A's ZT-1001 is a completely different ticket from Workspace B's ZT-1001. Use the internal id field for programmatic references and the reference field for human communication.