HOCO B2B
Team tasksImad

MRA-09 — Reseller app — invitation attribution

App links for /i/{code}, Play install-referrer read on first open, code prefill at sign-up, catalog-viewed signal.

FieldDetails
Task codeMRA-09
PhaseP1 — V1 build & integration
Product scopeV1
StatusPlanned
StartSun 22 Nov 2026
DueMon 23 Nov 2026
ResponsibleImad — Mobile developer (Flutter)
Co-responsible—
Effort0.75 person-day(s) planned · 3 from scratch · size S
Area · appReseller app · mobile
Depends onMOB-06
UnblocksDQA-02
Milestones—

Summary

App links for /i/{code}, Play install-referrer read on first open, code prefill at sign-up, catalog-viewed signal.

Description

Delegates are judged on the resellers they convert, so a sign-up started from a delegate's invitation link or QR must be attributed to that delegate even when the app is installed from the Play Store in between (IVT-03, IVT-04). Scope: Android App Links for https://app.hoco.dz/i/{code}, reading the Play Install Referrer on first open, reporting first open through invitations.attribute (public, idempotent, device-scoped), resolving the code with invitations.resolve to prefill RA-03 with « Invité par … », and the catalog-viewed signal that advances the delegate's activation steps. It needs from Anis the /.well-known/assetlinks.json on app.hoco.dz with each flavor's signing fingerprints, the /i/{code} landing page that redirects to the store with the referrer, SRV-22 attribution rules and the catalog-viewed event shape. MDA-08 shows the steps this task triggers.

Subtasks

#SubtaskOwner
1Android intent-filter with autoVerify for https://app.hoco.dz/i/* (and the staging host for the staging flavor); route /i/:code in the MOB-05 registryImad
2InstallReferrerService (Play Install Referrer API) read once on first launch; parse invite_code from the referrer string; result persisted so it is never re-readImad
3AttributionService: POST /public/invitations/attribution with deviceId, code, referrer and app version, Idempotency-Key fixed per install; retried until acknowledgedImad
4Code resolution with GET /public/invitations/{code}: inviter first name and store name shown on RA-02/RA-03; invalid or expired code → « Ce lien d'invitation n'est plus valide » and normal sign-upImad
5PendingInvitation store: code kept until sign-up and sent as invitationCode in auth.signup.reseller; manual entry AB12-CD34 still possibleImad
6Catalog-viewed signal after the first authenticated catalog view (event shape agreed with Anis), sent onceImad
7Already signed-in user opening an invitation link: link ignored with « Vous avez déjà un compte »Imad
8Publish assetlinks.json and the /i/{code} landing page with the Play Store referrer redirectAnis

Deliverables

  • apps/reseller/lib/src/features/invitation/ (referrer, attribution, pending invitation)
  • apps/reseller/android/app/src/main/AndroidManifest.xml app-link intent filters per flavor
  • SHA-256 signing fingerprints of each flavor handed to Anis for assetlinks.json

Acceptance criteria

  • With the app installed, tapping https://app.hoco.dz/i/AB12CD34 opens the app on sign-up with the code prefilled and « Invité par Karim » shown (IVT-04)
  • Without the app, the same link leads to the Play Store; after install, the first open reads the referrer and the sign-up is attributed to the inviting delegate
  • The delegate's activation steps advance to « Application téléchargée », « Compte créé », « Téléphone vérifié » and « Catalogue consulté » as the reseller progresses (IVT-03)
  • Reopening the app or reinstalling on the same device does not send duplicate attributions
  • An expired code never blocks sign-up

Requirements covered

RequirementTitleRelease
IVT-03Activation steps updated automatically: app installed, account created, phone verified, catalog viewed, first orderV1
IVT-04The link opens the right app or store and attributes the sign-up to the inviting delegateV1

Screens

ScreenNameApp
RA-02Welcome (sign in, sign up, browse as guest)RA
RA-03Sign-up — phone & invitation codeRA

API surface

Test measures

  • Unit tests of the referrer parser and of the attribution retry/once logic
  • Device test with Play internal testing: link → store → install → first open → attribution visible in the back-office
  • adb am start tests of the app link on the installed app for each flavor

Risks

  • Install referrer only works for Play Store installs — keep manual code entry and the prefilled code from the resolved link as fallbacks
  • App Link verification fails if fingerprints change (Play App Signing) — use the Play signing certificate fingerprint and re-verify after MOB-14

KPI

  • Delivered by Mon 23 Nov 2026 within 0.75 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