11 — Tickets & Appointments

Service desk, ticket workflows, public customer portal, 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

RoutePurpose
tickets.routesTicket CRUD, list, search
admin.tickets.routesAdmin ticket management
admin.ticket-settings.routesPortal config, categories, workflows
admin.ticket-workflows.routesWorkflow definitions
assignees.routesTicket 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).

EndpointPurpose
GET /api/public/portal-form/:tenantSlugPortal config (theme, categories, layout)
POST /api/public/ticketsCreate ticket (public)
GET /api/public/tickets/:publicTokenTrack ticket by token
POST /api/public/tickets/:publicToken/commentsAdd 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