Part 10 — System Blueprint
Workflow Specs
Workflow is the executable layer over the state machines. Every queue item must reference one of the exact states below, one owner actor from actors permissions, one due timestamp, one escalation rule, and one event that can move the file forward. A screen status such as “with credit” is not enough for code generation; the system must know whether the file is in credit_in_review, deviation_pending, on_hold, or returned_for_rework.
The workflow engine owns workflow_task, queue_assignment and SLA timers. Business modules own evidence: KYC owns kyc_profile, document service owns document_instance, credit owns credit_assessment, LMS owns loan_account, and collections owns collection_case.
For the executable policy layer behind prescreen, data_fetch, deviation_approval, sanction conditions and monitoring triggers, use BRE functional specification and BRE runtime architecture.
Common Workflow Task Contract
Section titled “Common Workflow Task Contract”| Field | Type | Required | Rule |
|---|---|---|---|
workflow_task_id | uuid | Yes | Primary key. |
subject_type | enum | Yes | lead, application, kyc_profile, document_requirement, credit_assessment, deviation, sanction, sanction_condition, disbursement_request, loan_account, collection_case, service_request, partner. |
subject_id | uuid | Yes | Primary id of the subject. |
application_id | uuid | Conditional | Required for all pre-booking application tasks. |
loan_account_id | uuid | Conditional | Required for post-booking loan and collections tasks. |
current_state | enum | Yes | Must equal current application.application_state, loan_account.account_state, delinquency state, or collections case state. |
task_type | enum | Yes | prescreen, dedupe_review, kyc_cdd, bo_verification, document_collection, document_verification, data_fetch, cam_prepare, rcu_review, legal_review, valuation_review, deviation_approval, sanction_generation, borrower_acceptance, documentation_execution, cp_clearance, mandate_setup, disbursement_check, booking_rework, collections_call, field_visit, ptp_followup, legal_recovery, settlement_review, restructure_review, partner_reconciliation. |
owner_role | text | Yes | Actor code such as sales_ops, kyc_checker, credit_analyst, ops_checker, collections_manager. |
assigned_user_id | uuid | Conditional | Required after allocation unless the queue is deliberately unallocated. |
assignment_basis | enum | Yes | round_robin, branch_owner, source_owner, skill_based, amount_authority, geography, vendor_panel, manual_supervisor, system_batch. |
priority | enum | Yes | low, normal, high, critical, computed from amount, channel, DPD, hold age and VIP policy. |
sla_start_at | timestamptz | Yes | Set on queue entry. |
sla_due_at | timestamptz | Yes | Computed from the stage table below. |
sla_pause_reason_code | text | Conditional | Required when state is on_hold or when waiting on borrower, partner, court, registry, government API, or bank rail. |
escalation_level | int | Yes | Starts at 0; increments on each escalation. |
last_escalated_at | timestamptz | Conditional | Required when escalation_level > 0. |
terminal_event_expected | enum | Yes | The state-machine event that can complete the task. |
task_status | enum | Yes | open, in_progress, waiting_external, returned, completed, cancelled, expired. |
SLA Clock Rules
Section titled “SLA Clock Rules”| Situation | Clock behavior | Audit requirement |
|---|---|---|
| Normal queue entry | Start at state entry timestamp. | Store current_state, owner queue and computed sla_due_at. |
returned_for_rework | Stop current task; create rework task for prior owner with a new SLA. | Store rework reason, target state and returning actor. |
on_hold for external dependency | Pause operational SLA but continue ageing counter. | Store hold reason, external provider, ticket id and next retry time. |
| Borrower delay | Pause only if required evidence is genuinely outside lender control. | Store communication attempt and borrower response due date. |
| Regulatory or compliance hold | Pause business SLA but show breach-risk clock to compliance. | Store screening_hit_id, compliance_hold reason or legal/court reference. |
| SLA breach | Do not auto-approve. | Create escalation task; preserve original owner and missed deadline. |
Origination Stage Queues
Section titled “Origination Stage Queues”| Application state | Entry event | Queue | Assignment rule | Base SLA | Terminal events | Escalation |
|---|---|---|---|---|---|---|
lead_created | partner_application_received, dsa_lead_submitted, manual lead capture | Sales/CRM owned by sales_rm or dsa_user | Source owner; branch by pincode and product | 4 business hours for first contact; 1 business day for login decision | lead_submitted_for_prescreen, lead_withdrawn, lead_ttl_elapsed | At 75% SLA notify sales_manager; at breach reassign to branch sales_manager; at 3 business days no contact auto-route to expired by lead_ttl_elapsed. |
prescreen_pending | lead_submitted_for_prescreen | Sales ops/BRE owned by sales_ops and system_service | System batch for BRE; manual dedupe to sales_ops | 15 minutes for automated rules; 4 business hours for fuzzy dedupe | pre_screen_passed, hard_reject_triggered, data_or_identifier_deficient | At 30 minutes integration failure opens on_hold; at 4 hours manual dedupe escalates to sales_manager; no credit approval can bypass a hard reject. |
prescreen_passed | pre_screen_passed | Application setup queue owned by sales_ops | Branch, source and product program | 4 business hours | kyc_required_parties_created, docs_collection_started, borrower_withdrawn | At breach notify sales_manager; at 1 business day return to sales_rm for missing party or product data. |
kyc_pending | kyc_required_parties_created | KYC maker/checker queue owned by kyc_maker, kyc_checker, aml_compliance | Constitution type and risk category; high-risk to aml_compliance | 1 business day for individual CDD; 2 business days for legal entity plus beneficial owners; 4 business hours for sanctions hit triage | kyc_verified, sanctions_or_aml_hold, kyc_rejected | At 75% SLA notify KYC team lead; unresolved high-risk hit after 1 business day escalates to aml_compliance; true positive can only exit through kyc_rejected or hold resolution. |
docs_pending | kyc_verified or docs_collection_started | Document collection and verification queue owned by sales_rm, sales_ops, ops_maker | Requirement owner from document_requirement.required_for_role | 1 business day for unsecured BL; 2 business days for secured SME; 4 business hours for document deficiency marking | document_pack_locked, deficiency_raised, borrower_withdrawn | Deficiency older than 1 business day escalates to sales_manager; waiver request creates deviation and routes to ops_checker plus function owner. |
data_pending | document_pack_locked | Integrations and credit ops queue owned by credit_analyst and system_service | Data type: bureau, AA, GST, ITR, bank statement, Udyam, collateral registry | 30 minutes for bureau; 2 hours for AA/GST/vendor fetch after consent; 1 business day for uploaded financial parsing | data_pack_finalized, provider_retry_exhausted | Retry schedule follows integration catalog; after retry exhaustion route provider_retry_exhausted to on_hold; credit manager can approve waiver only through deviation_pending. |
credit_in_review | data_pack_finalized | Credit workbench owned by credit_analyst, credit_manager, rcu_officer, legal_user, valuer_vendor | Amount, product, collateral and risk grade; vendor allocation by panel/geography | 1 business day for unsecured up to ₹10 lakh; 2 business days for unsecured above ₹10 lakh; 3 business days for LAP/secured with legal/valuation | deviation_raised, credit_approved_without_deviation, sanction_direct_generated, credit_rejected, fraud_confirmed | At 75% SLA notify credit_manager; at breach notify next DoA level; RCU negative older than 1 business day escalates to RCU manager and cannot be closed by sales. |
deviation_pending | deviation_raised | Approval service owned by credit_manager, national_credit_head, credit_committee_member, aml_compliance, legal_user | authority_rule resolves required level from amount, risk, severity and product | 4 business hours for low/medium; 1 business day for high; 2 business days for committee | all_deviations_approved, deviation_rejected, deviation_rejected_final | At breach escalate to next authority_level; if severity=critical, notify national_credit_head; no auto-approval on timeout. |
approved | credit_approved_without_deviation or all_deviations_approved | Sanction generation queue owned by credit_analyst and ops_checker | Product template and KFS coverage | 4 business hours | sanction_letter_generated, credit_rejected, sanction_expired | If KFS computation fails, route to on_hold with APR error; if sanction not issued in 1 business day, notify credit_manager and ops_checker. |
sanctioned | sanction_letter_generated or sanction_direct_generated | Borrower acceptance queue owned by sales_rm, borrower_user, guarantor_user | Borrower and authorised signatory action; assisted acceptance monitored by sales_ops | Validity from sanction.valid_until; operational follow-up every 1 business day | borrower_acceptance_recorded, sanction_expired, borrower_negotiation_rework, borrower_withdrawn | 2 business days before expiry notify sales_manager; expiry triggers sanction_expired; material borrower change routes to returned_for_rework. |
sanction_accepted | borrower_acceptance_recorded | Documentation setup queue owned by ops_maker | Product, collateral and constitution checklist | 4 business hours | documentation_started, sanction_expired | At breach notify ops_checker; expired KFS/sanction cannot proceed to documentation. |
documentation_pending | documentation_started | Documentation, legal and CP queue owned by ops_maker, ops_checker, legal_user, guarantor_user, borrower_user | Checklist item owner; legal tasks by branch/geography | 1 business day unsecured; 3 business days secured; 4 hours for eSign/eStamp callback processing; 1 business day for CP verification | documents_executed_and_cps_cleared, document_exception_hold | Stamping/signing failure after two attempts routes to on_hold; legal/security exception escalates to legal_user; CP waiver requires deviation and ops_checker approval. |
disbursement_pending | documents_executed_and_cps_cleared | Disbursement maker-checker queue owned by ops_maker, ops_checker, treasury_finance | Maker prepares; checker verifies; finance releases | 4 business hours for single-tranche unsecured; 1 business day for secured or supplier payout | loan_booked, booking_failed, freeze_account where post-booking hold is needed | At 75% SLA notify ops_checker; failed payment retries as payment rail rule; final failure triggers booking_failed and returned_for_rework. |
returned_for_rework | Any rework event | Prior owner queue from rework_target_state | Original owner unless conflict or SLA breach caused reassignment | 4 business hours for data/document fixes; 1 business day for credit structure changes | Target-state event specified in rework task | If same reason repeats twice, escalate to functional manager; third repeat requires approval_request for exception or final rejection. |
on_hold | sanctions_or_aml_hold, provider_retry_exhausted, document_exception_hold, legal/court/fraud hold | Holding owner queue: aml_compliance, credit_manager, legal_user, ops_checker, system_service | Hold reason code | Review every 1 business day; external retry follows integration catalog | Prior active state, rejected, withdrawn | Holds older than 3 business days go to function head; compliance/fraud hold has no auto-release. |
Loan Account And Servicing Queues
Section titled “Loan Account And Servicing Queues”| Account state | Trigger | Queue | Assignment rule | Base SLA | Exit event | Escalation |
|---|---|---|---|---|---|---|
pending_booking | loan_booking_requested | LMS booking queue owned by system_service and ops_checker | Product and facility type | 15 minutes system booking; 2 business hours manual exception | loan_booked_without_disbursement, loan_booked_with_first_disbursement, booking_failed | At 30 minutes open booking incident; at 2 hours notify ops_checker and treasury_finance. |
active_undisbursed | loan_booked_without_disbursement | Drawdown queue owned by ops_maker | Tranche schedule and CP status | 1 business day for first drawdown request | first_disbursement_posted, first_disbursement_posted_full, account_cancelled_before_disbursement | Undisbursed older than product TTL escalates to credit_manager for cancellation or revalidation. |
partially_disbursed | first_disbursement_posted or tranche_posted | Tranche monitoring queue owned by ops_maker and credit_analyst | tranche_number, CP and end-use evidence | 1 business day after tranche request; monthly review for idle limits | final_tranche_posted, cancel_undisbursed_balance, recall | Tranche CP overdue escalates to ops_checker; idle sanctioned amount beyond validity escalates to credit_manager. |
active_current | loan_booked, cure_completed, performance_cured | Servicing queue owned by servicing_agent, LMS batch and treasury_finance | Service request category and branch | Statement/certificate 1 business day; bank change 2 business days; foreclosure quote 3 business days; rate reset same day batch | demand_overdue, freeze_account, foreclosure_posted, maturity_paid | SR breach notifies servicing manager; bank-account change breach notifies ops_checker; rate reset failure blocks demand generation and notifies finance. |
active_overdue | demand_overdue or default_after_restructure | Collections intake queue owned by collections_manager | DPD, exposure, risk grade, product and geography | Same day case creation after day-end DPD; allocation by 10:00 next business day | cure_completed, npa_classified, restructure_approved, recall, writeoff_posted | Allocation breach escalates to collections head; NPA risk at dpd_61_90 alerts credit_manager and treasury_finance. |
frozen | freeze_account | Hold control queue owned by function that froze account | Hold reason | Daily review for fraud/compliance/security; same day review for payment error | unfreeze_account, unfreeze_account_overdue, recall, close_account | Holds older than 7 calendar days require function head note; AML/fraud hold requires aml_compliance or RCU checker release. |
restructured | restructure_implemented | Monitoring queue owned by policy_risk and servicing_agent | Restructure package and schedule version | Monthly performance review; missed revised due same day alert | performance_cured, default_after_restructure, close_account | Missed due opens collections case immediately; performance cure requires risk review before state change. |
preclosed | foreclosure_posted or settlement_implemented | Closure queue owned by ops_checker, legal_user, treasury_finance | Product and collateral status | 3 business days for unsecured NOC; 7 business days for secured release initiation | no_dues_generated, closure_reversed | Security release delay escalates to legal_user; GL mismatch escalates to finance head. |
matured_pending_closure | maturity_paid | Closure queue owned by ops_checker | Loan account and charge status | 3 business days | no_dues_generated | Same as preclosed. |
written_off | writeoff_posted | Recovery-after-writeoff queue owned by collections_manager and treasury_finance | Recovery policy and legal status | Monthly review until closed or transferred | recovery_after_writeoff_posted | Recoveries must post to LMS/GL within same business day; reconciliation breach escalates to finance. |
Collections Case Queues
Section titled “Collections Case Queues”| Collections state | Entry event | Queue | Assignment rule | Base SLA | Terminal/progress events | Escalation |
|---|---|---|---|---|---|---|
open_unallocated | delinquency_snapshot_received | Collections supervisor queue owned by collections_manager | Strategy engine using DPD, exposure, risk, geography and channel | Same day for 1+ DPD; within 2 hours for 60+ DPD | auto_allocate_tele, auto_allocate_field | Allocation breach escalates to bucket manager; high exposure skips tele-only queue. |
allocated_tele | auto_allocate_tele, reallocate_tele, partial_payment_received | Tele collections queue owned by collections_agent | Campaign, language, contact window and broken PTP count | First call within 1 business day for dpd_1_30; same day for dpd_31_60 | ptp_recorded, dpd_crossed_30_or_high_risk, arrears_cleared | No contact after three attempts over two days escalates to field review; abusive/contact-policy breach locks agent and alerts compliance. |
allocated_field | auto_allocate_field, escalate_field | Field/agency queue owned by collections_agent and collections_manager | Geography, exposure and agency contract | Visit within 2 business days for dpd_1_30; 1 business day for dpd_31_60 or skip risk | ptp_recorded, negative_visit_or_skip, arrears_cleared | Missed visit escalates to agency manager; negative visit opens RCU/legal review. |
ptp_active | ptp_recorded | PTP follow-up queue owned by assigned collections_agent | PTP date, amount and payment mode | Reminder T-1 day; confirmation on PTP due date; LMS match same day | payment_received_matching_ptp, partial_payment_received, ptp_due_missed, arrears_cleared | Broken PTP creates ptp_broken; repeated broken PTP routes to field or hard bucket. |
ptp_broken | ptp_due_missed | Collections supervisor queue | Broken PTP count and DPD | Same business day review | reallocate_tele, escalate_field | Two broken PTPs or exposure above policy escalates to collections_manager. |
escalated_hard_bucket | dpd_crossed_30_or_high_risk, negative_visit_or_skip | Hard bucket queue owned by collections_manager | DPD, exposure, secured/unsecured, fraud and borrower response | Same day for 60+ DPD; 1 business day for 31-60 DPD | legal_route_requested, settlement_offer_received, restructure_request_received, arrears_cleared | dpd_61_90 triggers legal readiness; npa_90_plus triggers finance, provisioning and partner alerts. |
legal_review | legal_route_requested | Recovery legal queue owned by legal_recovery and legal_user | Product, collateral, cheque/NACH bounce, SARFAESI eligibility and arbitration clause | 2 business days for route decision; statutory notice timelines by law | enforcement_approved, legal_hold_or_defect | Legal defect returns to hard bucket; no route decision by SLA escalates to legal head. |
settlement_review | settlement_offer_received, ots_approved | Settlement approval queue owned by collections_manager, credit approver, treasury_finance, legal_user | Waiver amount and DoA | 2 business days for proposal; fund realisation tracked to OTS letter dates | ots_approved, ots_funds_realized, ots_rejected | Expired token payment cancels proposal; waiver above threshold escalates per DoA. |
restructure_review | restructure_request_received | Credit/risk queue owned by credit_analyst, policy_risk, credit_manager | Viability, stress reason and asset classification | 5 business days for complete file | restructure_implemented | Missing viability evidence returns to collections; approval requires new schedule_version. |
repossession_or_enforcement | enforcement_approved | Legal/recovery queue owned by legal_recovery | Collateral and legal route | Task-level due dates from notice, possession, auction, arbitration, DRT or Lok Adalat calendar | recovery_completed, writeoff_posted, approved_uncollectable_closure | Statutory deadline breach alerts legal head and compliance. |
Assignment Guardrails
Section titled “Assignment Guardrails”| Guard | Required implementation |
|---|---|
| Maker-checker | ops_maker cannot complete a task checked by the same user as ops_checker; kyc_maker cannot approve own KYC; settlement negotiator cannot approve own waiver. |
| Conflict of interest | sales_rm and dsa_user cannot approve credit, KYC, disbursement, DPD correction, settlement or write-off. |
| Vendor scope | valuer_vendor, legal_vendor and field agency users can see only assigned collateral_asset, legal_opinion, valuation_report or collection_case records. |
| Partner scope | partner_api_client can see applications where api_client.partner_id == application.source_partner_id; no direct access to CAM, bureau variables, RCU findings or internal deviations. |
| Regulatory hold | No state can move to disbursement_pending or loan_booked while true-positive screening_hit or active compliance hold is open. |
| DPD source | Collections users cannot edit loan_account.current_dpd, asset_classification or delinquency state; LMS publishes dpd_changed and asset_classification_event. |
Implementation Tests
Section titled “Implementation Tests”| Test | Expected result |
|---|---|
kyc_pending with one unverified beneficial_owner | kyc_verified event rejected; task remains with kyc_checker or aml_compliance. |
docs_pending with mandatory document_requirement.status=pending | document_pack_locked rejected unless approved waiver exists. |
data_pending with AA timeout but bureau optional | Required-data matrix decides whether retry, waiver, or provider_retry_exhausted is legal. |
deviation_pending low-severity SLA breach | Escalation created; no auto-approval. |
disbursement_pending with mandate.mandate_status=rejected | loan_booked rejected unless product permits disbursement before mandate and deviation approved. |
active_overdue at dpd_61_90 | Collections case must be at least escalated_hard_bucket or legal_review; partner status event must be queued for co-lending accounts. |
Collections arrears_cleared | Case closes only after LMS confirms cure; collector promise or bank screenshot is not enough. |
Sources
Section titled “Sources”- RBI, Reserve Bank of India (Digital Lending) Directions, 2025
- RBI, Key Facts Statement (KFS) for Loans & Advances, April 15, 2024
- RBI, Prudential norms on IRACP - Clarifications, November 12, 2021
- RBI, Outsourcing of Financial Services - Responsibilities of regulated entities employing Recovery Agents, August 12, 2022