ReturnToPreviousLevelCommand
Overview​
Returns a loan application to the previous approval level for revision. Differs from rejection — the loan remains active and can continue through the workflow after corrections are made.
Authorization​
Caller must hold: Branch Manager, Area Manager, Division Manager, Credit Admin, Head Credit Admin, Control Officer, Finance, MD, or GMD role.
Command Structure​
{
"cmd": "ReturnToPreviousLevelCommand",
"data": "{\"loanRequestId\":110,\"comment\":\"Additional salary documents required before area-level approval\"}"
}
Parameters​
| Parameter | Type | Required | Description |
|---|---|---|---|
loanRequestId | long | Yes | ID of the loan application |
comment | string | Yes | Mandatory reason for returning |
Validations​
- Loan must be in
PendingApproval,PartialApproval, orReturnedstate - Caller must hold a return-capable role with appropriate branch access
Process​
- Validates loan state and caller role
- Checks for an active workflow
UserTask— signals it withoutcome=returnedif found - Sets
ApprovalState→Returned - Records the return action in approval history with comment
- Persists changes
Difference from RejectLoanRequestCommand​
| Action | State after | Can proceed? |
|---|---|---|
RejectLoanRequestCommand | Rejected — final | No |
ReturnToPreviousLevelCommand | Returned — revisable | Yes, after corrections |
Response​
{
"ok": true,
"statusCode": "00",
"message": "Loan request returned to previous level.",
"outData": {
"LoanRequestId": 110,
"comment": "Additional salary documents required before area-level approval"
}
}