Ticket Detail Workspace
Page structure
Section titled “Page structure”- Header with ticket number, status badge, priority badge
- Primary action (Resolve Ticket)
- Secondary actions (Archive/Unarchive/Delete Permanently/Download JSON)
- Conversation timeline (public messages + support events + internal notes timeline entries)
- Reply composer with optional macro picker
- Right sidebar panels: Assignment & Priority, Customer Context, Linked Order, Internal Notes
Timeline model
Section titled “Timeline model”- Public messages: Customer and agent public chat entries in chronological order.
Support events
Section titled “Support events”- Ticket was closed- Ticket archived- Ticket unarchived- Assignment changed- Priority changed- Internal note deleted- Customer blocked from ticket submission- Customer unblocked for ticket submission- Internal notes: Private notes are shown both in the Internal Notes panel and in the timeline stream.
- Note deletion behavior: Deleting a note does NOT remove the original timeline entry. It marks note metadata with removedAt/removedBy and adds a separate support-event entry.
Key behaviors
Section titled “Key behaviors”- Resolve flow
- Details:
- Sets ticket status to resolved and resolvedAt timestamp.
- Adds a public auto-resolve reply (macro-style message).
- Adds private support event ‘Ticket was closed.’
- Attempts customer email delivery with the same resolved message.
- Prevents duplicate backfill by checking existing resolved notice/event metadata.
- Details:
- Reply flow
- Details:
- Public reply requires canReplyPublic permission.
- Archived tickets reject public replies.
- On send, ticketService.addMessage auto-updates status to awaiting_customer.
- Customer email is attempted; failures return warning banner but chat message is still saved.
- Details:
- Internal notes
- Details:
- Add note requires canAddPrivateNotes.
- Remove note is soft-delete metadata marking, not hard delete.
- After successful add note, note input is cleared.
- After remove note, page revalidates and timeline reflects removal event.
- Details:
- Assignment and priority
- Details:
- Assignment change requires canAssignTickets.
- Priority change requires canAssignTickets OR canResolveTickets.
- Changes generate support event entries for audit context.
- Details:
- Customer controls
- Details:
- Block/unblock customer ticket submission requires canAssignTickets OR canResolveTickets.
- State is stored in CustomerTicketBlock table.
- Actions create support-event timeline entries and update sidebar badge.
- Details:
- Lifecycle controls
- Details:
- Archive requires assign/resolve capability.
- Unarchive sets status back to open.
- Permanent delete allowed only when ticket is archived.
- Delete permanently removes ticket + all messages + ticket views in a transaction.
- Details:
- Download JSON
- Details:
- Action export_ticket_json returns full ticket payload with messages, parsed AI metadata, views, agents, and export metadata.
- Browser creates a downloadable JSON file named with ticket number and timestamp.
- Details:
Macro support
Section titled “Macro support”- Source: Macros from Macros section (ensureDefaultMacros)
- Behavior: Selecting and applying macro appends template text into the reply editor.
Template variables
Section titled “Template variables”- {{customer_name}}- {{order_number}}- {{ticket_number}}- Resolution: Variables are resolved from available ticket and customer context before message send.
Real time behavior
Section titled “Real time behavior”- Auto revalidate: Every 5 seconds when tab is visible and no form is currently submitting.
- Focus refresh: Revalidates on window focus and visibility return.
- Timeline scroll: Auto-scrolls to newest timeline item after updates.
Permissions summary
Section titled “Permissions summary”- Reply to customers (canReplyPublic)
- Add/remove private notes (canAddPrivateNotes)
- Resolve tickets (canResolveTickets)
- Assign tickets (canAssignTickets)
- Combined assign/resolve enables archive and customer blocking controls
Store owner notes
Section titled “Store owner notes”- This page is the single source of truth for ticket audit history because it keeps support events and internal-note removal markers.
- Download JSON is suitable for compliance exports or escalation handoffs.
- Email delivery depends on your store notification setup and customer email availability; chat save and email send are intentionally decoupled.