HOCO B2B
Team tasksImad

MRA-20 — V2 — Reseller app loyalty, rewards & packs

Points, level progress, history, rewards and redemption, packs list/detail and add-pack-to-cart.

FieldDetails
Task codeMRA-20
PhaseP4 — V2 evolutions
Product scopeV2
StatusPlanned
StartMon 25 Jan 2027
DueWed 27 Jan 2027
ResponsibleImad — Mobile developer (Flutter)
Co-responsible—
Effort3 person-day(s) planned · 6 from scratch · size M
Area · appReseller app · mobile
Depends onSRV-29, DES-30
UnblocksMDA-20
Milestones—

Summary

Points, level progress, history, rewards and redemption, packs list/detail and add-pack-to-cart.

Description

V2 adds loyalty and profitable packs to the reseller app (LOY-01, LOY-03, LOY-04, LOY-05, PRM-06). Scope: packs list and detail RA-37 with add-pack-to-cart, loyalty summary with points, level and progress plus history RA-38, and the rewards catalogue with redemption and vouchers RA-39. Returns moved to V1 (MRA-10) and are not part of this task. Work starts against the V2 contract on the mock server (SRV-29) while the engines (SRV-30, SRV-31) are built, and everything ships behind feature flags until V2 go-live. Packs follow the V1 rules: price per customer type, availability only (STK-07), no prices for guests. It needs SRV-29 and Akram's DES-30 designs; MDA-20 follows.

Subtasks

#SubtaskOwner
1Regenerate hoco_api from the V2 contract (loyalty, packs, cart.packs.add) and add V2 feature flags read from appConfigImad
2PacksScreen RA-37: GET /packs list and GET /packs/{id} detail with items, pack price vs sum of items (« Économisez 1 200,00 DA »), availability pillImad
3Add pack to cart (POST /cart/packs with an Idempotency-Key) and pack rendering as one unit in the cart lines (hoco_catalog)Imad
4LoyaltyScreen RA-38: GET /loyalty/summary (points, level « Bronze », « Silver », « Gold », « VIP », progress to next level) and history GET /loyalty/transactions (Gain, Bonus, Échange, Expiration, Ajustement, Annulation)Imad
5RewardsScreen RA-39: GET /loyalty/rewards with eligibility, redeem confirmation → POST /loyalty/rewards/{id}/redeem with an Idempotency-Key, my redemptions and vouchers with code/QR (GET /loyalty/redemptions)Imad
6Home and account tiles for points and level, hidden when the flag is offImad
7Design QA of V2 surfaces against DES-30 (part of DQA-12)Akram

Deliverables

  • apps/reseller/lib/src/features/loyalty/ and features/packs/
  • hoco_catalog pack line support in the cart widgets
  • Feature-flagged V2 build on Firebase App Distribution (staging)

Acceptance criteria

  • A pack is added to the cart as one unit at the pack price for the reseller's customer type, and checkout applies it (PRM-06)
  • Points balance, level and history match the back-office and every movement is traceable (LOY-03, LOY-05)
  • Redeeming a reward deducts points once even if the request is retried, and the voucher appears in my redemptions (LOY-04)
  • With the V2 flags off nothing of loyalty or packs is visible
  • Guests see packs without prices and cannot add them (AUTH-10)

Requirements covered

RequirementTitleRelease
LOY-01Points earned per order, credited after delivery or payment (setting), bonusesV2
LOY-03Levels Bronze, Silver, Gold, VIP over a period with client-validated thresholdsV2
LOY-04Rewards catalogue (voucher, free delivery, discount, gift, early access) and redemptionV2
LOY-05Traceable points history for the reseller and the back-officeV2
PRM-06Profitable packs: bundles of references at a pack price, added to cart as a unitV2

Screens

ScreenNameApp
RA-37Packs list & detailRA
RA-38Loyalty: points, level, historyRA
RA-39Rewards & redemptionRA

API surface

Test measures

  • Widget tests of the pack cart line and the redemption confirmation
  • Integration test against the V2 mock: pack → cart → checkout; reward → redeem → voucher
  • Golden tests of the loyalty level progress at each LoyaltyLevel

Risks

  • Level thresholds and earning rules are not validated by HOCO yet — display only server-computed values, never local calculations

KPI

  • Delivered by Wed 27 Jan 2027 within 3 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