12.5 Ticket Domain and API¶
Sprint: Sprint 12 - Notifications and Ticketing
Feature ID: 12.5
Subtasks: 12.5.1, 12.5.2, 12.5.3, 12.5.4
Objective¶
Deliver "Ticket Domain and API" within Sprint 12 - Notifications and Ticketing.
Dependencies¶
Aggregated from the subtasks below (prerequisite task IDs and enablers):
- 12.4.2
- 12.5.1
Subtasks¶
12.5.1 Open ticket with SLA assignment¶
- ID: 12.5.1
- Title: Implement POST /api/v1/tickets with SLA-based auto-assignment
- Description:
OpenTicketCommandcreating a ticket, computingsla_due_atandassigned_teamfrom the SLA policy for its category/priority (FR-32), and publishingticket.opened.v1andticket.assigned.v1. - Business Purpose: Capture and route customer requests (FR-31, FR-32).
- Inputs: FR-31, FR-32, event-catalog ticket events.
- Outputs: Open command, endpoint, SLA assignment, events.
- Acceptance Criteria:
- Opening a ticket sets
sla_due_atand a team per policy, emitsticket.opened.v1andticket.assigned.v1;ticket.opened.v1ultimately notifies the customer (FR-33 via 12.3.1). - Dependencies: 12.4.2
- Complexity: M
12.5.2 Comment, assign, resolve¶
- ID: 12.5.2
- Title: Implement comment/assign/resolve endpoints
- Description:
POST /{id}/comments,POST /{id}/assign,POST /{id}/resolvecommands; resolve setsresolved_atand emitsticket.resolved.v1; manual assign emitsticket.assigned.v1. - Business Purpose: Ticket workflow management (FR-31).
- Inputs: FR-31, analysis Section 8.9.
- Outputs: Commands + endpoints + events.
- Acceptance Criteria:
- Comments append; assign updates the team and emits the event; resolve transitions to RESOLVED and
emits
ticket.resolved.v1. - Dependencies: 12.5.1
- Complexity: M
12.5.3 SLA breach detection¶
- ID: 12.5.3
- Title: Detect SLA breaches and emit ticket.sla-breached.v1
- Description: A scheduled check emitting
ticket.sla-breached.v1for unresolved tickets pastsla_due_at(consumed by notification). - Business Purpose: Surface SLA violations for escalation (FR-32).
- Inputs: FR-32, event-catalog
ticket.sla-breached.v1. - Outputs: SLA-breach scheduler + event.
- Acceptance Criteria:
- An unresolved ticket past its SLA emits
ticket.sla-breached.v1once. - Dependencies: 12.5.1
- Complexity: S
12.5.4 Ticket read endpoint¶
- ID: 12.5.4
- Title: Implement GET /api/v1/tickets/{id}
- Description:
GetTicketQueryreturning the ticket with comments and SLA status asApiResult. - Business Purpose: Ticket visibility (FR-31).
- Inputs: FR-31.
- Outputs: Query + endpoint.
- Acceptance Criteria:
- GET returns the ticket and its comments; unknown id returns 404.
- Dependencies: 12.5.1
- Complexity: S
Acceptance Criteria¶
Each subtask above carries its own objective, testable acceptance criteria. This feature is complete when every subtask's acceptance criteria are met.
Deliverables¶
- Open command, endpoint, SLA assignment, events.
- Commands + endpoints + events.
- SLA-breach scheduler + event.
- Query + endpoint.
Definition of Done¶
- All subtasks (12.5.1, 12.5.2, 12.5.3, 12.5.4) completed and their acceptance criteria verified.
- All listed dependencies satisfied.
- Build and tests green per the global conventions in ../README.md (Section 3).