MDA-20 — V2 — Optimised routes & field analytics in the delegate app
Show optimised routes with time windows and richer performance analytics.
| Field | Details |
|---|---|
| Task code | MDA-20 |
| Phase | P4 — V2 evolutions |
| Product scope | V2 |
| Status | Planned |
| Start | Thu 28 Jan 2027 |
| Due | Sun 31 Jan 2027 |
| Responsible | Imad — Mobile developer (Flutter) |
| Co-responsible | — |
| Effort | 1.5 person-day(s) planned · 3 from scratch · size S |
| Area · app | Delegate app · mobile |
| Depends on | MRA-20 |
| Unblocks | DQA-12 |
| Milestones | V2 delivered |
Summary
Show optimised routes with time windows and richer performance analytics.
Description
V2 brings automatic tour optimisation and richer field analytics to the delegate app (FLD-18, ANA-06). Scope: show the optimised visit order with ETAs and time windows in the tour programme and on the map (server-computed, e.g. an encoded polyline and per-stop ETA), mark the order as « Ordre optimisé », optionally request re-optimisation from the current position when the policy allows, and extend DA-21 performance with trends, team/zone benchmarks and the prospect-to-first-order funnel. Routing is computed by the server (SRV-37); the app only displays it and keeps it in the offline snapshot. It needs the V2 extensions of delegate-tours and delegate-day (SRV-29/SRV-37/SRV-38) and Akram's DES-30 designs; it ships behind feature flags.
Subtasks
| # | Subtask | Owner |
|---|---|---|
| 1 | Snapshot schema update (drift migration) for optimised order, per-stop ETA, time windows and encoded route polyline | Imad |
| 2 | Tour programme and mini-map rendering the optimised order with time windows and « En avance » / « En retard » against ETA | Imad |
| 3 | Map polyline decoding and display of the optimised route, with offline fallback to the stored polyline | Imad |
| 4 | « Réoptimiser depuis ma position » action when the policy allows, online only, with the result replacing the order after confirmation | Imad |
| 5 | Performance analytics in DA-21: trends over weeks, benchmark vs zone/team average, conversion funnel prospect → install → account → first order | Imad |
| 6 | Feature flags and graceful degradation when the server has no optimisation for a tour | Imad |
Deliverables
- apps/delegate/lib/src/features/tour/ optimised-order rendering
- apps/delegate/lib/src/features/reports/ analytics widgets
- Drift migration with tests
Acceptance criteria
- An optimised tour shows the same order in list and map with ETAs and time windows (FLD-06, FLD-18)
- The optimised order is available offline after the morning snapshot
- Re-optimisation is impossible offline and never silently changes an imposed order
- Analytics figures match the back-office for the same delegate and period (ANA-06)
Requirements covered
| Requirement | Title | Release |
|---|---|---|
| FLD-18 | Automatic tour optimisation (routing engine) | V2 |
| ANA-06 | Advanced analytics (cohorts, forecasting, delegate benchmarking) | V2 |
API surface
| Endpoint group | Operations |
|---|---|
| Tours & visits | 19 |
| Delegate home, profile, objectives & reports | 6 |
Test measures
- Drift migration test from the V1 schema
- Widget tests of ETA/time-window states
- Integration test against the V2 mock for an optimised tour
Risks
- Optimised ETAs that are unrealistic in Algerian traffic undermine trust — show time windows rather than exact minutes and collect feedback from delegates
KPI
- Delivered by Sun 31 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.