Workflow — Ticketing & Mass Communication

ModuleTickets + Comms
ActorsApplicant/Visitor/GoH (asker), Staff (replies), System (routing, channels)
SRS refsUC-13, UC-14, FR-0900, FR-1200
StatusPlanned — 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

  1. User opens Support on their dashboard → New ticket: subject + message (+ media attachments).
  2. Ticket appears in the staff queue (status open); staff get a notification.
  3. Staff reply in thread → status answered, user notified (in-app; email/WhatsApp later).
  4. User may follow up → status pending (waiting on staff) → … → staff closes (closed).
  5. 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

  1. Staff → New communication: channel (email | WhatsApp*), audience selector:

all | visitors | applicants | goh | category:{id} | status:{status}.

  1. Compose subject + body (placeholders {name}, {event} supported).
  2. Preview: recipient count + sample rendering → confirm.
  3. System queues recipients (communication_recipients status=queued) → sender job delivers (now: email via SMTP—or log; WhatsApp: null driver writes to storage/logs/whatsapp.log until provider).
  4. Per-recipient results: sent | failed (+error); audit entry comms.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

TableChange
tickets / ticket_messagesINSERT/UPDATE thread + statuses
communications / communication_recipientsINSERT + per-recipient status
audit_logticket.*, comms.sent
notificationsping 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