Easy Home Finance · internal · build document

Easy Branch Desk — Business Requirements Document

What every screen is for, what data it shows and where each field comes from, what every call-to-action does, and how the data flows — for a builder with zero EHFL context. The clickable truth is the prototype; doc 02 holds the rules.

15 — Business Requirements Document (BRD)

Easy Branch Desk — the company's single working surface. This document tells a builder with zero EHFL context what every screen is for, what data it shows and where each field comes from, what every call-to-action does, and how data flows end to end. The clickable truth is reference/branch-desk-prototype.html (v11); the rules are doc 02; the tables are doc 04; the API is doc 05. Where this BRD and doc 02 differ, doc 02 wins.

1. Purpose and success measures

Problem. Case work at EHFL runs on offline artefacts — a DRM stuck-cases Excel, a reply-tracker sheet, morning/evening commitment mails, per-case WhatsApp threads. They cost hours daily, die with attrition, and hide cases.

Product. One role-based desk where every stuck loan is a card with a named owner, a clock and one best next action; where every function plans its morning on the system, the plans consolidate to HO at 10:30, and the evening result is compiled from LOS/LMS — never reported; and where every chase, reply and escalation is an event on the case, visible to everyone on it.

Success measures (tracked from the read models, targets in Settings): ≥90% of field users open the desk each working day; ≥80% of past-TAT cases touched same-day by week 2; ≥95% of in-flight cases carry a real (non-placeholder) disbursal date; ≥70% of chases answered within 1 working day; new-joiner time-to-first-productive-day ≤ 1 day; the four offline artefacts retired after two clean parallel days.

RM home — the standard contract (§3, §4.1)
RM home — the standard contract (§3, §4.1)
The shared case sheet (§4.2)
The shared case sheet (§4.2)
Credit FIFO plan (§4.4)
Credit FIFO plan (§4.4)
DRM full view (§4.2 drawer, tabs)
DRM full view (§4.2 drawer, tabs)
The 10:30 grid (§4.8)
The 10:30 grid (§4.8)
Leaderboard (§4.8, doc 14)
Leaderboard (§4.8, doc 14)

2. Personas and access (RBAC)

Login (SSO / LOS token) resolves a person → role + scope from org_person (+ org_los_user mapping, C3a rules; HRMS designation wins conflicts). A person sees only their scope. The prototype's header tabs simulate exactly these logins.

Role Level Scope of data Screens
RM L1 Own cases in own branch Simple list, case sheet, Plan, Close, Messages
DBM L2 Own spoke RM screens + approve spoke plans
DRM L3 Hub + spokes (cluster) Simple/Full desk, team, leads bulk, approve + confirm branch plan, consolidated branch plan
BCM (U1) Branch credit queue (+ state pickup) Credit queue, credit plan, replies
Regional credit (U2) State credit Same + accepts BCM plans
Branch/State Ops Branch / state ops queues Ops queue, ops plan, replies
Collection Manager Branch overdue book CM screen, plan, close
Legal (cluster/state), Technical (branch→zonal) State queue for their function Queue, plan, replies
Regional head → Sr RBM → ZBM → Business Head → HO L4–L7 Own span, read-only Standards, 10:30 grid, evening result, leaderboard; drill to any branch desk

Server-side scope checks on every endpoint (CLAUDE.md rule 4). Customer phone/email/address/PAN/Aadhaar never reach any client (rule 3); collections show masked account ids only.

3. The standard screen contract

Every role's screen = (a) identity header with live scope numbers, (b) the standard strip — Plan my day · Close my day · Messages — always in the same position, (c) the role's queue as cards (phone) or table (desktop), (d) the shared case sheet/drawer for actions. Simple mode rules (rule 6): ≥16px text, ≥56px labelled buttons, one red main action per card, no codes, date chips not date inputs, lasting Done ✓, EN/HI via i18n_string.

The day cycle (all times are Settings rows): plans filed by 09:30 → manager acceptance by 10:30 → freeze_morning_grid job at 10:30 writes the branch×function grid → workday of case actions → compile_day_plans 19:00 (provisional; final 23:55) writes said-vs-done from LOS/LMS → compile_scores → planning window flips to tomorrow at 19:00. Plans are immutable after submit except through the approver; the plan button renders filed-locked (green) until 19:00.

4. Screen-by-screen specification

Format per screen: Purpose · Data (field → source) · CTAs (control → effect → event) .

4.1 RM home (simple)

4.2 Case card + action sheet (shared by RM/DBM/DRM; owner roles get Reply/Call variant)

4.3 Plan my day — Business RM (one screen, five sections)

4.4 Plan my day — Credit BCM (one screen, four sections)

4.5 Plan my day — Operations / Legal / Technical / CM

4.6 Close my day (every role, forced)

4.7 Messages (every role)

4.8 Regional & above (read-only, own span)

5. Data flows (end to end)

LOS (read replica)  ─┐
LMS (read replica)  ─┼─ case builder job (15 min, staging-swap, LAN-dedupe) → desk_case (read model)
HRMS↔LOS users      ─┘                                    org_person / org_branch_scope / routing chains

user action (form) → POST /events (idempotent) → desk_event (append-only) ─┬→ recompute card face / thread / counters
                                                                           ├→ notification_outbox → WhatsApp API / email / in-app
                                                                           └→ Metabase (reads branch_desk directly)

Exotel: click-to-call POST → masked bridge; call-log webhook → call event with duration
Customer WhatsApp replies (S8) → desk_case.customer_says → cards + triggers

06:00 snapshot_open_items → desk_open_snapshot
09:30 plans (day_plan) → 10:30 freeze_morning_grid → HO grid (read-only L4–L7)
19:00 compile_day_plans (LOS/LMS only) → results on plans/grid → compile_scores → desk_score → leaderboard
19:00 planning window flips to next working day; 23:55 final compile catches late LOS entries (F3a)
escalation job (daily, working days): unanswered chase → +1 level, skip unnamed, cc manager → outbox

No AI and no workflow orchestrator anywhere above — plain scheduled SQL/TypeScript jobs (rule 0). All schedules and thresholds are desk_config rows.

6. Non-functional requirements

Privacy: rule 3 + masked telephony + masked account ids; access logs on owner/HO views. Performance: Today list < 2s on 3G-class connections at 09:25 load (C11 drill); read model refresh ≤15 min; chase delivery ≤1 min. Reliability: idempotent writes (client_event_id), append-only events, 10-s undo only; kill switch per module; parallel run week 1. Auditability: every number on a management screen reproducible from desk_event + desk_case as of its timestamp; config changes maker–checker with config_audit. Localisation: every string through i18n; Hindi at launch. Offline: retry queue for event posts; plans require connectivity (accepted).

7. Out of scope (go-live) and future

Out: credit decisioning screens, collections legal workflows, document upload (stays in LOS), bureau-alert screens, voice-note transcription. Future (additive, config-first): tranche/partial-disbursement module, customer-ticket feed into open items, more languages, TSM/ASM layers, contest views reading desk_score (e.g. Diwali se Pahle Diwali), Lovable/EASY-OS convergence.

8. Traceability

Rules → doc 02 (R1–R17) · tables → doc 04 · API → doc 05 · frontend patterns → doc 06 + reference/source · jobs & integrations → doc 07 · privacy → doc 08 · build order & prompts → doc 09 · acceptance → doc 10 + golive-checks.xlsx (C1–C12) · config → doc 11 · day plan → doc 12 (F1–F11) · risks → doc 13 · scoring → doc 14. Golden cases: docs/golden-cases.json must pass before any screen ships.