18.1 LOS overview and state machine
LOS scope
Section titled “LOS scope”The Loan Origination System covers the end-to-end journey from lead to disbursed loan. After disbursement, the loan moves to the LMS (18.3).
LOS responsibilities:
- Lead acquisition and channel attribution.
- Application capture with all data.
- KYC / KYB completion.
- Data ingestion (bureau, GST, BSA, AA, MCA, Tally).
- Underwriting decisioning — rule + scorecard engine.
- Manual review workflow for refer cases.
- Deviation approval workflow.
- Sanction issuance.
- Document generation (KFS, agreement, DPN, PG).
- eSign + eStamp orchestration.
- NACH / eNACH mandate activation.
- Pre-disbursement checklist enforcement.
- Disbursement execution.
- Handoff to LMS.
States
Section titled “States”The application’s primary states:
LEAD — captured but not convertedDRAFT — application started, not submittedSUBMITTED — borrower submittedKYC_IN_PROGRESS — KYC workflows runningINGESTION_IN_PROGRESS — data ingestion runningUNDER_REVIEW — decisioning + manual reviewAPPROVED — decision approvedDEVIATION_PENDING — awaiting deviation approvalDECLINED — decision declinedREFERRED_TO_COMMITTEE — escalated to credit committeeWITHDRAWN — borrower withdrewEXPIRED — sanction validity lapsed without disbursementOFFER_ACCEPTED — borrower accepted offerDOCS_GENERATED — documents createdESIGN_IN_PROGRESS — multi-signer eSign runningDOCS_EXECUTED — all docs signed and stampedMANDATE_ACTIVE — NACH / eNACH activeDISBURSED — funds released, UTR capturedHANDED_OFF_TO_LMS — terminal LOS stateState machine diagram
Section titled “State machine diagram”LEAD ──qualify──→ DRAFTDRAFT ──save──→ DRAFT (loop)DRAFT ──submit──→ SUBMITTED
SUBMITTED ──auto──→ KYC_IN_PROGRESSKYC_IN_PROGRESS ──auto──→ INGESTION_IN_PROGRESS (parallel with KYC)KYC_IN_PROGRESS + INGESTION_IN_PROGRESS ──all-complete──→ UNDER_REVIEW
UNDER_REVIEW ──engine APPROVE──→ APPROVEDUNDER_REVIEW ──engine DECLINE──→ DECLINEDUNDER_REVIEW ──engine REFER + analyst recommend approve──→ APPROVEDUNDER_REVIEW ──engine REFER + analyst decline──→ DECLINEDUNDER_REVIEW ──engine REFER + analyst recommend deviation──→ DEVIATION_PENDING
DEVIATION_PENDING ──approved──→ APPROVEDDEVIATION_PENDING ──declined──→ DECLINEDDEVIATION_PENDING ──escalated──→ REFERRED_TO_COMMITTEE
REFERRED_TO_COMMITTEE ──approved──→ APPROVEDREFERRED_TO_COMMITTEE ──declined──→ DECLINED
APPROVED ──borrower accept──→ OFFER_ACCEPTEDAPPROVED ──validity lapse──→ EXPIRED
OFFER_ACCEPTED ──auto──→ DOCS_GENERATEDDOCS_GENERATED ──borrower sign──→ ESIGN_IN_PROGRESSESIGN_IN_PROGRESS ──all signers complete──→ DOCS_EXECUTEDDOCS_EXECUTED ──auto──→ MANDATE_ACTIVE (requires NACH ack)
MANDATE_ACTIVE ──pre-disb checklist + execute──→ DISBURSEDDISBURSED ──auto──→ HANDED_OFF_TO_LMS
[any state] ──borrower withdraw──→ WITHDRAWNTriggering events (the verbs that move state)
Section titled “Triggering events (the verbs that move state)”| Event | From → To | Source |
|---|---|---|
lead.qualified | LEAD → DRAFT (implicit on app creation) | Sales / pre-app |
application.section_saved | DRAFT loop | Borrower |
application.submitted | DRAFT → SUBMITTED | Borrower |
kyc.individual.completed (per promoter) | KYC_IN_PROGRESS condition | KYC module |
kyb.entity.completed | KYC_IN_PROGRESS condition | KYC module |
data.bank_statement.parsed | INGESTION condition | Ingestion |
data.gst.pulled | INGESTION condition | Ingestion |
data.bureau.pulled | INGESTION condition | Ingestion |
decision.run.completed | UNDER_REVIEW state update | Decision engine |
decision.approved | UNDER_REVIEW → APPROVED | Engine / manual |
decision.declined | UNDER_REVIEW → DECLINED | Engine / manual |
decision.referred | UNDER_REVIEW remains | Engine |
deviation.approved | DEVIATION_PENDING → APPROVED | Approver |
deviation.declined | DEVIATION_PENDING → DECLINED | Approver |
offer.accepted | APPROVED → OFFER_ACCEPTED | Borrower |
sanction.issued | (concurrent with OFFER_ACCEPTED) | LOS |
document.generated | OFFER_ACCEPTED → DOCS_GENERATED | Documentation |
kfs.acknowledged | (pre-condition for eSign on agreement) | Borrower |
esign.completed (per signer) | ESIGN_IN_PROGRESS state update | eSign vendor |
esign.all_completed | ESIGN_IN_PROGRESS → DOCS_EXECUTED | LOS |
mandate.active | (concurrent with DOCS_EXECUTED) | NACH adapter |
disbursement.executed + utr.captured | MANDATE_ACTIVE → DISBURSED | Disbursement |
loan.activated | DISBURSED → HANDED_OFF_TO_LMS | LMS |
application.withdrawn | * → WITHDRAWN | Borrower |
sanction.expired | APPROVED / OFFER_ACCEPTED → EXPIRED | Auto-scheduler |
Side effects per transition (selected)
Section titled “Side effects per transition (selected)”SUBMITTED
Section titled “SUBMITTED”- KYC orchestration kicked off.
- Ingestion orchestration kicked off.
- Sales channel attribution finalised.
- Lead converted (lead.status = converted).
KYC_IN_PROGRESS → UNDER_REVIEW
Section titled “KYC_IN_PROGRESS → UNDER_REVIEW”- All promoter KYC complete.
- KYB entity verification complete.
- Sanctions screening complete.
- BO graph complete.
- Decision engine invoked.
APPROVED
Section titled “APPROVED”sanctionrow created (LMS-readable).- Offer expiry timer set (typically
15 – 30 days). - Borrower notified (SMS + WhatsApp + email).
- KFS preview generated (not yet acknowledged).
OFFER_ACCEPTED
Section titled “OFFER_ACCEPTED”- Documentation orchestration kicked off.
- KFS finalised.
- Agreement, DPN, PG templates rendered.
DOCS_EXECUTED
Section titled “DOCS_EXECUTED”- All documents in DMS.
- Evidence package partially assembled.
- Mandate activation awaited.
MANDATE_ACTIVE
Section titled “MANDATE_ACTIVE”- NACH activation confirmed by sponsor bank.
- Pre-disbursement checklist becomes accessible to ops.
DISBURSED
Section titled “DISBURSED”loan_accountrow created (in LMS).- LMS schedule generated.
- LMS daily accrual begins.
- Borrower notified with UTR.
- Channel partner notified.
- Co-lending partner notified (if applicable).
- Insurance triggered (if bundled).
Concurrency
Section titled “Concurrency”Multiple transitions can be in progress simultaneously:
- KYC for
Director 1andDirector 2run in parallel. - KYC and Ingestion run in parallel.
- eSign signers can act in parallel (per agreement design).
- Document generation and mandate activation can run in parallel.
The LOS state machine uses a workflow engine (5.5) to manage these parallel paths and the rendezvous (e.g., “all KYC complete and all ingestion complete = move to UNDER_REVIEW”).
Failure handling
Section titled “Failure handling”KYC failure
Section titled “KYC failure”- One promoter’s KYC fails → workflow waits for re-attempt.
- Multiple failures → REFER to manual.
- Permanent failure → DECLINE.
Ingestion failure
Section titled “Ingestion failure”- AA fetch fails → fallback to PDF upload.
- GST OTP fails → reschedule.
- Bureau no-hit → REFER if borrower has no bureau record at all.
Decision engine timeout
Section titled “Decision engine timeout”- Engine returns error or timeout → REFER.
Deviation expiry
Section titled “Deviation expiry”- Deviation pending for too long → escalate or auto-decline.
eSign failure
Section titled “eSign failure”- Single signer fail → switch vendor or paper.
- Repeated failures → manual handling.
Mandate failure
Section titled “Mandate failure”- NACH rejection by sponsor bank → re-register with corrected details.
Disbursement failure
Section titled “Disbursement failure”- Payout rail rejection → re-attempt or escalate.
- Returned funds → reverse and re-attempt.
SLA expectations
Section titled “SLA expectations”| Transition | Target time |
|---|---|
| SUBMITTED → APPROVED (auto path) | < 6 hours typical for standard A-grade |
| SUBMITTED → APPROVED (manual review) | < 5 days p95 |
| APPROVED → OFFER_ACCEPTED | Borrower-dependent (typically 1 – 7 days) |
| OFFER_ACCEPTED → DOCS_GENERATED | < 30 minutes |
| DOCS_GENERATED → DOCS_EXECUTED | Borrower-dependent (typically 4 – 24 hours for eSign multi-signer) |
| DOCS_EXECUTED → MANDATE_ACTIVE | < 6 hours (depends on sponsor bank NACH cycle) |
| MANDATE_ACTIVE → DISBURSED | < 1 hour after checklist clearance |
| DISBURSED → HANDED_OFF_TO_LMS | < 5 minutes (automated) |
Audit per transition
Section titled “Audit per transition”Every state transition emits an audit.event:
- Actor (user / service).
- From state, to state.
- Reason / event reference.
- Timestamp.
- IP, device (where user-driven).
Audit chain (5.13) makes tampering detectable.
Idempotency at state transitions
Section titled “Idempotency at state transitions”Every state-changing API call is idempotency-keyed:
- Re-submission of
application.submitafter first success returns the same state, no double-processing. offer.acceptsimilarly.disbursement.executecritically — duplicate calls do not double-disburse.
What the platform must enforce
Section titled “What the platform must enforce”- No skip states — transitions follow the diagram; jumping is not permitted.
- No state without event — every state change is event-driven and audited.
- All pre-conditions (e.g., KYC complete + ingestion complete + decision approved) must be satisfied before downstream state.
- Concurrent paths properly synchronised via workflow engine.
- Failure paths explicit; no silent state hangs.