11 — Tickets & Appointments
CEO Summary
Two ticketing systems: Internal (staff/admin) and Public (customers submit without login). Business value: Customer support, service desk, booking revenue. Key metrics: Ticket resolution time, appointment fill rate, public portal submissions. If this breaks: Customers cannot submit tickets or book appointments; staff cannot manage tickets.
Overview
Internal: service desk for staff. Public: customer-facing portal at /{tenantSlug}/public/ticket — no login required.
Internal Ticketing
| Route | Purpose |
|---|---|
| tickets.routes | Ticket CRUD, list, search |
| admin.tickets.routes | Admin ticket management |
| admin.ticket-settings.routes | Portal config, categories, workflows |
| admin.ticket-workflows.routes | Workflow definitions |
| assignees.routes | Ticket assignees |
Public Customer Ticket Portal
URL: https://host/{tenantSlug}/public/ticket (e.g. /mariospizza/public/ticket)
Route file: backend/routes/public.tickets.routes.js
Auth: None — public. Rate limited (ticketRateLimit), optional IP whitelist (ticketIPWhitelist).
| Endpoint | Purpose |
|---|---|
| GET /api/public/portal-form/:tenantSlug | Portal config (theme, categories, layout) |
| POST /api/public/tickets | Create ticket (public) |
| GET /api/public/tickets/:publicToken | Track ticket by token |
| POST /api/public/tickets/:publicToken/comments | Add comment (public) |
Flow: Customer visits /{tenant}/public/ticket → form loads → submits → receives publicToken → can track via URL.
Models
Ticket, TicketCategory, TicketComment, TicketWorkflow, TicketSettings (mysql/)
Services
ticketWorkflow.service, ticketSLA.service, ticketNotification.service
Appointments
appointments.routes, appointment-staff.routes, public.appointments — Public booking: /api/public/appointments
Frontend
TicketsDashboard, TicketNew, TicketSearch, TicketDetail, ServiceDeskSimple, PublicTicketPortal, AppointmentsList, ActiveStylists, AppointmentBooking