Workflow — Ticketing & Mass Communication
| Module | Tickets + Comms |
| Actors | Applicant/Visitor/GoH (asker), Staff (replies), System (routing, channels) |
| SRS refs | UC-13, UC-14, FR-0900, FR-1200 |
| Status | Planned — ships with v0.8.0 |
Purpose
- Ticketing: every registered user can ask questions and get help inside the platform.
- Mass comms: staff can reach segmented audiences (email now, WhatsApp when the
provider key arrives — numbers are already collected at registration).
A. Support ticket flow
- User opens Support on their dashboard → New ticket: subject + message (+ media attachments).
- Ticket appears in the staff queue (status
open); staff get a notification. - Staff reply in thread → status
answered, user notified (in-app; email/WhatsApp later). - User may follow up → status
pending(waiting on staff) → … → staff closes (closed). - SLA-ish visibility: oldest-open highlighted in staff queue.
Alternate paths
- A1 Staff needs internal note → note flag (invisible to user) — stored in message meta.
- A2 Escalation → staff escalates to admin (flag on ticket).
- A3 User closes own ticket.
B. Mass communication flow
- Staff → New communication: channel (email | WhatsApp*), audience selector:
all | visitors | applicants | goh | category:{id} | status:{status}.
- Compose subject + body (placeholders
{name},{event}supported). - Preview: recipient count + sample rendering → confirm.
- System queues recipients (
communication_recipients status=queued) → sender job delivers (now: email via SMTP—orlog; WhatsApp: null driver writes tostorage/logs/whatsapp.loguntil provider). - Per-recipient results:
sent | failed(+error); audit entrycomms.sent.
*WhatsApp channel selectable but runs in simulated mode until keys (NFR-08).
Alternate / error flows
- B1 No recipients match → warning before sending.
- B2 Partial failures → resend-failed action; failures keep their error text.
- B3 Rate limits (WhatsApp provider) → queue with backoff (once live).
Rules applied
BR-007 (WhatsApp reachable), NFR-03 (audit), NFR-08 (mock-safe).
Data touched
| Table | Change |
|---|---|
| tickets / ticket_messages | INSERT/UPDATE thread + statuses |
| communications / communication_recipients | INSERT + per-recipient status |
| audit_log | ticket.*, comms.sent |
| notifications | ping on replies/results |
Sequence (mass comms)
sequenceDiagram
participant S as Staff
participant W as Website
participant DB as MariaDB
participant CH as Channel (email/WA)
S->>W: compose + audience
W->>DB: resolve recipients → queue
W->>CH: deliver (mock-safe)
CH-->>W: per-recipient status
W->>DB: update statuses + audit
W-->>S: sent/failed summary