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>
2.2 KiB
2.2 KiB
Why
The group-buying page displays invented participant counts but no group can be opened, joined, completed, or expired. This capability requires a visible lifecycle tied to checkout intent and payment-time seat claims.
What Changes
- Add shop-managed group-buying activities with localized presentation data, fixed minor-unit group price, required paid-member count, eligibility window, and a per-order item limit of quantity 1 for the activity SKU.
- Add concrete group instances that can be opened, joined atomically up to capacity, succeed on reaching capacity, or expire.
- Bind qualifying orders to a group instance at checkout, resolve group price server-side, and expose activity and open-group discovery to customers.
- Claim paid membership at payment, not at cart checkout. Pending-payment cancellation restores SKU stock only and does not roll back paid seats. If the cancelled order opened a group that still has zero paid members, that empty group becomes
cancelledand is no longer joinable. Paid groups that expire without filling remain identifiable for a later refund workflow. - Compose exclusively with other promotions: a SKU MUST NOT overlap an active flash sale; a shop order with group-buy intent SHALL reject a coupon. Restate coupon and flash-sale checkout/cancel clauses in this change's
orderspec. - Replace the display-only mall fixture and add shop-admin activity management.
Capabilities
New Capabilities
group-buying: Timed group-buying activities, group-instance lifecycle, joining, and public discovery.
Modified Capabilities
order: Checkout validates group participation and snapshots group-buy pricing.frontend-mall: Group-buying pages use live activity and group state.frontend-shop-admin: Shops manage their own group-buying activities.
Non-goals
Refund execution, shipping holds, multi-product groups, platform campaigns, referral incentives, stacking coupons onto group-priced shop orders, and overlapping flash-sale pricing on the same SKU are excluded.
Impact
Adds Rust marketing state-machine module/migrations, shared contract/locales, mall and shop-admin routes, and lifecycle/concurrency integration tests.