Modules / los-partner

los-partner PRODUCT

The multi-tenant back-office CRM used by each lending brand's own staff — sales, credit, sanctioning, disbursement ops, collections and HR — across the full loan lifecycle.

Ground truth as of 2026-09-30
Correction to the original documentation site los-partner is the internal staff back-office CRM — the app that the original Documentation site's Frontend and User Functions pages describe. Its name suggests an external partner portal, but "partner" here means each lending brand is a partner/tenant of the 8byte platform; the people using this app are that brand's own employees. The genuinely external-facing app is the sibling repo los-webv1 (the borrower/customer app). Read this page as "the operator side of the loan lifecycle," not as a DSA/channel-partner referral tool.

01 Actors & roles

The "partner" = a lending brand/NBFC onboarded onto the 8byte LOS platform (QuaLoan, jhatpatcash, FastSalary, CredNidhi, MinutesLoan, PaisaPop, Salary4Sure, SalaryBaba, ShubLakshmi, ZeptoFinance, FastRupees). Each brand gets its own subdomain/theme and its own staff directory. The app is multi-tenant: almost every authenticated route is scoped /:brandId/....

RoleScopeWhat they do
SUPER_ADMINCross-brand8byte's own platform operators — brand onboarding/config across all tenants, cross-brand /admin, can issue sign-in codes / manage settings for any brand.
ADMINOne brandA brand's own administrator — full access within their brand (settings, user management, all queues/dashboards), can generate sign-in codes for their brand's non-admin staff.
SALES / SALES_MANAGER / SALES_HEADOne brandLead intake & qualification, fresh-loan allocation.
CREDIT_EXECUTIVEOne brandRuns BRE/bureau checks, underwriting evaluation.
SANCTION_MANAGER / SANCTION_HEADOne brandApproves/sanctions the loan after credit evaluation.
LOAN_OPSOne brandDisbursement operations — pending disbursement, payment approval/rejection queues, no-due processing.
COLLECTION_EXECUTIVE / COLLECTION_MANAGER / COLLECTION_HEAD / NPA_EXECUTIVEOne brandRepayment collection across pre-/post-/NPA/legal-action stages, field visits.
HROne brandStaff/attendance management — the attendance punch-in gate exists in the API layer.
  • Users can hold multiple roles/permissions simultaneously (arrays), and discrete permissions (RELOCATE_LEAD, LEADS, PARTNER_USER_MANAGEMENT, BRAND_SETTINGS, MASTER_REPORTS, etc.) layer on top of / independently of the coarse role.
  • End borrowers ("customers") are not users of this app — they're managed as records (customers, customerDetails) by the brand's staff. The actual borrower/applicant app is the sibling repo los-webv1.
  • Referral partners — a lighter-weight referralLink feature (:brandId/referral-link) is the closest concept to an "external channel partner submitting leads," but it's a referral-link generation utility for a brand's own staff to share, not a separate external-partner login/portal.

02 Login & landing flow

Login picks an identifier + credential method, then HomeRedirect computes a role/permission-driven landing page.

Login → home redirect
flowchart TD START(["Staff opens brand subdomain"]) --> METHOD{"Pick credential method"} METHOD -- Password --> AUTH["Authenticate"] METHOD -- OTP --> AUTH METHOD -- TOTP --> AUTH METHOD -- "Sign-in code" --> AUTH AUTH --> FP["Device fingerprint + registration
(FingerprintJS, useDevice)"] FP --> HOME["HomeRedirect: role + permissions
+ brand dashboard version"] HOME -- SUPER_ADMIN --> ADMIN["/admin"] HOME -- "LEADS / RELOCATE_LEAD" --> LEADS["leads"] HOME -- "ALL / VIEW_DASHBOARD" --> DASH["dashboard (v1/v2/v3)"] HOME -- CUSTOMER_PENDING --> CUST["customers"] HOME -- "LOANS / CUSTOMER_REPEAT" --> REPEAT["repeat-loans"] HOME -- LOAN_OPS --> LOANSOPS["loans-ops/pending-disbursement"] HOME -- PARTNER_USER_MANAGEMENT --> USERS["partner-users"] HOME -- BRAND_SETTINGS --> SETTINGS["settings"] HOME -- COMPLETED_LOANS --> COMPLETED["completed"] HOME -- MASTER_REPORTS --> REPORTS["reports"] HOME -- "COLLECTIONS / PRE_ / POST_ / NPA_COLLECTION" --> COLLQ["matching collection queue"] HOME -- SANCTION_MANAGER --> SANCTION["sanction-manager"] HOME -- CREDIT --> CREDITQ["credit-executive"] HOME -- GLOBAL_SEARCH --> SEARCH["global-search"] HOME -- "no match" --> DASH

Every login variant sends a FingerprintJS deviceId for device tracking. The landing computation checks permissions in a fixed priority order (SUPER_ADMIN first, then LEADS/RELOCATE_LEAD, then ALL/VIEW_DASHBOARD, then a lookup table), falling back to the dashboard when nothing else matches.

03 Lead intake & qualification

Leads carry marketing attribution (UTM params, click IDs, Facebook click ID) and a source, and move through a status pipeline before becoming a customer/loan application.

Lead status pipeline
flowchart LR NEW["NEW"] --> OTPSENT["OTP_SENT"] OTPSENT --> OTPVER["OTP_VERIFIED"] OTPVER --> CONVERTED(["CONVERTED
creates customer/loan"]) NEW -.-> DUP(["DUPLICATE
terminal"]) NEW -.-> INVALID(["INVALID
terminal"]) OTPVER -.-> REJECTED["REJECTED
(revertible)"] OTPVER -.-> HOLD["HOLD
(revertible)"] REJECTED -. REVERT .-> OTPVER HOLD -. REVERT .-> OTPVER
  • Sales staff without ALL/manage permission see only leads allocated to them; managers (canManageLeads) additionally see a CSV Uploads tab (bulk lead import).
  • Managers can reassign (reallocate to another eligible executive via getEligibleLeadExecutives), hold, or reject a lead.
  • Each lead carries a comments thread (LeadCommentsModal) for handoff context.
  • Converting a lead creates a customer/loan application — convertedUserId links the two records.

04 Underwriting & sanctioning

Once a lead converts, credit staff pull bureau data and run the brand's enabled BRE engines, producing a human-overridable evaluation that feeds customer status buckets and, ultimately, final sanction.

Underwriting → sanction flow
flowchart TD CONV(["Lead CONVERTED
customer/loan created"]) --> BUREAU["Credit staff pull bureau data
Equifax · CRIF variants · Signzy/CIBIL consent"] BUREAU --> ENGINES["Run enabled BRE engines
Smart BRE · CRIF BRE · Neetix BRE (auto)
Marketing Analysis (manual)"] ENGINES --> EVAL["Evaluation checklist
each item ELIGIBLE / NOT_ELIGIBLE"] EVAL --> OVERRIDE{"Human override?
(comment required)"} OVERRIDE -- yes --> BUCKET OVERRIDE -- no --> BUCKET["Customer status bucket"] BUCKET --> PENDING["CUSTOMER_PENDING"] BUCKET --> BREREJ["CUSTOMER_BRE_REJECTED"] BUCKET --> HARDREJ["CUSTOMER_HARD_REJECTED"] BUCKET --> SOFTREJ["CUSTOMER_SOFT_REJECTED"] BUCKET --> ONHOLD["CUSTOMER_ON_HOLD"] BUCKET --> APPROVED["CUSTOMER_APPROVED"] BUCKET --> DORMANT["CUSTOMER_DORMANT"] BUCKET --> DELETED["CUSTOMER_DELETED"] APPROVED --> SANCTION["SANCTION_MANAGER / HEAD
final review in sanction-manager queue"] SANCTION -- approve --> DONE(["Loan proceeds to paperwork"]) SANCTION -- reject --> BREREJ

05 Loan progress, paperwork & disbursement

Loan status moves through LoanStatusEnum, with dedicated pre-disbursement queues for paperwork, then a batched, multi-leg disbursement process handled by LOAN_OPS.

Loan status progression
flowchart LR PENDING["PENDING"] --> BREOUT{"BRE outcome"} BREOUT -- approved --> BREAPP["BRE_APPROVED"] BREOUT -- rejected --> BREREJ(["BRE_REJECTED"]) BREAPP --> APPROVED["APPROVED"] APPROVED --> AWAIT["AWAITING_DISBURSEMENT
(esign / estamp / mandate queues)"] AWAIT --> DISBURSED["DISBURSED"] DISBURSED --> ACTIVE["ACTIVE"] ACTIVE --> PARTIAL["PARTIALLY_PAID / OVERDUE"] PARTIAL --> PAID(["PAID / COMPLETED"]) APPROVED -.-> ONHOLD["ON_HOLD"] APPROVED -.-> REJECTED(["REJECTED / CANCELLED"]) ACTIVE -.-> DEFAULTED["DEFAULTED"] DEFAULTED --> WRITEOFF(["WRITE_OFF"]) DEFAULTED --> SETTLED(["SETTLED"])

Pre-disbursement queues

  • esign-pending / awaitingLoanAgreement — loans waiting on borrower signature.
  • estamp-queue — e-stamping of signed agreements.
  • mandate-queue — NACH/UPI Autopay mandate setup wait.

Disbursement batch & legs

LOAN_OPS disbursement flow
sequenceDiagram participant Ops as LOAN_OPS staff participant Queue as pending-disbursement participant Batch as Disbursement batch participant Leg as Payment leg Ops->>Queue: work pending-disbursement queue Ops->>Batch: trigger disburseLoanRequest / disburseTransaction Batch->>Leg: create one or more legs (provider, bank account, transfer type) Leg->>Leg: PENDING -> INITIATED Leg-->>Batch: SUCCESS (with UTR) / FAILED / RETRYING / TIMEOUT / PARTIALLY_SETTLED Batch-->>Ops: disbursed-cases list on success Ops->>Ops: payment-approval / payment-rejected / payment-approved review queues

Exact stage names/gates are brand-configurable via brandWorkflowSteps/partnerWorkflow settings (partner_workflow_stages in brand.slice.ts), so this progression can differ slightly per brand.

06 Collections & servicing

Once ACTIVE, a loan surfaces in a per-loan repayment ledger (LoanLedgerTab — an EMI/instalment due panel, not a partner commission ledger). Overdue loans route into the Collection V2 suite.

  • Queues by stage — all / pre-collection / post-collection / NPA collection / legal-action collection.
  • Follow-up calendar — scheduling for collection call-backs and promise-to-pay follow-ups.
  • Field-visit workflows — sales-queue, credit-queue, field-visits, collection-field-visits — distinct queues per stage of work.
  • Reallocation permissions mirror the sales side — REALLOCATE_FRESH/REALLOCATE_REPEAT apply with desk = SALES|COLLECTION, so the same three-tier allocation model (receive / assign / reallocate) governs collection work as governs fresh leads.

07 Loan closure & repeat lending

  • Completed loans land in completed/all, with sub-buckets closed, settled (negotiated settlement), and writeoff (DEFAULTED → WRITE_OFF).
  • Repeat lending — repeat-loans / last-loan-completed surface customers eligible for a new loan cycle, with brand-configurable reloan settings (including a recent self-employed-borrower reloan settings addition).

08 Coin incentive wallet (private beta)

The closest analogue in this codebase to a "commission" system — but it is an internal staff incentive/gamification program, not an external-partner payout ledger. Staff (SALES/SALES_MANAGER/CREDIT_EXECUTIVE/SANCTION_MANAGER/COLLECTION_EXECUTIVE/COLLECTION_MANAGER roles) earn coins for actions like closing loans or collections, into a wallet with locked/available/reserved/debt/net balances and lifetime stats.

Coin grant & redemption approval chain
flowchart TD ACTION["Staff action
(close loan, collection, etc.)"] --> GRANT["Grant: AWAITING_CONFIRMATION"] GRANT --> REVIEW{"UNDER_REVIEW / PENDING"} REVIEW -- confirmed --> CREDITED(["CREDITED / APPLIED"]) REVIEW -- rejected --> VOIDED(["REVERSED / VOIDED"]) CREDITED --> WALLET["Wallet balance"] WALLET --> REDEEM["Redemption requested
(CASH_PAYROLL / VOUCHER / MERCHANDISE / EXPERIENCE)"] REDEEM --> PM["PENDING_MANAGER"] PM --> PF["PENDING_FINANCE"] PF --> APP["APPROVED"] APP --> PAYOUT["IN_PAYOUT"] PAYOUT --> FULFILLED(["FULFILLED"]) PM -.-> RJ1(["REJECTED"]) PF -.-> RJ2(["REJECTED"]) REDEEM -.-> CANCELLED(["CANCELLED"]) PAYOUT -.-> FAILED(["FAILED"])

Pages: the wallet itself, a leaderboard, a manager/finance approvals queue, and brand-level coin-admin configuration (rate, min redemption, monthly cap, auto-approve threshold, tier system). All gated by CoinBetaRoute.

Non-standard access check Unlike every other gated route, CoinBetaRoute doesn't check a static permission enum — it calls a useCoinBetaAccess() hook, and access is decided per-request by the backend (self-service / manager-of-requester / COIN_FINANCE / COIN_ADMIN, brand-scoped). See Tech page for the route table.

09 Other notable flows & features

  • Global search (:brandId/global-search) — recently extended to surface loan tasks, KYC, legal and stage details in one search, beyond its original scope.
  • Async report catalog — a large, permission-gated report catalog (msiReport/report.api.ts) spanning loan/disbursement, collection, credit/sales/leads, marketing, finance/GST, CIC/BRE/audit, and admin/user categories. Reports run asynchronously: trigger → poll status → download. New report types (like the recently-added UCIC report) plug in by simply adding a catalog entry — no new lifecycle plumbing needed.
  • Telephony / dialer — the telephony feature plus the @sphoro/voice-web SDK and per-user dialer/callex config (dialerConfigModal, callexConfigModal) enables click-to-dial from leads/customers list rows directly to a phone number, backed by Acefone (explains the nginx CORS/CSP carve-outs for console.acefone.in).
  • Attendance / punch-in gate — a brand can require staff to "punch in" before using the app; a 403 PUNCH_IN_REQUIRED from any API call triggers a global punch-in gate that blocks the UI until resolved.
  • PII masking-by-default — phone/email/PAN are masked by default in list views (maskPan/maskEmail/maskPhone), with a per-row toggle (PiiToggleButton/usePiiVisibility) rather than always shown — a deliberate privacy-by-default UX pattern.
  • Permission administration — brand ADMIN/SUPER_ADMIN manage staff via partner-users (create/edit, assign roles+permissions, configure dialer/callex per user, set unavailability dates for the allocation engine, generate/revoke sign-in codes) and brand-wide policy via :brandId/settings (workflow steps, NBFC entities, bank accounts, block lists, evaluation checklist items, reminder/tracking config — ~20 settings sub-areas).

10 UX quirks worth documenting

Eight parallel login page variants loginV1…loginV8 are eight simultaneous visual implementations of the same five login flows, selected per brand/config — likely incremental design rollouts left live together rather than consolidated into one canonical screen.
Role/permission enum drift PartnerUserRoleEnum contains values (BRAND_SETTINGS, CUSTOMER, VIEW_DASHBOARD, REPORT, PARTNER_USER_MANAGEMENT, LOANS) that duplicate names in PartnerUserPermissionEnum — don't assume the two concepts are cleanly separated.
Coin wallet's non-standard access pattern CoinBetaRoute uses a useCoinBetaAccess() hook instead of the normal permission-enum check every other route uses — a private-beta carve-out worth knowing before copying its pattern elsewhere.
Route/directory typos — harmless but grep-relevant pages/gloabalSearch (typo, kept as the directory name) still serves the correct /global-search URL; agreament.api.ts (typo for "agreement"). Not a criticism — just useful to know when grepping the codebase for these areas.