Skip to content

URD: Helpdesk

ModuleCORE-13Versionv0.2
StatusIn-progressDate2026-05-29

1. Purpose

Define the user-facing requirements for the Helpdesk module — support ticket management, agent routing, SLA enforcement, knowledge base, satisfaction surveys, and feature-request tracking — so a merchant's support team can resolve customer issues within committed service levels.

Build status: the backend exists but does not currently compile, so requirements below describe intended behavior. Until the build is repaired no requirement should be treated as verified-shipped. See the module overview.

2. Scope

IncludedExcluded
Support ticket lifecycle (CRUD + state machine)AI-assisted reply suggestions (future)
Threaded messages (customer / agent / internal notes)Predictive SLA breach (future)
File attachments on messagesOmni-channel intake (email, Zalo, Messenger)
Ticket categories, priorities, tagsCustomer self-service portal (future)
SLA policies + per-ticket tracking + multi-level escalationSLA reporting dashboards (Reports module)
Agent management (profiles, groups, rules) and auto-assignmentIssuing user accounts (User Management)
Knowledge base articles, categories, feedback, view tracking
CSAT / NPS / CES surveys; feature-request voting
Compensation issuance (credit, voucher, refund, …)
Real-time + email notifications and preferences

3. Definitions

TermDefinition
TicketA tracked customer support request with a lifecycle status
AgentA merchant user who works tickets, with availability, skills, and a workload cap
SLAService Level Agreement — committed first-response and resolution time per priority
SLA trackerPer-ticket record of deadlines and elapsed time against an SLA policy
EscalationRouting a breached or critical ticket to a higher support level
Internal noteA message visible only to agents, never to the customer
CSAT / NPS / CESCustomer Satisfaction / Net Promoter / Customer Effort survey types

4. Conceptual Model

Conceptual only — the full schema lives in the developer domain model.

5. Functional Requirements

One table per functional area. <AREA> codes match the test-case IDs. Priority = MoSCoW (Must / Should / Could / Won't).

5.1 Ticket Management (TKT)

IDPRequirement
URD-TKT-001MCreate a ticket with subject, description, category, and priority
URD-TKT-002MA ticket is always scoped to a single merchant
URD-TKT-003MReporter type: customer-raised or agent-raised on behalf of a customer
URD-TKT-004MTicket follows the 8-status lifecycle: OPEN → ASSIGNED → IN_PROGRESS → WAITING_USER / WAITING_INTERNAL → ESCALATED → RESOLVED → CLOSED
URD-TKT-005MAssign a ticket to an agent, manually or automatically
URD-TKT-006MRecord assignment, resolution, and closure details (who, when, resolution note)
URD-TKT-007MStore ticket context for enrichment from related services
URD-TKT-008MMaintain a full audit trail of every state change and action
URD-TKT-009SRe-open a ticket if the customer replies after it was marked resolved
URD-TKT-010SCustomer confirms resolution; ticket auto-closes after 48h with no response
URD-TKT-011SEnrichment annotates a ticket with merchant/order context automatically
URD-TKT-012STickets are soft-deleted only

5.2 Ticket Messages (MSG)

IDPRequirement
URD-MSG-001MAdd messages of type comment, customer reply, agent reply, internal note, system message, or auto-reply
URD-MSG-002MInternal notes are visible only to agents, never to the customer
URD-MSG-003MMessages support file attachments
URD-MSG-004MTrack the author and author type (customer / agent) of each message
URD-MSG-005SSystem auto-appends a system message on each state transition

5.3 Categories, Tags & Priorities (CAT)

IDPRequirement
URD-CAT-001MHierarchical ticket categories (parent/child) with icon and color
URD-CAT-002MA category defines default priority, required skills, default group, and SLA policy
URD-CAT-003MManage ticket tags (create, edit, remove)
URD-CAT-004SAdd and remove tags on a ticket
URD-CAT-005MFour priority levels: Low, Medium, High, Critical

5.4 SLA Management (SLA)

IDPRequirement
URD-SLA-001MDefine SLA policies with response time and resolution time per priority
URD-SLA-002MConfigure warning (default 75%) and critical (default 90%) thresholds
URD-SLA-003MOptionally restrict the SLA clock to business hours only
URD-SLA-004MCreate an SLA tracker at ticket creation with response and resolution deadlines
URD-SLA-005MA scheduled monitor marks warning and breached states automatically
URD-SLA-006MRecord first-response time and time-to-resolution
URD-SLA-007MSupport three escalation levels (L1, L2, L3)
URD-SLA-008MEscalation types: SLA breach, manual, customer request, high impact, incident report
URD-SLA-009SEscalation rules are configurable within an SLA policy
URD-SLA-010SA ticket category's SLA policy overrides the global default

5.5 Agent Management (AGT)

IDPRequirement
URD-AGT-001MLink a user account as an agent within a merchant (one agent per user)
URD-AGT-002MAgent availability status: online, away, offline, busy
URD-AGT-003MAgent defines skills, languages, and a max concurrent ticket cap
URD-AGT-004MGroup agents and manage group membership
URD-AGT-005MConfigure prioritized assignment rules per merchant
URD-AGT-006MAssignment strategies: round robin, skill-based, skill-based round robin, load-balanced, manual, best experience, fastest resolution
URD-AGT-007MAn auto-assignment worker evaluates rules and selects the best available agent
URD-AGT-008STrack agent performance: avg response/resolution time, SLA compliance, satisfaction score
URD-AGT-009SAgent schedule for business-hours availability
URD-AGT-010MSkip an agent already at their max concurrent ticket cap

5.6 Knowledge Base (KB)

IDPRequirement
URD-KB-001SCreate and manage multilingual articles (title, content, excerpt)
URD-KB-002SArticle lifecycle: draft → published → archived
URD-KB-003SArticles have category, author, locale, globally-unique slug, and tags
URD-KB-004STrack view, helpful, and not-helpful counts per article
URD-KB-005SHierarchical article categories
URD-KB-006CCustomers submit helpful / not-helpful feedback
URD-KB-007CView tracking records individual article views

5.7 Surveys & Feedback (SRV)

IDPRequirement
URD-SRV-001SCreate surveys of type CSAT, NPS, or CES
URD-SRV-002STrigger modes: post-resolution, post-close, or periodic
URD-SRV-003SAdd and reorder survey questions
URD-SRV-004SA worker auto-sends the survey to the customer after resolution
URD-SRV-005SCapture and store survey responses
URD-SRV-006SResponse data feeds the agent satisfaction score

5.8 Feature Requests (FR)

IDPRequirement
URD-FR-001SCustomers submit feature requests with title, description, category, tags
URD-FR-002SLifecycle: submitted → under review → planned → in development → completed / declined / duplicate
URD-FR-003SOne vote per customer; unvote supported
URD-FR-004SA feature request may be linked to a source ticket
URD-FR-005CInternal and resolution notes for the product team

5.9 Compensation (CMP)

IDPRequirement
URD-CMP-001SIssue compensation on SLA breach or at agent discretion
URD-CMP-002STypes: store credit, voucher, refund, discount, free shipping
URD-CMP-003SLifecycle: pending → processing → completed / failed / cancelled / expired
URD-CMP-004SLink compensation to a ticket and, optionally, an escalation

5.10 Notifications (NTF)

IDPRequirement
URD-NTF-001MReal-time notifications to agents and customers on ticket events
URD-NTF-002SEmail notifications on creation, assignment, reply, and resolution
URD-NTF-003SPer-user notification preferences (opt-in per event type)
URD-NTF-004SCustomizable notification templates per event
URD-NTF-005SBatched delivery with a per-recipient delivery log

6. Acceptance Criteria

AC-TKT-01: Ticket Creation
GivenWhenThen
Authenticated customerCreates a ticket with required fieldsTicket saved as OPEN; SLA tracker initialized with deadlines
Assignment rules configuredTicket createdAuto-assignment runs within 2 minutes; status → ASSIGNED
AC-TKT-02: State Transitions
GivenWhenThen
OPEN ticketAgent assignedStatus → ASSIGNED
ASSIGNED ticketAgent sends first replyStatus → IN_PROGRESS; first-response time recorded
IN_PROGRESS ticketAgent awaits customer infoStatus → WAITING_USER
WAITING_USER ticketCustomer repliesStatus → IN_PROGRESS
IN_PROGRESS ticketAgent marks resolvedStatus → RESOLVED; resolution details recorded
RESOLVED ticketCustomer confirmsStatus → CLOSED
RESOLVED ticketCustomer repliesStatus → IN_PROGRESS (re-opened)
AC-SLA-01: SLA Enforcement
GivenWhenThen
SLA policy appliedTicket createdFirst-response deadline = now + response time
75% of deadline elapsedMonitor runsSLA status = warning; agent notified
100% of deadline elapsedMonitor runsSLA status = breached; L1 escalation created
Agent responds in timeBefore deadlineFirst-response status = OK; time-to-first-response recorded
AC-AGT-01: Assignment
GivenWhenThen
Rule = round robinTicket arrivesNext agent in rotation assigned
Rule = skill-based; category needs "billing"Auto-assignment runsAgent with that skill and lowest load selected
Agent at max concurrent ticketsAuto-assignment runsAgent skipped; next eligible agent chosen
No available agentsAuto-assignment runsEscalated to manager

7. Constraints & Non-Goals

Constraints

IDConstraint
C-01Tickets are always scoped to a merchant
C-02One SLA tracker per ticket; immutable after breach
C-03Internal notes are never returned to non-agent consumers
C-04Article slug is globally unique
C-05One agent profile per user
C-06One feature-request vote per customer per request
C-07All records use soft-delete
C-08A resolved ticket auto-closes 48h after resolution if unconfirmed

Non-Goals

  • AI-powered reply suggestions
  • Predictive SLA breach warning
  • Omni-channel intake (email, Zalo OA, Facebook Messenger)
  • Customer-facing self-service ticket portal
  • SLA reporting dashboards (Reports module)

8. Version History

DateAuthorDescriptionVer
2026-05-07GitHub CopilotInitial draft from schema and system-design explorationv0.1
2026-05-29Docs migrationRestructured to module convention; status set to In-progress (build broken); area codes aligned with test casesv0.2

Proprietary and Confidential. Unauthorized copying, distribution, or use of this software is strictly prohibited.