Product Setup
Loan Product Setup Guide
This guide explains how to configure loan products in the Hiana Loans system. Each product type has different requirements — this document covers the configuration layers, recommended settings, and the order of operations.
For employer-backed lending, use the complete employer-backed configuration and acceptance guide. It supersedes abbreviated workflow examples and documents employer-request delivery controls and deployment requirements.
Table of Contents
- Prerequisites
- Configuration Layers
- Product Types Overview
- Nano Loan Setup
- Employer-Based Loan Setup
- Traditional Loan Setup
- Payment Config & Schedule Shape
- Floating Rate Config
- Staged Disbursement
- Conditional Workflow Steps
- Post-Setup Verification
- Configuration Reference
For post-disbursement operations (waivers, top-ups, delinquency pause, re-aging, maker-checker, repricing), see the Loan Servicing Operations Guide.
Prerequisites
Before creating any loan product, ensure the following are in place:
- Jurisdiction — A jurisdiction record must exist first. Products reference a
jurisdiction_id. Create jurisdictions viaPOST /api/v1/jurisdictions. - Currency Code — Know the ISO 4217 currency code for the product (e.g.,
KES,USD,ZMW). - GL Accounts — If using internal accounting, have account codes ready for fee mapping and interest income tracking.
- Permissions — The user creating products must have
product.createfor creation andproduct.updatefor configuration.
Configuration Layers
Each product requires multiple layers of configuration. Create them in this order:
| Layer | Endpoint | Purpose |
|---|---|---|
| 1. Base Product | POST /api/v1/products | Core loan terms — amounts, term, interest, repayment |
| 2. Fees | POST /api/v1/products/:id/fees | Origination, processing, insurance, late payment fees |
| 3. Credit Risk Config | PUT /api/v1/products/:id/config/credit-risk | 5-pillar scoring weights, DTI limits, auto-approve/decline thresholds |
| 4. Approval Config | PUT /api/v1/products/:id/config/approval | Who approves, at what amount threshold, in what sequence |
| 5. Intake Config | PUT /api/v1/products/:id/config/intake | Document KYC, selfie verification, face match requirements |
| 6. Required Documents | PUT /api/v1/products/:id/config/documents | Document checklist per workflow stage |
| 7. Form Config | PUT /api/v1/products/:id/config/form | Which fields to render in the application form |
| 8. Disbursement Config | PUT /api/v1/products/:id/config/disbursement | Disbursement channel (bank, mobile money, etc.), staged disbursement |
| 9. Payment Config | PUT /api/v1/products/:id/config/payment | Allocation order, partial payments, prepayment recalc strategy, schedule shape |
| 10. Floating Rate | PUT /api/v1/products/:id/config/floating-rate | Optional — index + spread pricing for floating-rate products |
| 11. Rate Tiers | POST /api/v1/products/:id/rate-tiers | Optional — for risk-based pricing tiers |
| 12. Workflow draft | PUT /api/v1/products/:id/config/workflow | Step types, modes, handlers, roles and rework |
| 13. Publish workflow | POST /api/v1/products/:id/config/workflow/publish | Validates dependencies and publishes the immutable application sequence |
Product Types Overview
The system supports the following product types:
| Type | Code | Typical Use Case |
|---|---|---|
| Personal | PERSONAL | General consumer loans, employer-based loans |
| Business | BUSINESS | SME and corporate loans |
| Mortgage | MORTGAGE | Home loans (long-term, secured) |
| Auto | AUTO | Vehicle financing |
| Education | EDUCATION | School fees loans |
| Payday | PAYDAY | Short-term salary advance |
| Microfinance | MICROFINANCE | Small group or individual loans |
| Nano | NANO | Digital micro-loans with credit limits |
Application workflow contract
Updated: 11 September 2026. Commercial values elsewhere in this guide are illustrative configurations; apply your approved policy. Supported setup requires the UI choice, save schema, backend task type, handler and operational screen to agree.
| Task type (dropdown displays spaces) | Supported mode/handler | Completion |
|---|---|---|
DOCUMENT_UPLOAD | MANUAL | Required application-linked document references |
DOCUMENT_REVIEW | MANUAL | Verify active mandatory document quantities in /admin/documents/queue |
KYC_CHECK | MANUAL, or AUTOMATED / kyc_verification | Product-specific identity requirements; review via /admin/kyc-verifications |
FRAUD_CHECK | AUTOMATED / fraud_screening | Successful fraud check; errors require investigation/retry |
CREDIT_CHECK | AUTOMATED / credit_decision | Recorded credit assessment, followed by review |
UNDERWRITING | MANUAL | Claim/save/finalize assessment on Application → Workflow |
OFFER_PROPOSAL | MANUAL | Prepare offer and obtain acceptance on Application → Term Proposals / borrower portal |
OFFER_ACCEPTANCE | MANUAL | Optional separate acceptance stage; do not duplicate the combined offer stage in the baseline |
CONSENT_CAPTURE | MANUAL | Capture active required application consent templates |
AGREEMENT_GENERATION | MANUAL | Generate agreement for accepted proposal and obtain required signatures |
APPROVAL | APPROVAL / explicit level | Configured role, independent checker and level quorum |
DISBURSEMENT is a linked workflow after origination, not an application step. The old auto_disburse preset cannot complete the application journey: it expects a loan to exist and creates a request rather than confirming funds transfer. New draft/save validation rejects it under any step key.
The traditional baseline is document upload → document review → KYC → automated credit → underwriting → offer acceptance → consent → signed agreement → final approval. Employer-backed products insert employer approval before credit and use a separate final lender level. Nano products use the nano template, including fraud screening and review. These are unconditional baseline sequences.
For automatic document correction, configure document_review rework to document_upload, reason DOCUMENT_NEEDS_CORRECTION, notes and borrower action required, permitted reviewer roles. The normal document approval endpoints write review audit history and synchronize the currently waiting document task. Generic completion commands cannot substitute for the evidence-producing actions above.
Keep identity policy distinct from onboarding and file approval. Configure document KYC, selfie, face matching and freshness to match the product. A document-only product does not require a selfie unless enabled; selfie-only verification must not enable face matching. IN_REVIEW means required identity work is pending. Neither document approval nor onboarding_status establishes missing face-match evidence.
Save dependent document, consent, approval and other product settings before publication. New applications freeze the published version; publishing does not modify existing task lists. After final approval, origination requires matching accepted terms and a fully signed agreement. Funding, repayment and closure have their own operational checks.
1. Nano Loan
Nano loans are short-term, small-ticket digital loans with minimal documentation and fast approval.
Base Product
POST /api/v1/products
| Field | Value | Notes |
|---|---|---|
product_type | NANO | Required |
term_unit | DAYS | Nano loans use days |
min_term | 7 | 7 days minimum |
max_term | 30 | 30 days maximum |
min_amount | 500 | Adjust per market |
max_amount | 10,000 | Adjust per market |
base_interest_rate | 5–15 | Monthly rate |
interest_rate_period | MONTHLY | Rate quoted per month |
interest_rate_type | FIXED | Fixed rate for short term |
interest_calculation_method | FLAT | Simple flat interest |
interest_accrual_frequency | DAILY | Accrues daily |
interest_capitalization_frequency | NONE | No compounding |
repayment_frequency | DAILY or WEEKLY | Flexible repayment |
day_count_convention | ACT/365 | Actual days / 365 |
grace_period_days | 3 | Short grace period |
default_days | 7 | Quick default for short-term |
requires_collateral | false | Unsecured |
requires_guarantor | false | No guarantor |
requires_guarantee | false | No guarantee |
allows_early_settlement | true | Allow early payoff |
early_settlement_penalty_rate | 0 | No penalty |
initial_credit_limit | 2,000 | Starting credit limit for new borrowers |
allow_daily_repayment | true | Enable daily repayment option |
open_lending_rate_multiplier | 1.0 | No multiplier (no guarantee needed) |
Fees
| Fee Type | Calculation | Collection | Mandatory | Notes |
|---|---|---|---|---|
ORIGINATION | 2–5% PERCENTAGE | DEDUCT_FROM_DISBURSEMENT | Yes | Deducted from loan amount |
LATE_PAYMENT | Fixed amount | ADD_TO_BALANCE | No | Added to balance on late payment |
INSURANCE | Small fixed or % | DEDUCT_FROM_DISBURSEMENT | No | Optional credit life insurance |
Credit Risk Config
| Setting | Value | Rationale |
|---|---|---|
score_weight_repayment_behavior | 0.30 | Slightly lower — limited history |
score_weight_debt_capacity | 0.25 | Balanced |
score_weight_credit_history | 0.20 | Higher weight — transaction history matters |
score_weight_financial_strength | 0.10 | Less relevant for small loans |
score_weight_behavioral | 0.15 | Higher — mobile behavior is key |
minimum_loan_term | 3 | Short loans, 3-month minimum for DTI calc |
max_debt_to_income_ratio | 0.50 | More lenient for small amounts |
requires_credit_bureau_check | false | Not required for nano |
requires_fraud_check | true | Always check fraud |
auto_approve_min_score | 650 | Approval-decision score threshold; final workflow approval still required |
auto_approve_max_amount | 5,000 | Maximum amount for an approval decision; not automatic origination |
auto_decline_max_score | 450 | Decline-decision threshold; staff review the recorded outcome |
Approval Config
- Level 1:
OPERATIONS_MANAGER, required count 1 in the reference nano setup. Scoring thresholds produce decision evidence; they do not replace the final approval task. See the nano guide for the complete sequence.
Intake Config
| Setting | Value | Notes |
|---|---|---|
require_document_kyc | false | Lightweight — no document KYC |
require_verified_selfie | true | Basic identity verification |
require_face_match | false | Not required for nano |
require_manual_selfie_review | false | Automated only |
employment_freshness_days | 90 | If employment data is collected |
financial_freshness_days | 30 | If financial data is collected |
Required Documents
Nano loans typically require minimal documents:
NATIONAL_ID— mandatory, stage:DOCUMENT_UPLOAD
2. Employer-Based Loan
Employer-based loans are repainted through salary deductions, with the employer providing a guarantee.
Base Product
POST /api/v1/products
| Field | Value | Notes |
|---|---|---|
product_type | PERSONAL | Personal loan type |
term_unit | MONTHS | Monthly terms |
min_term | 3 | 3 months minimum |
max_term | 12 | 12 months maximum |
min_amount | 5,000 | Adjust per market |
max_amount | 100,000 | Adjust per market |
base_interest_rate | 12–24 | Annual rate |
interest_rate_period | ANNUAL | Rate quoted per year |
interest_rate_type | FIXED | Fixed for employer loans |
interest_calculation_method | REDUCING_BALANCE | Standard reducing balance |
interest_accrual_frequency | MONTHLY | Monthly accrual |
interest_capitalization_frequency | NONE | No compounding |
repayment_frequency | MONTHLY | Monthly repayment (salary deduction) |
day_count_convention | ACT/365 | Actual days / 365 |
grace_period_days | 7 | One week grace |
default_days | 30 | 30 days to default |
requires_collateral | false | Unsecured — employer guarantees |
requires_guarantor | false | Employer guarantee replaces guarantor |
requires_guarantee | true | Employer guarantee required |
allowed_guarantee_types | ["EMPLOYER_GUARANTEE"] | Only employer guarantees |
default_guarantee_type | EMPLOYER_GUARANTEE | Default to employer |
open_lending_rate_multiplier | 1.5 | Higher rate without guarantee |
allows_early_settlement | true | Allow early payoff |
early_settlement_penalty_rate | 2 | 2% penalty for early settlement |
Fees
| Fee Type | Calculation | Collection | Mandatory | Notes |
|---|---|---|---|---|
ORIGINATION | 2–3% PERCENTAGE | DEDUCT_FROM_DISBURSEMENT | Yes | Standard origination |
PROCESSING | Fixed amount | DEDUCT_FROM_DISBURSEMENT | Yes | Processing fee |
LATE_PAYMENT | Fixed or % | ADD_TO_BALANCE | No | Penalty for late payment |
INSURANCE | Optional | DEDUCT_FROM_DISBURSEMENT | No | Credit life insurance |
Credit Risk Config
| Setting | Value | Rationale |
|---|---|---|
score_weight_repayment_behavior | 0.35 | Standard weight |
score_weight_debt_capacity | 0.30 | Standard weight |
score_weight_credit_history | 0.15 | Standard weight |
score_weight_financial_strength | 0.15 | Standard weight |
score_weight_behavioral | 0.05 | Standard weight |
minimum_loan_term | 6 | 6-month minimum for DTI calc |
max_debt_to_income_ratio | 0.40 | 40% DTI max |
requires_credit_bureau_check | true | Bureau check recommended |
requires_fraud_check | true | Always check fraud |
auto_approve_min_score | 700 | Approval-decision score threshold; final workflow approval still required |
auto_approve_max_amount | 50,000 | Maximum amount for an approval decision; not final approval |
auto_decline_max_score | 500 | Decline-decision threshold; staff review the recorded outcome |
Approval Config
- Level 1:
EMPLOYER, one authorized employer confirmation. - Level 2:
OPERATIONS_MANAGER, independent final approval for all amounts in the baseline. Configure the employer step, linked employment and active MOU as described in the employer guide.
Intake Config
| Setting | Value | Notes |
|---|---|---|
require_document_kyc | true | Full KYC required |
require_verified_selfie | true | Identity verification |
require_face_match | true | Match selfie to ID |
require_manual_selfie_review | false | Automated review |
employment_freshness_days | 30 | Employment data must be recent |
financial_freshness_days | 30 | Financial data must be recent |
Required Documents
| Document | Mandatory | Quantity | Freshness | Stage |
|---|---|---|---|---|
NATIONAL_ID | Yes | 1 | — | DOCUMENT_UPLOAD |
PAYSLIP | Yes | 3 | 30 days | DOCUMENT_UPLOAD |
EMPLOYMENT_LETTER | Yes | 1 | 30 days | DOCUMENT_UPLOAD |
BANK_STATEMENT | Yes | 3 months | 30 days | DOCUMENT_UPLOAD |
3. Traditional Loan
Traditional loans are medium to long-term loans with full underwriting, collateral, and multi-level approval chains.
Base Product
POST /api/v1/products
| Field | Value | Notes |
|---|---|---|
product_type | PERSONAL or BUSINESS | Depending on borrower type |
term_unit | MONTHS | Monthly terms |
min_term | 12 | 12 months minimum |
max_term | 60 | 60 months maximum |
min_amount | 50,000 | Adjust per market |
max_amount | 5,000,000 | Adjust per market |
base_interest_rate | 12–18 | Annual rate |
interest_rate_period | ANNUAL | Rate quoted per year |
interest_rate_type | FIXED or VARIABLE | Fixed or variable |
interest_calculation_method | REDUCING_BALANCE | Standard reducing balance |
interest_accrual_frequency | MONTHLY | Monthly accrual |
interest_capitalization_frequency | NONE | No compounding |
repayment_frequency | MONTHLY | Monthly repayment |
day_count_convention | ACT/365 | Actual days / 365 |
grace_period_days | 15 | Two weeks grace |
default_days | 90 | 90 days to default |
requires_collateral | true | Secured loan |
requires_guarantor | true | Guarantor required |
requires_guarantee | true | Guarantee required |
allowed_guarantee_types | ["CASH_DEPOSIT", "PROPERTY", "VEHICLE"] | Accepted guarantee types |
open_lending_rate_multiplier | 1.5 | Higher rate without guarantee |
allows_early_settlement | true | Allow early payoff |
early_settlement_penalty_rate | 3 | 3% penalty for early settlement |
Fees
| Fee Type | Calculation | Collection | Mandatory | Notes |
|---|---|---|---|---|
ORIGINATION | 1–2% PERCENTAGE | DEDUCT_FROM_DISBURSEMENT | Yes | Standard origination |
PROCESSING | Fixed amount | DEDUCT_FROM_DISBURSEMENT | Yes | Processing fee |
VALUATION | Fixed amount | UPFRONT | Yes | Collateral valuation |
INSURANCE | Percentage | CAPITALIZE_INTO_LOAN | Yes | Credit life insurance |
LATE_PAYMENT | Percentage | ADD_TO_BALANCE | No | Penalty for late payment |
LEGAL | Fixed amount | ADD_TO_BALANCE | No | Legal fees if needed |
Credit Risk Config
| Setting | Value | Rationale |
|---|---|---|
score_weight_repayment_behavior | 0.40 | Highest weight — repayment history critical |
score_weight_debt_capacity | 0.35 | High weight — affordability key |
score_weight_credit_history | 0.15 | Standard weight |
score_weight_financial_strength | 0.10 | Standard weight |
score_weight_behavioral | 0.00 | Not relevant for traditional loans |
minimum_loan_term | 12 | 12-month minimum for DTI calc |
max_debt_to_income_ratio | 0.36 | 36% DTI max (conservative) |
max_loan_to_value_ratio | 0.80 | 80% LTV max |
requires_credit_bureau_check | true | Bureau check required |
credit_bureau_sources | ["TRANSUNION", "EXPERIAN"] | Multiple bureaus |
requires_fraud_check | true | Always check fraud |
auto_decline_on_fraud | true | Auto-decline on fraud |
check_watchlist | true | Check watchlists |
auto_decline_watchlist | true | Auto-decline on watchlist match |
auto_approve_min_score | 750 | Approval-decision score threshold; final workflow approval still required |
auto_approve_max_amount | 100,000 | Maximum amount for an approval decision; not automatic origination |
auto_decline_max_score | 550 | Decline-decision threshold; staff review the recorded outcome |
Approval Config
- Level 1: Loan Officer — all amounts
- Level 2: Operations Manager — amounts > 100,000
- Level 3: Compliance Officer (2 approvers) — amounts > 1,000,000
Intake Config
| Setting | Value | Notes |
|---|---|---|
require_document_kyc | true | Full KYC required |
require_verified_selfie | true | Identity verification |
require_face_match | true | Match selfie to ID |
require_manual_selfie_review | true | Manual review for large loans |
employment_freshness_days | 90 | Employment data within 90 days |
financial_freshness_days | 30 | Financial data within 30 days |
Required Documents
| Document | Mandatory | Quantity | Freshness | Stage |
|---|---|---|---|---|
NATIONAL_ID | Yes | 1 | — | DOCUMENT_UPLOAD |
PAYSLIP | Yes | 3 | 90 days | DOCUMENT_UPLOAD |
BANK_STATEMENT | Yes | 6 months | 30 days | DOCUMENT_UPLOAD |
COLLATERAL_DOCUMENT | Yes | 1 | — | DOCUMENT_UPLOAD |
VALUATION_REPORT | Yes | 1 | — | DOCUMENT_UPLOAD |
BUSINESS_REGISTRATION | If business | 1 | — | DOCUMENT_UPLOAD |
Payment Config & Schedule Shape
PUT /api/v1/products/:id/config/payment (Product Config → Payment tab) controls repayment behavior beyond the base schedule:
| Field | Effect |
|---|---|
payment_allocation_order | Order payments settle fees/interest/principal |
allow_partial_payments | Accept less-than-installment amounts |
prepayment_penalty_enabled + rules | Penalty tiers on early settlement |
prepayment_recalc_strategy | NONE (default) · REDUCE_EMI — same term, lower installment · REDUCE_TERM — same installment, shorter term. Applied when principal is paid ahead of schedule |
interest_only_installments | First N installments collect interest only |
balloon_percentage | Fraction (0–0.99) of principal deferred to the final installment; intermediate installments amortize the remainder |
grace_period_extension | Extra days beyond the product grace period |
Interest-only and balloon can combine — e.g. 3 interest-only months then amortize 80% of principal with a 20% balloon. Restructuring regenerates a standard equal-annuity schedule and drops the shape.
Floating Rate Config
PUT /api/v1/products/:id/config/floating-rate (Product Config → Floating tab) prices the product as a rate index + spread:
{ "rate_index_id": "<index uuid>", "spread_percent": 6.0, "reprice_strategy": "REDUCE_EMI" }
Requires a rate index and at least one effective rate entry — create/manage them under Admin → Rate Indices (POST /api/v1/rate-indices, POST /api/v1/rate-indices/:id/entries). Origination fails without an effective index value. When a new in-force entry is posted, every active loan on the index reprices and its unpaid installments are rebuilt. Full operating notes: Loan Servicing Operations Guide.
Staged Disbursement
Disbursement Config → enable Staged Disbursement and define ordered tranches (percentage or fixed amount, optional required_documents per stage). Loans on staged products cannot use the single-shot disbursement endpoint — each tranche is released from the loan's funding panel and follows its own verify → process → confirm cycle. Details: Loan Servicing Operations Guide.
Disbursement Checklist
The funding gate is configured per product on the Disbursement Checklist tab (API GET/POST/PUT /api/v1/products/:id/checklist-template). The template defines the items staff must verify before funds release; each loan originated on the product gets a checklist instance from the active template, and required items block release until completed.
Each item: name, type (DOCUMENT_VERIFY, CREDIT_CHECK, FRAUD_CHECK, COMPLIANCE_CHECK, OTHER), required flag, display order. Keep items specific to the product's real release risk — the checklist is the last gate before money moves, not a re-review of evidence earlier stages already produced.
| Product type | Checklist emphasis |
|---|---|
| Employer-MOU | MOU active/unexpired; employer confirmation complete; agreement + deduction mandate signed; verified payroll payout destination; independent release authorization |
| Nano / instant | Verified payout wallet/account; automated checks already passed; transfer confirmation captured |
| Traditional | Verified bank destination; signatures complete; collateral recorded where required; independent release authorization; transfer confirmation |
Conditional Workflow Steps
Use unconditional stages for the reference configurations in these guides. Conditions are available for additional policy-specific stages, but must not bypass required identity, employer confirmation, offers, consents, signatures or final approval.
The evaluator supports equals, not_equals, greater_than, less_than, contains and in. A missing field blocks evaluation; it does not mean false. Publication recognizes fields in Form Config plus requested_amount, requested_term, requested_term_unit, purpose, borrower_id, product_id and jurisdiction_id.
Runtime limitation: task progression evaluates the evidence supplied by the completing action. Publication accepting a field does not guarantee that every preceding action supplies it. The simulation endpoint (POST /api/v1/products/{product_id}/config/workflow/simulate) evaluates caller-supplied facts; it is not an end-to-end rehearsal. Test a real application through the exact predecessor before enabling a condition. The baseline templates use no conditions for this reason.
Do not use the former examples that skipped nano offer/consent capture or employer confirmation based on amount. Skipping an offer step does not automatically generate an accepted offer, and returning customers still need the consent/signature evidence required for their application. credit_decision is not a built-in condition field; the credit handler records decision. Automatic routing from failed KYC/fraud checks to a referral stage is not implemented by the current handlers.
Workflow Operations (Rework, Resubmit, Recovery)
Once a workflow is published and applications are flowing, staff can move applications back and forth through the workflow:
Returning Applications Back (Rework)
Staff can send an application back to an earlier step for correction (e.g., if documents are missing during underwriting). This is configured via rework_rules on each step:
- Each rework rule specifies a
target_step_key,allowed_roles,reason_codes, and whetherborrower_action_required - When rework is triggered, the application moves to
CORRECTION_REQUIREDstatus - Compensation handlers can undo side effects of steps being rolled back
- The
rework_attemptscounter on the target task is incremented
API: POST /api/v1/applications/:id/workflow/rework
Resubmitting After Correction
Once corrections are made, the application is resubmitted to move forward:
- If
borrower_action_required: true, the borrower calls the resubmit endpoint - If
borrower_action_required: false, staff withLoanUpdatepermission resubmit - The workflow creates a
RESUBMITtransition and returns to active processing
API: POST /api/v1/applications/:id/workflow/resubmit
Available Workflow Actions
The backend provides a single source of truth for what the current actor can perform:
API: GET /api/v1/applications/:id/workflow/actions
Returns applicable complete, rework, and resubmit actions based on the actor's role and the workflow's current state. The frontend should use this endpoint to determine which buttons/actions to show — do not compute the action list client-side. Automated steps and evidence-producing document/identity/assessment/offer/consent/signature stages do not expose a generic completion action.
Recovery Operations
For automated step failures, task reassignment, and other recovery scenarios:
| Operation | When to Use |
|---|---|
| Retry | Automated step failed, want to re-run |
| Compensate | Undo side effects of a completed automated step |
| Reassign | Move task to a different user |
| Expire | Task past due date, fail it |
| Cancel | Cancel entire workflow |
| Migrate | Move instance to newer definition version |
Full documentation: See
docs/PRODUCT_WORKFLOW_SETUP_GUIDE.mdfor complete configuration details, transition types, notifications, borrower workflow state, and pipeline analytics.
Pipeline Analytics
The system provides real-time pipeline monitoring through analytics endpoints:
| Endpoint | Purpose |
|---|---|
GET /api/v1/analytics/pipeline/overview | High-level metrics (total, completed, failed, rolled back, reworked, success rate) |
GET /api/v1/analytics/pipeline/stages | Per-stage breakdown with WIP, durations, and counts |
GET /api/v1/analytics/pipeline/bottlenecks | Bottleneck analysis with severity classification |
GET /api/v1/analytics/pipeline/stuck-loans | Loans stuck in a specific stage |
GET /api/v1/analytics/pipeline/application-timing | Turnaround dashboard with SLA data |
Key metrics tracked per stage: WIP count, completed/failed/rolled back/reworked counts, and duration percentiles (avg, median, P95).
Collections Pipeline
When loans become delinquent, the collections pipeline automatically manages escalation and agent assignment:
Delinquency Escalation Levels
| DPD Range | Level | Priority | Typical Actions |
|---|---|---|---|
| 1–7 | EARLY | LOW | Automated email/SMS reminders |
| 8–15 | STANDARD | MEDIUM | Phone calls, follow-up SMS |
| 16–30 | ELEVATED | HIGH | Letters, formal demand |
| 31–60 | SEVERE | URGENT | Field visits, legal notice prep |
| 61+ | CRITICAL | CRITICAL | Legal action, recovery |
Collections API
POST /api/v1/collections/cases— Create a collections caseGET /api/v1/collections/cases/:id— Retrieve case detailsPOST /api/v1/collections/cases/:id/assign— Assign case to an agent
Collections policies also control re-aging (reaging_enabled): when enabled, a delinquent loan that fully cures its past-due amount resets to CURRENT classification. Delinquency can additionally be paused per loan (late fees, escalation and IFRS staging suspend while paused). See the Loan Servicing Operations Guide.
For group-based lending (e.g., employer MOU loans), a default on one loan can trigger a cascade that escalates all related loans to collections.
Full documentation: See
docs/PRODUCT_WORKFLOW_SETUP_GUIDE.md→ Collections Pipeline section for complete details.
Post-Setup Verification
After configuring all layers, verify the product is correctly set up:
1. Check the Full Product Schema
GET /api/v1/products/:id/schema
This returns the complete ProductSchema combining all configuration layers in one response. Verify that:
product— base product fields are correctform_config— form sections and fields are definedintake— KYC and selfie requirements are setdocuments— required documents are listedworkflow— workflow stages are configuredguarantor— guarantor requirements are setdisbursement— disbursement channel is configuredpayment— payment configuration is setaffordability— affordability rules are definedcredit_risk— scoring weights and thresholds are correctapproval— approval chain is definedfees— all fees are listedrate_tiers— rate tiers if using risk-based pricing
2. Test Product Activation
PUT /api/v1/products/:id
Set is_active: true to make the product available for applications.
3. Verify Frontend Rendering
The frontend reads the product schema and dynamically renders:
- Application form fields (from
form_config) - Document checklist (from
documents) - Workflow stages (from
workflow) - Fee breakdown (from
fees)
New products can reuse the supported configuration types above. Adding a new task type or automation handler requires implementation and end-to-end verification; a new display name alone is insufficient.
Configuration Reference
Available Product Types
| Code | Description |
|---|---|
PERSONAL | General consumer loans |
BUSINESS | SME and corporate loans |
MORTGAGE | Home loans |
AUTO | Vehicle financing |
EDUCATION | School fees loans |
PAYDAY | Salary advance |
MICROFINANCE | Small group/individual loans |
NANO | Digital micro-loans with credit limits |
Term Units
| Code | Description |
|---|---|
DAYS | Term in days (e.g., 7 = 7 days) |
WEEKS | Term in weeks (e.g., 2 = 2 weeks) |
MONTHS | Term in months (e.g., 12 = 12 months) |
Interest Rate Types
| Code | Description |
|---|---|
FIXED | Fixed rate for entire term |
VARIABLE | Rate changes with market |
HYBRID | Fixed for initial period, then variable |
Floating rates (index + spread repricing of outstanding loans) are configured separately via the Floating Rate Config layer — not through interest_rate_type.
Interest Rate Periods
| Code | Description |
|---|---|
DAILY | Rate quoted per day |
WEEKLY | Rate quoted per week |
MONTHLY | Rate quoted per month |
ANNUAL | Rate quoted per year |
Day Count Conventions
| Code | Description |
|---|---|
ACT/360 | Actual days, 360-day year |
ACT/365 | Actual days, 365-day year |
30/360 | 30-day months, 360-day year |
Interest Calculation Methods
| Code | Description |
|---|---|
FLAT | Interest on full principal for full term |
REDUCING_BALANCE | Interest on outstanding balance only |
SIMPLE | Simple interest |
COMPOUND | Compound interest |
ACTUAL_360 | Actual/360 day count |
ACTUAL_365 | Actual/365 day count |
Repayment Frequencies
| Code | Description |
|---|---|
DAILY | Daily payments |
WEEKLY | Weekly payments |
BI_WEEKLY | Every two weeks |
MONTHLY | Monthly payments |
QUARTERLY | Quarterly payments |
SEMI_ANNUAL | Twice a year |
ANNUALLY | Annual payments |
Fee Types
| Code | Description |
|---|---|
ORIGINATION | One-time fee for loan origination |
PROCESSING | Processing fee |
LATE_PAYMENT | Penalty for late payment |
EARLY_SETTLEMENT | Penalty for early payoff |
RESTRUCTURING | Fee for loan restructuring |
LEGAL | Legal fees |
INSURANCE | Credit life insurance |
VALUATION | Collateral valuation fee |
ADMINISTRATIVE | Administrative fee |
Fee Calculation Methods
| Code | Description |
|---|---|
FIXED | Fixed amount |
PERCENTAGE | Percentage of loan amount |
TIERED | Tiered based on loan amount |
Fee Collection Methods
| Code | Description |
|---|---|
DEDUCT_FROM_DISBURSEMENT | Fee subtracted from disbursement |
CAPITALIZE_INTO_LOAN | Fee added to principal |
ADD_TO_BALANCE | Fee tracked separately in fee_balance |
UPFRONT | Fee paid before disbursement |
Guarantee Types
| Code | Description |
|---|---|
EMPLOYER_GUARANTEE | Employer guarantees repayment |
CASH_DEPOSIT | Cash collateral |
PROPERTY | Property collateral |
VEHICLE | Vehicle collateral |
System Roles
The following roles are defined in the system. Workflow steps (auto_assign_role) and approval levels (required_role, escalate_to_role) must reference one of these roles — arbitrary strings will be rejected by the backend.
| Role | Description | Typical Use in Workflow |
|---|---|---|
SUPER_ADMIN | System-wide access | Escalation target for critical approvals |
ADMIN | Business owner — full tenant control | Final approval on high-value loans |
OPERATIONS_MANAGER | Senior staff — approves loans, creates staff | Manager-level approval, final sign-off |
LOAN_OFFICER | Loan operations — create/process loans | Document review, offer generation, consent |
CREDIT_ANALYST | Credit evaluation and loan approval | Credit check, underwriting steps |
FINANCE_OFFICER | Financial operations — disbursements, payments | Disbursement-related steps |
COMPLIANCE_OFFICER | Compliance and audit | High-value compliance approval |
COLLECTIONS_OFFICER | Collections management | Collections-related workflow steps |
CUSTOMER_SERVICE | Support — view/update borrower info | Customer-facing support tasks |
AUDITOR | Read-only access | Audit review (no action capabilities) |
READONLY | Read-only access to all tenant data | Observation-only tasks |
Important: Roles like
BRANCH_MANAGER,UNDERWRITER,CREDIT_COMMITTEE,CREDIT_ANALYST_MANAGER,REGIONAL_MANAGER,HEAD_OF_CREDIT, andBOARD_MEMBERare not valid system roles. Use the closest match from the table above (e.g.,OPERATIONS_MANAGERinstead ofBRANCH_MANAGER,CREDIT_ANALYSTinstead ofUNDERWRITER).
5-Pillar Scoring Weights
Weights must sum to 1.0. Default values and recommended adjustments:
| Pillar | Default | Nano | Employer-Based | Traditional |
|---|---|---|---|---|
| Repayment Behavior | 0.35 | 0.30 | 0.35 | 0.40 |
| Debt Capacity | 0.30 | 0.25 | 0.30 | 0.35 |
| Credit History | 0.15 | 0.20 | 0.15 | 0.15 |
| Financial Strength | 0.15 | 0.10 | 0.15 | 0.10 |
| Behavioral | 0.05 | 0.15 | 0.05 | 0.00 |
Credit Score Ranges
| Range | Tier | Description |
|---|---|---|
| 750–850 | Excellent | Eligible for configured pricing and an approval decision |
| 700–749 | Good | Standard rates |
| 650–699 | Fair | Higher rates, manual review |
| 550–649 | Poor | Likely decline or high rates |
| 300–549 | Very Poor | Auto-decline |
Quick Setup Checklist
For each product, complete these steps in order:
- Create base product — type, amounts, terms, interest, repayment
- Add fees — origination, processing, late payment, insurance
- Configure credit risk — pillar weights, DTI limits, auto-decision thresholds
- Configure approval chain — approval levels by amount threshold
- Update intake config — KYC/selfie requirements
- Add required documents — document checklist per stage
- Configure form fields — which fields to show in the application
- Configure disbursement — disbursement channel
- Configure workflow steps — step order, modes, roles, due days
- Add rework rules — which steps can be returned to, by whom, with which reason codes
- Configure notifications — borrower/assignee/role notifications per stage event
- Add rate tiers — optional, for risk-based pricing
- Set up auto-tagging — create attribute specs to auto-tag borrowers (see AUTO_TAGGING_SETUP_GUIDE.md)
- Add tag visibility rules — REQUIRE/EXCLUDE rules to control who sees this product
- Save and publish workflow — verify a new application freezes the intended task list
- Rehearse failure paths — rejected documents, incomplete KYC, retry, assessment, accepted terms, missing signatures, independent approval and funding confirmation
- Verify with schema endpoint —
GET /api/v1/products/:id/schema - Activate product — set
is_active: true
Offer preparation and issuance (September 2026)
Entering OFFER_PROPOSAL prepares a DRAFT automatically. Keep this step manual for staff review. The draft uses the latest final approving underwriting assessment (amount, term, term unit, annual percentage rate and conditions). A workflow without underwriting requires an approved saved credit assessment for this application. Missing approval blocks preparation; there is no fallback interest rate or client-supplied score override.
Staff review the draft in Term Proposals, then select Issue offer. Issuance records the actor and assessment evidence, starts the seven-day acceptance period and completes OFFER_PROPOSAL. Configure the next borrower OFFER_ACCEPTANCE step and its notification policy. Draft preparation itself does not notify the borrower or make the draft acceptable. Repeated preparation returns the same draft; use Refresh draft after assessment rework. Changed terms must return through underwriting rather than a separate manual offer form.
For existing applications already at the offer stage, opening Term Proposals prepares a missing draft. If preparation fails, the page shows the reason and a retry action. Apply tenant migration 254 before running this version.
The displayed installment follows the product repayment frequency and the term retains its actual unit, including days for nano loans. Mandatory fees are itemized separately from interest. Repayment dates calculated at preparation are indicative; origination must reconcile the accepted terms with the actual funding schedule and configured fee treatment.
Final approval and signed terms
At APPROVAL, use the application approval review. The amount, interest rate, term and term unit come from the latest accepted offer and are read-only. The agreement must be fully signed before approval; a missing lender or required witness signature keeps approval blocked. To change terms, use the configured return-to-offer workflow, obtain fresh acceptance and signatures, then return for approval.
Final approval enforces the product amount and term limits, the exact product term unit, a nonnegative interest rate with at most six decimal places, the configured approval role/quorum and maker/checker separation. There is no universal minimum term for large amounts, amount-per-month threshold or restriction on round amounts. Configure additional lending policy during assessment, before the offer is accepted.
For products requiring a guarantee, an active, effective, unexpired guarantee covering the accepted amount must already exist. Complete guarantee review before final approval. Final approval does not create a guarantee or apply another interest-rate discount after signing.
The signing session coordinates required participants for one agreement version and document hash. Use electronic signing with explicit consent; borrower and lender signatures are required, with any configured additional participants. Digital certificate signing and wet-signature uploads are not currently implemented signing options. Invitations must reference the current session; replaced sessions require fresh invitations. Origination and payment confirmation remain separate operations after approval.
A generated agreement with its document ready can be reviewed and signed directly in the borrower portal; sending an email invitation is optional. The borrower selects Review and sign agreement, reviews the document and provides electronic consent. Staff then open Term Proposals → Signing and use Sign as lender. The signing checklist refreshes while signatures are pending. Final approval remains blocked until all required participants have signed.
Automatic loan creation after final approval
Completing the application workflow queues loan creation in the same database transaction. No separate workflow step, product toggle or additional API call is required. The worker creates the loan from the approved and signed terms, including its schedule and accounts. It checks workflow completion and signed evidence again before creation. Failures remain queued and retry automatically; the approved application's panel shows progress, the failure reason and an authorized retry action. Repeated requests return the existing loan. The legacy auto_create_loan request flag is deprecated and does not disable this handoff.
Open the created loan to proceed with the disbursement request and its separate funding workflow. Automatic origination does not release funds.
Assigned funding workflow
Loan creation also creates a linked funding workflow. An available loan officer receives Prepare disbursement request in My Tasks, which opens the loan. Use Manage funding to confirm the payout destination and submit the request. Verification is assigned to an operations manager, release to a finance officer distinct from the requester and verifier, and transfer reconciliation to someone other than the releasing officer. An available tenant administrator can cover an unstaffed role while preserving these separations. Missing independent staff blocks setup with an actionable error; do not bypass it by editing task records.
The loan's funding checklist shows the current step and every assignee. The borrower can see the approved loan as Awaiting disbursement. It becomes active only after transfer confirmation and posting succeed; pre-funding schedules are provisional, and unfunded loans are excluded from scheduled payment selection.