12.2 Notification Channels and Templates¶
Sprint: Sprint 12 - Notifications and Ticketing
Feature ID: 12.2
Subtasks: 12.2.1, 12.2.2, 12.2.3
Objective¶
Deliver "Notification Channels and Templates" within Sprint 12 - Notifications and Ticketing.
Dependencies¶
Aggregated from the subtasks below (prerequisite task IDs and enablers):
- 12.1.2
- 12.2.1
Subtasks¶
12.2.1 Channel adapters (SMS, email, push - mock)¶
- ID: 12.2.1
- Title: Implement mock SMS/email/push channel adapters
- Description: A
NotificationChannelport with mock SMS, email, and push implementations that log the dispatch (mock channel per MVP scope) and return a delivery result; resilience-wrapped (NFR-10). - Business Purpose: Multi-channel delivery abstraction (FR-28).
- Inputs: FR-28, analysis Section 6.1 (mock channel).
- Outputs: Channel port + mock adapters.
- Acceptance Criteria:
- Each channel dispatches via its mock adapter and records a
notificationsrow with status SENT; a failing adapter records FAILED. - Dependencies: 12.1.2
- Complexity: M
12.2.2 Template rendering¶
- ID: 12.2.2
- Title: Implement template lookup and rendering
- Description: Render a notification from a stored template by (code, channel, locale) with variable substitution from the event payload (FR-29). Seed templates for welcome, KYC result, invoice issued, quota 80%, quota 100% (addon recommendation), ticket opened.
- Business Purpose: Consistent, localizable messaging (FR-29).
- Inputs: FR-29, AC-01/02/03 messages.
- Outputs: Template engine + seeded templates.
- Acceptance Criteria:
- A template renders with substituted variables; a missing template/locale falls back per a defined rule; seeded templates exist for the listed events.
- Dependencies: 12.1.2
- Complexity: M
12.2.3 Preference enforcement¶
- ID: 12.2.3
- Title: Enforce opt-in/opt-out before dispatch
- Description: Before sending, check the user's per-channel preference and suppress dispatch when opted out, recording the suppression (FR-30). Provide endpoints to read/update preferences.
- Business Purpose: Respect customer communication consent (FR-30, KVKK/GDPR).
- Inputs: FR-30.
- Outputs: Preference check + endpoints.
- Acceptance Criteria:
- An opted-out user on a channel is not sent on that channel (suppression recorded); preference updates take effect on the next dispatch.
- Dependencies: 12.2.1
- Complexity: M
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¶
- Channel port + mock adapters.
- Template engine + seeded templates.
- Preference check + endpoints.
Definition of Done¶
- All subtasks (12.2.1, 12.2.2, 12.2.3) completed and their acceptance criteria verified.
- All listed dependencies satisfied.
- Build and tests green per the global conventions in ../README.md (Section 3).