URD: Campaign
| Module | EXT-03 | Version | v0.2 |
|---|---|---|---|
| Status | Planned | Date | 2026-06-04 |
Business documentation. This URD is Campaign's feature list - each feature below is one Functional Area (
<AREA>). The same<AREA>keys the feature's PRDs (PRD-<AREA>-NNN) and tests (TC-<AREA>-NNN), and each feature is listed in the Delivery feature catalog. See the Feature Spine convention.
1. Purpose
Let merchants drive sales with targeted promotions - discounts, bundles and BuyGet offers - that apply automatically or via coupon, scoped by customer, product, and date.
2. Scope
| Included | Excluded |
|---|---|
| Promotion setup, rules, lifecycle | Loyalty points (Loyalty module) |
| BuyGet, bundles, coupons | Message delivery (Marketing module) |
| Discount application at checkout | Tax calculation (Pricing tax engine) |
3. Definitions
| Term | Definition |
|---|---|
| Promotion | A campaign with eligibility rules and a discount method |
| Method | How the discount works (percentage/fixed, target, allocation) |
| Rule | A condition controlling who/what qualifies |
| BuyGet | Conditional "buy X, get Y" offer |
4. Conceptual Model
Conceptual only - full schema lives in the developer promotion docs.
5. Feature Catalog
The feature list of this module. Each row is one feature (a Functional Area). Detail in §6. Mirrored in the Delivery feature catalog.
| Feature ID | Feature | Phase | Status | Priority |
|---|---|---|---|---|
PRM | Promotion Setup & Lifecycle | P1 | Built | High |
APP | Discount Application | P2 | Planned | High |
Status: live from Plane where mapped, otherwise registry-declared. Vocabulary mirrors Plane (state-group / phase).
6. Features
One sub-section per feature, in catalog order. Each feature keeps its description, requirements, and acceptance together. Priority = MoSCoW (Must / Should / Could / Won't).
PRM - Promotion Setup & Lifecycle Planned
Feature ID: campaign/PRM · Phase: P1 · PRDs: - · Dev: @nx/pricing
What it does for users: merchants set up a promotion - its discount method (percentage/fixed) and eligibility, source and target rules - in one step, then move it through its lifecycle from draft to active to archived, with usage limits enforced.
Requirements
| ID | P | Requirement |
|---|---|---|
| URD-PRM-001 | M | Create a promotion with method and rules atomically |
| URD-PRM-002 | M | Move a promotion through DRAFT → ACTIVATED → DEACTIVATED/EXPIRED/ARCHIVED |
| URD-PRM-003 | S | Define eligibility, source, and target rules |
| URD-PRM-004 | S | Enforce usage limits per promotion |
Acceptance
AC-PRM-01: Atomic promotion creation
| Given | When | Then |
|---|---|---|
| A promotion, method, and rules payload | The aggregate create is submitted | All entities are created together, or none on error |
APP - Discount Application Planned
Feature ID: campaign/APP · Phase: P2 · PRDs: - · Dev: @nx/pricing
What it does for users: at checkout, eligible promotions apply automatically - and shoppers can enter a manual coupon code - so discounts land on the order without manual intervention, with usage and ROI reportable.
Requirements
| ID | P | Requirement |
|---|---|---|
| URD-APP-001 | M | Auto-apply eligible promotions during checkout |
| URD-APP-002 | S | Apply a manual coupon code at checkout |
| URD-APP-003 | C | Report promotion usage and ROI |
Acceptance
AC-APP-01: Auto-apply at checkout
| Given | When | Then |
|---|---|---|
| An active promotion whose rules match the cart | Checkout is computed | The eligible promotion is applied automatically to the order |
7. Constraints & Non-Goals
Constraints
| ID | Constraint |
|---|---|
| C-01 | A promotion must have a valid method before it can activate |
| C-02 | Deleting a promotion cascades to its method and rules |
Non-Goals
- Loyalty point earning/redemption (owned by Loyalty)
- Sending promotional messages (owned by Marketing)
8. Version History
| Date | Author | Description | Ver |
|---|---|---|---|
| 2026-05-30 | PM | Initial stub; setup/lifecycle live, application planned | v0.1 |
| 2026-06-04 | Claude (AI pair) | Reorganize by feature (Feature Spine) | v0.2 |