docs(openspec): plan shop coupons, accounts, points, flash sales, and group buying
Capture exclusive promotion composition, empty-group cancel, and mall surface scope so the five marketing changes can be implemented without stacking or lifecycle ambiguity. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
co-authored by
Cursor
parent
e10cae5789
commit
53548196f8
@@ -0,0 +1,12 @@
|
||||
## ADDED Requirements
|
||||
|
||||
### Requirement: Platform points mall management
|
||||
Platform admins SHALL manage points products and inspect and fulfill redemption orders through the admin console using the shared API contract. Admin SHALL expose points-mall navigation beside existing platform operations.
|
||||
|
||||
#### Scenario: manage a redemption catalog item
|
||||
- **WHEN** a platform admin publishes a configured points product
|
||||
- **THEN** it becomes available in the customer points mall
|
||||
|
||||
#### Scenario: points mall appears in admin navigation
|
||||
- **WHEN** an authenticated platform admin opens the admin console
|
||||
- **THEN** points-product and redemption-order management are reachable from the console nav
|
||||
@@ -0,0 +1,8 @@
|
||||
## ADDED Requirements
|
||||
|
||||
### Requirement: Live points mall
|
||||
The mall SHALL display live published points products and the signed-in customer's live points balance, allow redemption with a shipping address, and show the customer's redemption history on the points route. It SHALL replace `INTEGRAL_PRODUCTS` and `USER_STATS` imports on the points route.
|
||||
|
||||
#### Scenario: redeem available product
|
||||
- **WHEN** a signed-in shopper with enough points redeems a published in-stock product
|
||||
- **THEN** the mall shows the created redemption order and refreshed points balance
|
||||
@@ -0,0 +1,30 @@
|
||||
## ADDED Requirements
|
||||
|
||||
### Requirement: Platform points product catalog
|
||||
Platform admins SHALL create, update, publish, unpublish, and list points products with localized user-facing content, integer points price, stock, images, and recommendation order. Customers SHALL discover only published products.
|
||||
|
||||
#### Scenario: unpublished product is unavailable
|
||||
- **WHEN** an admin unpublishes a points product
|
||||
- **THEN** customers cannot discover or redeem it
|
||||
|
||||
### Requirement: Atomic points redemption
|
||||
An authenticated customer SHALL redeem a published points product using a quantity and shipping address. The server SHALL atomically validate stock, debit points through customer accounts, create a redemption order with immutable product and address snapshots, and decrement stock.
|
||||
|
||||
#### Scenario: insufficient points
|
||||
- **WHEN** a customer redeems a product costing more points than available
|
||||
- **THEN** the API returns 409 and creates no redemption order or stock change
|
||||
|
||||
#### Scenario: final stock contention
|
||||
- **WHEN** concurrent redemptions request the final product stock
|
||||
- **THEN** only requests covered by stock succeed and no negative stock is stored
|
||||
|
||||
### Requirement: Redemption history and fulfillment
|
||||
Customers SHALL list only their redemption orders. Platform admins SHALL list redemption orders and transition pending fulfillment to fulfilled or cancelled with validated current status. Demo seed SHALL credit points through customer accounts so at least one published product can be redeemed in the live mall.
|
||||
|
||||
#### Scenario: fulfill redemption
|
||||
- **WHEN** a platform admin fulfills a pending redemption order
|
||||
- **THEN** its status becomes fulfilled and the customer sees that status in history
|
||||
|
||||
#### Scenario: seeded points are spendable
|
||||
- **WHEN** a seeded demo customer with a seed ledger credit redeems an in-stock published product they can afford
|
||||
- **THEN** the redemption succeeds and the points summary decreases by the product price
|
||||
Reference in New Issue
Block a user