Product Setup
Salary Loan Product Setup Guide
This guide walks you through configuring a Salary Loan Product in Hiana Loans, where employees apply for loans and their employers approve or decline the application.
Overview
Use the complete employer-backed configuration guide as the implementation and acceptance checklist. The former three-step example was incomplete: document upload, employer approval and final approval do not cover document review, identity checks, credit assessment, offers, consent or agreement signing.
The full journey is submission → document review → identity verification → employer verification → credit/underwriting → borrower offer acceptance → consent → agreement signatures → final internal approval → loan origination → separate funding workflow → servicing → closure.
Employer approval delivery (10 September 2026): the code now connects normal task completion to durable employer-request preparation. Apply tenant migration 000237_external_approval_delivery and restart the updated API/workers. The complete guide describes task-bound approval levels, confirmation links, retries and the acceptance rehearsal. Existing frozen workflows are not rewritten and historical emails are not resent.
Step 1: Create the Product
- Go to Admin → Loan Products
- Click Create Product
- Enter:
- Product Name: e.g., "Salary Loan"
- Description: e.g., "Loans for salaried employees with employer approval"
- Interest Rate: e.g., 12.5% per annum
- Term: e.g., 12 months
- Repayment Frequency: Monthly
- Click Save
Step 2: Configure Workflow (Critical for Employer Approval)
Select DOCUMENT REVIEW in Step Type; the API value is DOCUMENT_REVIEW. Offer, consent and agreement types are available in the same dropdown. CREDIT_CHECK must use AUTOMATED mode with credit_decision. See the complete guide for each operational screen and the exact document-rework rule.
Go to Product Configuration → Workflow. Configure the complete sequence below; the detailed ownership, evidence and notification settings are in the complete configuration guide.
| Order | Canonical step key | Step type | Mode | Responsible role | Approval level |
|---|---|---|---|---|---|
| 1 | document_upload | DOCUMENT_UPLOAD | MANUAL | LOAN_OFFICER | — |
| 2 | document_review | DOCUMENT_REVIEW | MANUAL | LOAN_OFFICER | — |
| 3 | kyc_verification | KYC_CHECK | MANUAL | COMPLIANCE_OFFICER | — |
| 4 | fraud_screening | FRAUD_CHECK | AUTOMATED (fraud_screening) | CREDIT_ANALYST | — |
| 5 | employer_approval | APPROVAL | APPROVAL | Employer representative; staff monitor separately | 1 |
| 6 | credit_check | CREDIT_CHECK | AUTOMATED (credit_decision) | CREDIT_ANALYST | — |
| 7 | underwriting | UNDERWRITING | MANUAL | CREDIT_ANALYST | — |
| 8 | offer_proposal | OFFER_PROPOSAL | MANUAL | LOAN_OFFICER | — |
| 9 | offer_acceptance | OFFER_ACCEPTANCE | MANUAL | Borrower responds; LOAN_OFFICER monitors | — |
| 10 | consent_capture | CONSENT_CAPTURE | MANUAL | Borrower action; LOAN_OFFICER monitors | — |
| 11 | agreement_generation | AGREEMENT_GENERATION | MANUAL | Borrower/lender signatures; LOAN_OFFICER monitors | — |
| 12 | approval | APPROVAL | APPROVAL | OPERATIONS_MANAGER | 2 |
Set the top-level Approval Levels field (in the Workflow tab) to 2. Then on each APPROVAL step, set its Approval Level input: employer_approval (step 5) → level 1, approval (step 12) → level 2. Finally, open the Approval tab and configure each level's required role, required count, and timeout — level 1 uses EMPLOYER, level 2 uses OPERATIONS_MANAGER. Save both tabs before publishing. A role assigned to monitor a task does not replace the actual signer/checker. Use EMPLOYER for the external approval chain identity where an employer portal representative is configured; assigning LOAN_OFFICER does not make that officer an employer. fraud_screening (step 4) is optional — include it when your credit-risk policy requires fraud screening; omit it if your policy does not use it.
For each step, configure the notification policy (stage_entry, stage_completion, rework, assignment) using the per-step table in the complete configuration guide. Key points: notify the borrower on stage_entry for steps they must act on (document upload, offer proposal, offer acceptance, consent, agreement); add the EMPLOYER role to stage_entry and assignment for the employer_approval step; leave automated steps (credit_check) without staff notifications.
Configure rework rules per step using the per-step rework table in the complete configuration guide. Key rules: document_review → document_upload (document corrections), kyc_verification → document_upload (identity recapture), employer_approval → document_upload (employment corrections), underwriting → document_upload (income evidence, with credit_decision_compensation if credit_check is crossed), offer_acceptance → offer_proposal (counteroffer), and approval → offer_proposal (final approval rejects terms).
Step order defines sequential routing. Reusing an approval-level number does not create parallel branches in this single-cursor workflow. Required approvals define the quorum within the relevant approval group.
Save the draft configuration first. Complete all related tabs, then publish the immutable version. Keep DISBURSEMENT out of the application sequence: funding has its own linked workflow after origination.
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.
Step 3: Configure Approval Chain (Required Before Publishing)
The workflow's APPROVAL steps reference approval levels, but the Approval tab defines who approves at each level and how many approvals are required. The backend will reject publishing if this is not configured.
Go to: Product Configuration → Approval tab
The level_name is a display label — name it whatever makes sense to your team. It shows up in the admin UI and approval task descriptions. Routing is driven by the level number, not the name.
Level 1: Employer Confirmation
| Field | Value |
|---|---|
| Level | 1 |
| Level Name | Employer Approval |
| Required Role | EMPLOYER |
| Required Approvals | 1 |
| Min Amount | 0 |
| Max Amount | (leave blank for no limit) |
| Timeout (Hours) | 72 (3 days) |
Level 2: Operations Manager Sign-off
| Field | Value |
|---|---|
| Level | 2 |
| Level Name | Operations Manager Sign-off |
| Required Role | OPERATIONS_MANAGER |
| Required Approvals | 1 |
| Min Amount | 0 |
| Max Amount | (leave blank for no limit) |
| Timeout (Hours) | 48 (2 days) |
Click Save Configuration.
Publish Workflow (Required Before Applications Can Be Submitted)
Now go back to the Workflow tab and click Publish immutable version.
Why Publishing Is Required
Saving the workflow configuration only stores a draft. The system does not use the draft when processing loan applications. Instead, it looks for a published immutable version — a snapshot of the workflow that cannot be changed after publication.
When a borrower submits an application, the backend fetches the published workflow definition for the product. If no published version exists, the application will fail with the error:
product has no published application workflow
How It Works
- Save stores the workflow configuration as a draft that can be edited freely.
- Publish creates an immutable snapshot with a version number and a SHA-256 hash. This is the version the system uses when creating applications.
- If you need to change the workflow later, update the draft and publish again — this creates a new version. Existing applications continue on the version they were created with; new applications use the latest published version.
Publishing Order
Make sure all dependent configurations are saved before publishing:
- Workflow tab — save the workflow steps and approval levels
- Approval tab — save the approval chain (who approves at each level)
- Workflow tab — click Publish immutable version
The backend validates cross-references at publish time. If any APPROVAL step references approval levels that don't exist in the Approval tab, publishing will be rejected.
Important: If you get a validation error like
"approval step has no approval levels", it means the Approval tab has not been configured. The backend checks the Approval Chain configuration (not the workflow step's approval_level field) when publishing. Make sure you've added approval levels in the Approval tab and saved before publishing.
Note: The top-level approval_levels in the Workflow tab must equal the highest approval_level among your steps. If you have levels 1 and 2, set approval_levels to 2. The Approval tab levels must cover all levels referenced by your workflow steps.
Step 4: Configure Guarantor Settings
Go to: Product Configuration → Guarantor tab
Employer Verification Settings
-
Check "Requires Employer Verification"
-
Check "Employer Must Pre-Approve"
-
In the "Employer Verification Step" dropdown, select:
Employer Approval- This dropdown is populated from the workflow steps you just created
- It tells the system which step sends the approval email to the employer
-
For this MOU-backed baseline, enable "Requires MOU with Employer" and configure an active linked MOU.
Click Save Configuration.
Step 5: Configure Other Product Settings
Complete the remaining tabs as needed:
| Tab | Purpose |
|---|---|
| Documents | Which documents employees must upload (payslips, ID, employment letter, etc.) |
| Intake | Borrower information form (name, phone, email, etc.) |
| Form | Custom application form fields |
| Disbursement | How and where the loan is disbursed (bank account, mobile money, etc.) |
| Credit Risk | Credit scoring weights and auto-approval thresholds |
| Affordability | Debt-to-income ratio limits |
| Approval | Who approves at what loan amount |
| Payment | Payment terms and methods |
| Fees | Origination, processing, insurance fees |
| Rate Tiers | Interest rate tiers based on loan amount or term |
Step 6: Configure Pre-Disbursement Checklist
Before a loan can be disbursed, the system verifies that all required checks and documents are complete. The pre-disbursement checklist is a product-level template — when a loan is approved, the system creates a checklist instance from this template. All required items must be marked as completed before disbursement can proceed.
Go to: Product Configuration → Checklist tab
Click Create Checklist Template and configure the following items:
| # | Item Name | Type | Required | Purpose |
|---|---|---|---|---|
| 1 | National ID Verification | DOCUMENT_VERIFY | Yes | Confirm borrower identity |
| 2 | Employment Confirmation Letter | DOCUMENT_VERIFY | Yes | Verify current employment with the MOU employer |
| 3 | Employer Authorization / Salary Deduction Mandate | DOCUMENT_VERIFY | Yes | Signed mandate authorizing employer to deduct repayments from salary |
| 4 | Latest Payslip (≤30 days old) | DOCUMENT_VERIFY | Yes | Proof of income and affordability |
| 5 | Bank Statement (3 months) | DOCUMENT_VERIFY | Yes | Verify salary deposits and existing obligations |
| 6 | Credit Bureau Check | CREDIT_CHECK | Yes | Check for existing defaults or excessive exposure |
| 7 | Employer MOU Validity Check | COMPLIANCE_CHECK | Yes | Confirm the MOU with the employer is active and covers this loan type |
| 8 | Fraud / Blacklist Screening | FRAUD_CHECK | Yes | Check borrower against internal/external fraud lists |
| 9 | Guarantor Consent (if applicable) | DOCUMENT_VERIFY | No | Only required if the product has a guarantor |
| 10 | Loan Agreement Signing | DOCUMENT_VERIFY | Yes | Signed loan contract before disbursement |
| 11 | Disbursement Account Verification | DOCUMENT_VERIFY | Yes | Confirm borrower's bank account details for transfer |
| 12 | Salary Deduction Setup Confirmation | COMPLIANCE_CHECK | Yes | Payroll/HR confirmed the deduction is configured for the next pay cycle |
Item Types Explained
| Type | Description |
|---|---|
DOCUMENT_VERIFY | Staff verifies a specific document (ID, payslip, signed mandate, etc.) |
CREDIT_CHECK | Staff runs and reviews a credit bureau report |
FRAUD_CHECK | Staff screens the borrower against fraud/blacklist databases |
COMPLIANCE_CHECK | Staff confirms a regulatory or policy requirement is met (MOU validity, payroll setup) |
Key Items for Employer-Based Lending
Items 3, 7, and 12 are specific to employer-based (salary deduction) loans:
- Item 3 — Salary Deduction Mandate: The borrower signs a mandate authorizing the employer to deduct loan repayments from their salary. Without this, the repayment mechanism doesn't exist.
- Item 7 — Employer MOU Validity Check: Confirms the Memorandum of Understanding with the employer is still active. MOUs can expire or be terminated — this check prevents disbursing a loan that can't be repaid via salary deduction.
- Item 12 — Salary Deduction Setup Confirmation: The employer's payroll/HR department confirms the deduction has been configured in their payroll system for the next pay cycle. This is the final operational check before funds are released.
API Example
POST /api/v1/products/{product_id}/checklist-templates
{
"template_name": "Salary Loan Pre-Disbursement Checklist",
"description": "Standard checklist for MOU-backed salary deduction loans",
"items": [
{ "item_name": "National ID Verification", "item_type": "DOCUMENT_VERIFY", "is_required": true, "display_order": 1 },
{ "item_name": "Employment Confirmation Letter", "item_type": "DOCUMENT_VERIFY", "is_required": true, "display_order": 2 },
{ "item_name": "Employer Authorization / Salary Deduction Mandate", "item_type": "DOCUMENT_VERIFY", "is_required": true, "display_order": 3 },
{ "item_name": "Latest Payslip (≤30 days)", "item_type": "DOCUMENT_VERIFY", "is_required": true, "display_order": 4 },
{ "item_name": "Bank Statement (3 months)", "item_type": "DOCUMENT_VERIFY", "is_required": true, "display_order": 5 },
{ "item_name": "Credit Bureau Check", "item_type": "CREDIT_CHECK", "is_required": true, "display_order": 6 },
{ "item_name": "Employer MOU Validity Check", "item_type": "COMPLIANCE_CHECK", "is_required": true, "display_order": 7 },
{ "item_name": "Fraud / Blacklist Screening", "item_type": "FRAUD_CHECK", "is_required": true, "display_order": 8 },
{ "item_name": "Guarantor Consent (if applicable)", "item_type": "DOCUMENT_VERIFY", "is_required": false, "display_order": 9 },
{ "item_name": "Loan Agreement Signing", "item_type": "DOCUMENT_VERIFY", "is_required": true, "display_order": 10 },
{ "item_name": "Disbursement Account Verification", "item_type": "DOCUMENT_VERIFY", "is_required": true, "display_order": 11 },
{ "item_name": "Salary Deduction Setup Confirmation", "item_type": "COMPLIANCE_CHECK", "is_required": true, "display_order": 12 }
]
}
How It Works in the Workflow
- After loan origination, verify that the funding process creates the product checklist instance for that loan before release. Application approval alone is not funding confirmation.
- Loan officers see the checklist items in their dashboard under the loan.
- Each item is marked as Completed, Failed, or Skipped (optional items only).
- The loan cannot be disbursed until all required items are marked as Completed.
- Once all required items are complete, the checklist is approved and disbursement can proceed.
Note: Optional items (like Guarantor Consent) can be skipped without blocking disbursement. Required items that fail will block disbursement and trigger a review.
Step 7: Set Up QuickBooks Integration (Accounting)
Go to: Accounting → Account Mappings
Map internal account codes to your QuickBooks accounts:
| Internal Code | QB Account Type | QB Account Name | Example QB ID |
|---|---|---|---|
CASH | Bank | Operating Bank Account | 1150040000 |
LOANS_RECEIVABLE | Other Current Asset | Loans Receivable | 1150040001 |
INTEREST_INCOME | Income | Interest Income | 1150040002 |
FEE_INCOME | Income | Fee Income | 1150040003 |
INTEREST_RECEIVABLE | Other Current Asset | Interest Receivable | 1150040004 |
FEES_RECEIVABLE | Other Current Asset | Fees Receivable | 1150040005 |
PENALTIES_RECEIVABLE | Other Current Asset | Penalties Receivable | 1150040006 |
See QUICKBOOKS_ACCOUNT_SETUP_GUIDE.md for detailed instructions on finding QB Account IDs.
How the Approval Process Works
The complete configuration guide defines the intended sequence and the current engineering blockers. Run its acceptance rehearsal before enabling employer invitations.
- Employee submits; the system acknowledges receipt and displays application status.
- Staff review required documents and complete aggregate identity verification.
- At
employer_approval, the intended behavior is an employer-specific approval request and secure email. Verify the task-boundEMPLOYER_APPROVALrow and delivery outbox entry; generic staff tasks do not prove it occurred. - Employer confirmation allows credit assessment and underwriting to proceed. It does not grant final loan approval.
- Borrower reviews/accepts the offer, supplies required consent and signs the agreement. The lender and required witnesses sign too.
- Independent internal approval completes the application workflow. Staff then originate the loan using the accepted matching terms and signed agreement.
- Finance completes the separate funding checklist and release/confirmation process. A loan is not active merely because an operations manager approved an application.
- Servicing records repayments and manages arrears, settlement and closure.
Email Templates
Employer Approval Email
The employer request template should produce a message like this after the request/delivery path has passed acceptance testing:
Subject: Loan Approval Request - [Employee Name]
Dear [Employer Name],
[Employee Name] from your organization has applied for a salary loan.
Loan Details:
- Amount: KES 50,000
- Term: 12 months
- Monthly Payment: KES 4,500
- Interest Rate: 12.5% per annum
Please review and approve or decline:
[APPROVE] [DECLINE]
This link expires at the configured approval deadline.
Thank you,
Hiana Loans
Disbursement Checklist
The funding gate is configured per product on the Disbursement Checklist tab (API GET/POST/PUT /api/v1/products/:id/checklist-template). 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. A typical salary-loan template:
| # | Item | Type | Required |
|---|---|---|---|
| 1 | Employment and income evidence current (recent payslip) | DOCUMENT_VERIFY | Yes |
| 2 | Employer confirmation recorded (where employer approval is enabled) | DOCUMENT_VERIFY | Yes |
| 3 | Salary-deduction mandate / consent signed | DOCUMENT_VERIFY | Yes |
| 4 | Loan agreement signed by all required parties | DOCUMENT_VERIFY | Yes |
| 5 | Instalment within deduction cap and affordability limits | CREDIT_CHECK | Yes |
| 6 | Credit decision still in force (not reworked or expired) | CREDIT_CHECK | Yes |
| 7 | Fraud screening cleared, no open flags | FRAUD_CHECK | Yes |
| 8 | Verified payout destination (bank account or wallet confirmed) | OTHER | Yes |
| 9 | Consents and disclosures acknowledged by the borrower | DOCUMENT_VERIFY | Yes |
| 10 | Independent release authorization (maker-checker sign-off) | COMPLIANCE_CHECK | Yes |
| 11 | Transfer confirmation evidence captured (provider reference) | OTHER | Yes |
Suggested item names in display order:
Employment and income current
Employer confirmation recorded
Deduction mandate signed
Agreement signed
Within deduction cap
Credit decision in force
Fraud screening cleared
Payout destination verified
Consents acknowledged
Independent release authorization
Transfer confirmation captured
Troubleshooting
"Employer Verification Step" dropdown is empty
- Cause: No workflow steps configured yet
- Fix: Go to Workflow tab and add at least one step, then save
Employer doesn't receive approval email
Check the employer-specific approval record first, then the notification record, provider delivery and inbox. For the application inspected on 10 September 2026, the required product switch and contact email were present but the employer-specific request was absent. That was the pre-repair wiring gap. Deploy the repair and test a correctly configured application; the old frozen workflow is not backfilled. See delivery diagnosis and operations.
Application stuck in "Employer Approval" step
Distinguish a missing request, undelivered message, unanswered request, expired token and unsatisfied approval group. Escalate using the configured timeout. Do not manually move past mandatory employer approval to make the application proceed. Any repaired/resend operation must be authorized and auditable.
Employer declines but employee should resubmit with different terms
- Cause: Employer declined the original loan amount or terms
- Fix: Operations Manager can use the Rework operation to send the application back to Document Upload for the employee to update the requested amount. See
POST /api/v1/applications/:id/workflow/reworkwithtarget_step_key: "document_upload"and an appropriate reason code. The employee then resubmits viaPOST /api/v1/applications/:id/workflow/resubmit.
Application needs correction after employer approval
- Cause: Documents are incomplete or incorrect after employer approved
- Fix: Operations Manager can rework the application back to Document Upload without restarting the entire workflow. Reassess employer and downstream approval evidence affected by the correction. Do not assume approval remains valid after material employment, amount or term changes.
Best Practices
-
Set realistic due days:
- Document Upload: 7 days (employees need time to gather documents)
- Employer Approval: 72 hours as an initial operational target; agree it with the employer
- Final Approval: 2 working days as an initial operational target
-
Test the workflow:
- Create a test application and verify emails are sent correctly
- Check that employer approval buttons work
-
Communicate with employers:
- Send employers a welcome email explaining the process
- Provide a phone number for questions
-
Monitor approval times:
- Track how long each step takes
- Adjust due days if needed
Next Steps
- Save the product configuration (all tabs)
- Test with a sample application to verify the workflow
- Train loan officers on the approval process
- Notify employers about the new approval system
- Monitor the first few applications to ensure everything works
Support
For questions or issues:
- Contact the Hiana Loans support team
- Check the LOAN_PRODUCT_SETUP_GUIDE.md for general product configuration
- Check the AUTO_TAGGING_SETUP_GUIDE.md for auto-tagging setup (e.g., civil servants, MNO staff, MOU partners)
- Check the PRODUCT_WORKFLOW_SETUP_GUIDE.md for workflow operations (rework, resubmit, recovery, pipeline analytics, collections)
- Check the QUICKBOOKS_ACCOUNT_SETUP_GUIDE.md for accounting integration
- Check the LOAN_SERVICING_OPERATIONS_GUIDE.md for post-disbursement operations (waivers, top-ups, delinquency pause, re-aging, maker-checker, floating rates)