HOCO B2B
Team tasksAnis

SRV-31 — V2 — Profitable packs

Pack definitions, pack pricing and stock, add-pack-to-cart, interaction with promotions.

FieldDetails
Task codeSRV-31
PhaseP4 — V2 evolutions
Product scopeV2
StatusPlanned
StartWed 27 Jan 2027
DueThu 28 Jan 2027
ResponsibleAnis — Full-stack developer
Co-responsible—
Effort1.5 person-day(s) planned · 4 from scratch · size S
Area · appServer · server
Depends onSRV-30
UnblocksSRV-32, DSH-21
Milestones—

Summary

Pack definitions, pack pricing and stock, add-pack-to-cart, interaction with promotions.

Description

Profitable packs are V2 (cahier §4.6, §5.5, §14.2; PRM-06): bundles of references sold at a pack price and added to the cart as one unit. This task implements Pack and PackItem, pack prices per customer type consistent with the three-price model, pack availability derived from its components (availability only for resellers), cart.packs.add adding a pack line that reserves and deducts its component variants, snapshot of pack lines on orders and documents, packs.list/get for resellers and admin.packs.crud, and the interaction rules with promotions. Out of scope: pack pages (DSH-21, WEB-20).

Subtasks

#SubtaskOwner
1Pack and PackItem models and admin.packs.crud (items, quantities, period, images, status)Anis
2Pack prices per customer type and saving shown against the sum of item pricesAnis
3Pack availability from component stock (IN_STOCK only if every component is available in the pack quantity)Anis
4cart.packs.add (idempotent) and cart line expansion for stock checks, reservation and deduction of componentsAnis
5Order and document snapshots of pack lines (pack line with component detail on the delivery note)Anis
6Promotion interaction rule (packs excluded from line promotions by default, setting to allow)Anis
7Reseller packs.list/get guest-safe (no price for guests)Anis

Deliverables

  • apps/server/src/modules/promotions/packs/{service,router,availability}.ts
  • Cart and orders changes for pack lines
  • Prisma migration for Pack and PackItem

Acceptance criteria

  • Adding a pack to the cart adds one line at the pack price for the reseller's customer type (PRM-06)
  • A pack becomes OUT_OF_STOCK as soon as one component lacks the required quantity (STK-07)
  • Validating an order with a pack reserves each component variant
  • Line promotions do not apply to packs unless the setting allows it

Requirements covered

RequirementTitleRelease
PRM-06Profitable packs: bundles of references at a pack price, added to cart as a unitV2

API surface

Test measures

  • DB tests for component reservation and availability
  • Unit tests for pack pricing and saving

KPI

  • Delivered by Thu 28 Jan 2027 within 1.5 person-day(s).
  • Every acceptance criterion above demonstrated before hand-off; linked requirements' acceptance criteria pass.
  • Zero open critical defects, permission gaps or data-integrity regressions at sign-off.

Generated from content/plan/tasks.json by scripts/generate-team-tasks.mjs. Dates are computed by the scheduler (Sunday–Thursday weeks, holidays excluded) — change the plan, not this page.

On this page