12.3 Notification Eventing and API¶
Sprint: Sprint 12 - Notifications and Ticketing
Feature ID: 12.3
Subtasks: 12.3.1, 12.3.2
Objective¶
Deliver "Notification Eventing and API" within Sprint 12 - Notifications and Ticketing.
Dependencies¶
Aggregated from the subtasks below (prerequisite task IDs and enablers):
- 12.2.2
- 12.2.3
- 12.2.1
Subtasks¶
12.3.1 Domain-event-to-notification consumers¶
- ID: 12.3.1
- Title: Consume domain events and dispatch templated notifications
- Description: Idempotent (inbox) consumers mapping domain events to templates/channels:
subscription.activated.v1-> welcome SMS;customer.kyc-approved.v1/kyc-rejected.v1-> result;invoice.generated.v1-> email;quota.threshold-reached.v1-> 80% SMS;quota.exceeded.v1-> addon-recommendation SMS;ticket.opened.v1-> ticket SMS. Emitnotification.dispatched.v1. - Business Purpose: Close all engagement loops opened by earlier sprints (FR-28, AC-01/02/03).
- Inputs: event-catalog consumers, AC-01/02/03.
- Outputs: Event-to-notification consumers +
notification.dispatched.v1. - Acceptance Criteria:
- Each listed event triggers exactly one preference-respecting dispatch (inbox-deduplicated) and a
notification.dispatched.v1event; AC-01 welcome SMS, AC-02 invoice email, and AC-03 80%/100% SMS now flow through this service. - Dependencies: 12.2.2, 12.2.3
- Complexity: L
12.3.2 Notification API¶
- ID: 12.3.2
- Title: Implement internal send and history endpoints
- Description:
POST /api/v1/notifications(internal, ad-hoc send) andGET /api/v1/notifications/users/{id}/historyreturningApiResultwith pagination. - Business Purpose: Direct send and audit/history visibility (FR-28).
- Inputs: FR-28, analysis Section 8.8.
- Outputs: Endpoints + DTOs.
- Acceptance Criteria:
- Internal send dispatches respecting preferences; history returns a user's notifications paginated.
- Dependencies: 12.2.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¶
- Event-to-notification consumers +
notification.dispatched.v1. - Endpoints + DTOs.
Definition of Done¶
- All subtasks (12.3.1, 12.3.2) completed and their acceptance criteria verified.
- All listed dependencies satisfied.
- Build and tests green per the global conventions in ../README.md (Section 3).