Skip to main content

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​

ParameterTypeRequiredDescription
loanRequestIdlongYesID of the loan application
commentstringYesMandatory reason for returning

Validations​

  • Loan must be in PendingApproval, PartialApproval, or Returned state
  • Caller must hold a return-capable role with appropriate branch access

Process​

  1. Validates loan state and caller role
  2. Checks for an active workflow UserTask — signals it with outcome=returned if found
  3. Sets ApprovalState → Returned
  4. Records the return action in approval history with comment
  5. Persists changes

Difference from RejectLoanRequestCommand​

ActionState afterCan proceed?
RejectLoanRequestCommandRejected — finalNo
ReturnToPreviousLevelCommandReturned — revisableYes, 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"
}
}