Skip to content

Part 10 — System Blueprint

State Machines

State machines are contractual. A state is not a screen label; it defines who can act, what events are legal, which timestamps are regulatory evidence, and which downstream modules receive updates. Every transition must be generated by a named event, actor, guard and audit record. Direct database edits to state columns are prohibited.

Application state machine from lead to booking, rejection, withdrawal or expiry

The application machine is owned by LOS workflow until loan_booked. The KYC, document, BRE, credit, documentation and disbursement services publish events; LOS decides whether the event is legal in the current state.

StateMeaningOwner queueEntry actionExit allowed to
lead_createdLead exists with source and consent attemptSales/CRMCreate application shell if login is requestedprescreen_pending, withdrawn, expired
prescreen_pendingDedupe, product, geography, negative-list and consent checks runningSales ops/BRELock source and run pre-screen rulesprescreen_passed, rejected, returned_for_rework, expired
prescreen_passedBasic eligibility passed or referred and acceptedSales opsCreate full application checklistkyc_pending, docs_pending, withdrawn
kyc_pendingRequired parties are not fully KYC-verifiedKYC ops/AMLCreate CDD, BO and screening tasksdocs_pending, on_hold, rejected, returned_for_rework
docs_pendingApplication documents are incomplete or unverifiedSales ops/loan opsGenerate document requirementsdata_pending, returned_for_rework, withdrawn
data_pendingBureau, banking, GST, ITR, financials or alternate data pack is incompleteCredit ops/integrationsRequest data using active consentcredit_in_review, on_hold, returned_for_rework
credit_in_reviewAnalyst/CAM/PD/RCU/legal/valuation review is activeCreditFreeze underwriting data versiondeviation_pending, approved, sanctioned, rejected, returned_for_rework, on_hold
deviation_pendingOne or more deviations require approvalCredit/authorityResolve required DoA levelcredit_in_review, approved, rejected
approvedCredit approval exists but sanction letter/KFS is not acceptedCredit opsGenerate sanction and KFSsanctioned, expired, rejected
sanctionedSanction letter and KFS are issuedSales/borrowerNotify borrower; start validity clocksanction_accepted, expired, withdrawn, returned_for_rework
sanction_acceptedBorrower accepted terms and KFSLoan opsGenerate documentation and CP checklistdocumentation_pending, expired
documentation_pendingLoan/security documents, stamping, signatures, CPs or charge tasks are incompleteLoan ops/legalCreate execution packagedisbursement_pending, returned_for_rework, on_hold
disbursement_pendingCPs, mandate, bank account and payment instruction are awaiting checker approvalDisbursement ops/treasuryCreate disbursement requestloan_booked, on_hold, returned_for_rework
loan_bookedLMS account exists and booking event is acceptedLMSClose LOS workflow and publish account detailsNone
returned_for_reworkFile is sent back to previous team with reasonPrior ownerCreate rework taskAny non-terminal state allowed by rework target
on_holdExternal dependency, compliance hit, fraud review or court/legal issue blocks processingHolding ownerSuspend SLA clock with reasonPrior active state, rejected, withdrawn
rejectedLender declined applicationCredit/sales opsSend adverse/reject communication as policy requiresNone
withdrawnBorrower or source withdrew before bookingSales opsClose active tasks and preserve evidenceNone
expiredLead, data, sanction or documentation validity lapsedSystem ownerClose or route to refreshreturned_for_rework only when policy permits refresh
FromEventToGuardActor/systemSide effects
lead_createdlead_submitted_for_prescreenprescreen_pendingActive consent for contact and product identifiers presentSales/partner APICreate application id and source lock.
lead_createdlead_withdrawnwithdrawnNo active application tasksBorrower/salesClose lead with reason.
lead_createdlead_ttl_elapsedexpiredNo contact or login within channel TTLSystemSuppress stale follow-up.
prescreen_pendingpre_screen_passedprescreen_passedDedupe not hard-negative; policy gates pass or refer acceptedBREStore rule tree and eligibility snapshot.
prescreen_pendinghard_reject_triggeredrejectedRule failure is non-waivable or negative-list hit confirmedBRE/credit policyStore reject reason and block duplicate retry window.
prescreen_pendingdata_or_identifier_deficientreturned_for_reworkRequired identifier missing or inconsistentSales opsCreate rework task.
prescreen_passedkyc_required_parties_createdkyc_pendingApplication parties include borrower and required obligorsLOSCreate KYC tasks.
prescreen_passeddocs_collection_starteddocs_pendingKYC already verified for repeat borrower and no BO gapLOSGenerate checklist.
kyc_pendingkyc_verifieddocs_pendingAll required KYC profiles verified; BO and screening hits closedKYC servicePublish kyc_verified.
kyc_pendingsanctions_or_aml_holdon_holdOpen true-positive or unresolved AML/sanctions hitAML/complianceSuspend workflow and notify compliance.
kyc_pendingkyc_rejectedrejectedKYC defect cannot be cured or prohibited party foundKYC checkerClose application with KYC reason.
docs_pendingdocument_pack_lockeddata_pendingMandatory documents verified or approved waivers recordedDocument serviceFreeze document version.
docs_pendingdeficiency_raisedreturned_for_reworkOne or more mandatory document deficiencies remainOperationsAssign deficiency to sales/customer.
data_pendingdata_pack_finalizedcredit_in_reviewBureau, banking/GST/financial data requirements met or waivers approvedCredit opsFreeze underwriting data version.
data_pendingprovider_retry_exhaustedon_holdExternal API failure prevents required dataIntegration gatewayOpen dependency ticket.
credit_in_reviewdeviation_raiseddeviation_pendingBRE/CAM found waivable rule breachCredit analystResolve required authority.
credit_in_reviewcredit_approved_without_deviationapprovedCAM submitted; no open deviations; authority has approvedCredit authorityCreate approval event.
credit_in_reviewsanction_direct_generatedsanctionedProgram permits straight-through sanction and KFS generationCredit/BRECreate sanction and KFS.
credit_in_reviewcredit_rejectedrejectedAuthority rejects or non-waivable credit failCredit authorityStore reject code.
deviation_pendingall_deviations_approvedapprovedEach deviation approved at required DoA levelApproval serviceLock deviation approvals.
deviation_pendingdeviation_rejectedcredit_in_reviewRework permittedApproval authorityReturn CAM with comments.
deviation_pendingdeviation_rejected_finalrejectedAuthority rejects and no lower structure acceptedApproval authorityStore final rejection.
approvedsanction_letter_generatedsanctionedKFS/APR computed where required; sanction validity setLOS/KFS serviceSend sanction pack.
sanctionedborrower_acceptance_recordedsanction_acceptedValid sanction; acceptance by authorised signatory/borrower; KFS accepted where requiredBorrower/opsStart documentation workflow.
sanctionedsanction_expiredexpiredvalid_until elapsed without acceptanceSystemClose sanction; allow refresh only by policy.
sanctionedborrower_negotiation_reworkreturned_for_reworkRequested change is materialSales/creditRoute to credit for revised sanction.
sanction_accepteddocumentation_starteddocumentation_pendingAccepted sanction has active checklistOperationsGenerate execution pack.
documentation_pendingdocuments_executed_and_cps_cleareddisbursement_pendingDocuments executed; CPs cleared or approved exceptions; mandate policy metOps checkerCreate disbursement request.
documentation_pendingdocument_exception_holdon_holdLegal/security/stamping issue blocks executionLegal/opsCreate exception task.
disbursement_pendingloan_bookedloan_bookedPayment posted or limit opened; LMS account created; GL event acceptedLMS/disbursement servicePublish account number, schedule and first due date.
disbursement_pendingbooking_failedreturned_for_reworkLMS/payment failure is correctableLMS/opsCancel payment instruction if needed.
Any non-terminalborrower_withdrawnwithdrawnNo disbursement posted; withdrawal reason capturedBorrower/sales opsClose tasks, preserve evidence.
Any non-terminalfraud_confirmedrejectedRCU/FCU true-positive approved by authorityRCU/complianceBlock party/source as applicable.

The LMS owns this machine. LOS cannot change account state after booking.

StateMeaningEntry triggerExit trigger
pending_bookingBooking request accepted but account not fully createdloan_booking_requestedloan_booked or booking_failed
active_undisbursedAccount or facility opened with zero disbursementloan_booked_without_disbursementfirst_disbursement_posted, cancel_account
partially_disbursedOne or more tranches disbursed below sanctioned amounttranche_postedfinal_tranche_posted, cancel_undisbursed_balance, recall
active_currentLive account with no overdue and no freezeloan_booked or cure_completeddemand_overdue, freeze_account, foreclosure_posted, maturity_paid
active_overdueLive account with overdue amount but not NPAdemand_overduecure_completed, npa_classified, restructure_approved, recall
frozenDrawdown or servicing action is blockedfreeze_accountunfreeze_account, recall, close_account
restructuredTerms changed due to approved restructuringrestructure_implementedperformance_cured, default_after_restructure, close_account
recalledFacility accelerated/terminated by lenderrecall_notice_issuedsettlement_implemented, legal_recovery_opened, close_account
preclosedForeclosure amount paid before contractual maturityforeclosure_postedno_dues_generated, closure_reversed
matured_pending_closureMaturity reached and dues cleared but closure tasks remainmaturity_paidno_dues_generated
closedNo contractual dues; NOC and accounting closure doneno_dues_generatedNone
written_offAccounting write-off posted; recovery may continuewriteoff_postedrecovery_after_writeoff_posted
cancelledAccount cancelled before disbursement or booking reversed per policycancel_accountNone
FromEventToGuardActor/systemSide effects
pending_bookingloan_booked_without_disbursementactive_undisbursedFacility type permits limit opening before drawdownLMSCreate account number and zero principal outstanding.
pending_bookingloan_booked_with_first_disbursementactive_currentDisbursement posted and first schedule activeLMSPublish first due date.
active_undisbursedfirst_disbursement_postedpartially_disbursedPosted amount below sanctioned amountLMSGenerate schedule or drawdown ledger.
active_undisbursedfirst_disbursement_posted_fullactive_currentPosted amount equals sanctioned amount or single-tranche bookingLMSGenerate active schedule.
partially_disbursedfinal_tranche_postedactive_currentTotal disbursed equals approved amount or undisbursed cancelledDisbursement serviceUpdate principal and schedule.
active_currentdemand_overdueactive_overdueDay-end due remains unpaid after due dateLMS batchRecompute DPD and open delinquency snapshot.
active_overduecure_completedactive_currentOldest unpaid dues cleared under appropriation ruleLMSPublish DPD decrease.
active_overduenpa_classifiedactive_overdueMore than 90 DPD or CC/OD out-of-order trigger metLMSUpdate asset classification; collections bucket may change.
active_currentfreeze_accountfrozenCourt stay, fraud hold, AML hold, deceased borrower, security issue or compliance holdAuthorized ops/complianceBlock disbursement/drawdown/service actions.
active_overduefreeze_accountfrozenSame as aboveAuthorized ops/compliancePreserve overdue and DPD computation.
frozenunfreeze_accountactive_currentNo overdue and hold clearedAuthorized checkerResume servicing.
frozenunfreeze_account_overdueactive_overdueHold cleared but arrears remainAuthorized checkerResume collections.
active_currentrestructure_implementedrestructuredApproved restructure workflow and documents executedLMS/creditCreate new schedule version and IRAC flags.
active_overduerestructure_implementedrestructuredApproved restructure; asset classification impact recordedLMS/creditPreserve old schedule and classification history.
restructuredperformance_curedactive_currentSatisfactory performance and regulatory cure rule metLMS/riskUpdate monitoring status.
restructureddefault_after_restructureactive_overdueRevised due unpaidLMSOpen delinquency case.
active_currentforeclosure_postedpreclosedForeclosure quote paid and realizedLMS/opsStop future demands, create closure tasks.
active_overduesettlement_implementedpreclosedOTS amount realized and waiver approvedCollections/LMSPost waiver/write-off split.
preclosedno_dues_generatedclosedAll charges, reversals, security release conditions and GL events completeOps checkerGenerate NOC and charge release workflow.
matured_pending_closureno_dues_generatedclosedSame closure checksOps checkerClose account.
active_overduewriteoff_postedwritten_offWrite-off approved under DoA and accounting postedFinance/collectionsRecovery case may remain open.
Any open stateaccount_cancelled_before_disbursementcancelledNo posted disbursement or reversal approvedOps checkerCancel schedule and booking references.

The delinquency machine is computed by LMS at borrower and facility levels. Collections consumes it. RBI requires objective day-end SMA/NPA classification and NPA upgradation only after arrears are cleared; manual bucket edits are forbidden.

StateTriggerRegulatory/operational meaning
currentNo overdue amount and no CC/OD out-of-order conditionNormal servicing
x_bucketDue within configured pre-due window or mandate risk detectedPre-due reminder only
dpd_1_30Oldest unpaid due is 1-30 DPDEarly delinquency; SMA-0 mapping where applicable
dpd_31_60Oldest unpaid due is 31-60 DPDSMA-1 for term-loan overdue
dpd_61_90Oldest unpaid due is 61-90 DPDSMA-2 for term-loan overdue
npa_90_plusMore than 90 DPD or CC/OD out-of-order NPA conditionNPA recognition and income reversal/provisioning workflow
restructured_watchRestructure implemented and performance monitoring activeWatch for satisfactory performance or relapse
written_off_recoveryWrite-off posted while recovery continuesAccounting state differs from recovery state
closedLoan closed or cancelledNo delinquency action
FromEventToGuardActor/systemSide effects
currentpre_due_window_openedx_bucketDue date within configured T-minus days; account activeLMS batchCreate reminder segment.
x_bucketdue_paid_before_due_datecurrentFull current demand paid before due dateLMSClose pre-due reminder.
x_bucketday_end_due_unpaiddpd_1_30Due amount unpaid after day-end for due dateLMS batchOpen collections case if threshold met.
currentday_end_due_unpaiddpd_1_30Due amount unpaid after day-endLMS batchCompute oldest unpaid due date.
dpd_1_30arrears_clearedcurrentOldest arrear cleared by realized receipt/approved waiverLMSClose or cure case.
dpd_1_30dpd_crossed_30dpd_31_60Oldest unpaid due is greater than 30 DPDLMS batchPublish SMA-1 where applicable.
dpd_31_60arrears_clearedcurrentAll overdue dues clearedLMSPublish cure.
dpd_31_60partial_payment_posteddpd_31_60Oldest unpaid due remains in same bandLMSUpdate cure amount, not state.
dpd_31_60dpd_crossed_60dpd_61_90Oldest unpaid due is greater than 60 DPDLMS batchPublish SMA-2 and legal readiness task.
dpd_61_90arrears_clearedcurrentAll overdue dues clearedLMSPublish cure.
dpd_61_90dpd_crossed_90npa_90_plusMore than 90 DPDLMS batchTrigger NPA accounting and income reversal.
currentcc_od_out_of_order_90npa_90_plusCC/OD continuously excess over limit/DP or insufficient credits for 90 daysLMS batchTrigger NPA accounting.
npa_90_plusall_arrears_clearedcurrentEntire arrears of principal and interest across linked facilities clearedLMSUpgrade to standard per RBI IRACP clarification.
npa_90_plusrestructure_implementedrestructured_watchApproved restructure and asset-class impact postedLMS/riskStart watch/performance counters.
restructured_watchsatisfactory_performance_metcurrentPolicy/regulatory performance criteria metRisk/LMSRemove restructured watch flag if permitted.
restructured_watchrestructured_due_unpaiddpd_1_30Revised schedule due unpaidLMSReopen delinquency.
Any non-closedwriteoff_postedwritten_off_recoveryWrite-off approved and accounting postedFinance/LMSContinue recovery case.
Any non-closedloan_closedclosedLoan closed, cancelled or settled with closure postedLMSStop delinquency computation.

Collections cases are operational. They cannot cure DPD directly; they request payments, waivers, settlements, restructures or legal actions that LMS and approval services validate.

StateMeaningOwner
not_openNo active collections caseLMS/collections integration
open_unallocatedCase created but no agent/team assignedCollections supervisor
allocated_teleTelecalling queue owns next actionTele collections
allocated_fieldField visit or agency action requiredField collections/agency
ptp_activeValid Promise to Pay existsAssigned collector
ptp_brokenPTP date passed without agreed paymentCollections supervisor
escalated_hard_bucketSenior collections handling 31-90 DPD or high-risk early caseHard bucket team
legal_reviewLegal route selection in progressLegal/recovery
settlement_reviewOTS or waiver proposal under approvalCollections/credit/finance
restructure_reviewViability-based restructure under reviewCredit/risk
repossession_or_enforcementCollateral enforcement, repossession, SARFAESI, arbitration or DRT workflow activeLegal/recovery
closed_curedCase closed because arrears curedCollections system
closed_settledCase closed by OTS/settlement implementationCollections/LMS
closed_written_offCase closed operationally after write-off or transferCollections/finance
closed_uncollectableRecovery stopped per approved policy reasonRecovery head
FromEventToGuardActor/systemSide effects
not_opendelinquency_snapshot_receivedopen_unallocatedDPD or pre-due risk meets case thresholdCollections systemCreate case with loan, borrower and cure amount.
open_unallocatedauto_allocate_teleallocated_teleBucket and exposure fit tele strategyStrategy engineAssign campaign and call rules.
open_unallocatedauto_allocate_fieldallocated_fieldExposure, bucket, risk or skip signal requires visitStrategy engineAssign field agent/agency.
allocated_teleptp_recordedptp_activePTP has amount, date, payer, mode and collector idCollectorPause excessive calling until PTP date unless high-risk.
allocated_fieldptp_recordedptp_activeSame valid PTP guardField agentCapture visit evidence.
ptp_activepayment_received_matching_ptpclosed_curedLMS confirms arrears clearedLMS/collectionsClose case and store cure event.
ptp_activepartial_payment_receivedallocated_telePTP partly kept but arrears remain and bucket is earlyLMS/collectorUpdate cure amount.
ptp_activeptp_due_missedptp_brokenPTP date/time passed and LMS did not post expected paymentCollections systemIncrease broken PTP count.
ptp_brokenreallocate_teleallocated_teleBroken count below field thresholdSupervisorResume calls.
ptp_brokenescalate_fieldallocated_fieldBroken count or exposure requires fieldSupervisorCreate field task.
allocated_teledpd_crossed_30_or_high_riskescalated_hard_bucketBucket/risk threshold metStrategy engineAssign senior collector.
allocated_fieldnegative_visit_or_skipescalated_hard_bucketBusiness closed, borrower skip, refusal or collateral concernField supervisorTrigger legal/RCU review if required.
escalated_hard_bucketlegal_route_requestedlegal_review60+ DPD, fraud, skip, secured exposure, cheque bounce or recovery strategyCollections managerLegal case draft opened.
escalated_hard_bucketsettlement_offer_receivedsettlement_reviewBorrower offer includes amount, dates and source of fundsCollectorGenerate OTS note.
escalated_hard_bucketrestructure_request_receivedrestructure_reviewBorrower financial difficulty and viability evidence presentCredit/collectionsOpen restructure workflow.
legal_reviewenforcement_approvedrepossession_or_enforcementLegal authority approves route and noticesLegal/recoveryIssue notices and update case.
legal_reviewlegal_hold_or_defectescalated_hard_bucketLegal defect requires more collection or documentationLegalCreate rework task.
settlement_reviewots_approvedsettlement_reviewDoA approves waiver and settlement termsApproval authorityIssue OTS letter; remain until funds realized.
settlement_reviewots_funds_realizedclosed_settledLMS posts settlement receipt and waiver/write-offLMS/financeClose case and start security release if applicable.
settlement_reviewots_rejectedescalated_hard_bucketAuthority rejects or borrower fails token conditionApproval authorityResume normal recovery.
restructure_reviewrestructure_implementedclosed_curedLMS posts new schedule and collections case closed by policyCredit/LMSOpen monitoring case if needed.
repossession_or_enforcementrecovery_completedclosed_curedSale/payment clears arrears or accountLegal/LMSClose enforcement tasks.
Any open statearrears_clearedclosed_curedLMS confirms cureLMSClose case and stop agency allocation.
Any open statewriteoff_postedclosed_written_offWrite-off posted and active recovery ended or transferredFinance/recoveryPreserve recovery-after-write-off ledger.
Any open stateapproved_uncollectable_closureclosed_uncollectableRecovery head approval and reason codeRecovery headStop activity with audit reason.