Skip to main content

Admin-Assisted Loan Creation

Overview​

These commands allow a back-office administrator to create a loan application on behalf of a customer — either an existing channel customer or a brand-new walk-in customer.

The admin must have the Channels.AdminCreateLoanOnBehalf permission ("chn_admin_create_loan_on_behalf").

Typical workflow:

1. AdminCreateLoanForNewCustomerBpmCommand ← new walk-in customer
OR
AdminCreateLoanForExistingCustomerBpmCommand ← existing channel customer
↓
2. (Optional) AdminSendWelcomeEmailToCustomerBpmCommand ← send login credentials
↓
3. Existing loan approval workflow continues as normal

AdminCreateLoanForNewCustomerBpmCommand​

Creates a new SelfServiceUser profile (CUSTOMER classification) and a loan quote in a single operation.
The customer account is immediately Active. No OTP is required — the admin is the verified party.
A hashed temporary password is set on the account but not returned in the response; use AdminSendWelcomeEmailToCustomerBpmCommand to deliver credentials to the customer.

Request​

{
"cmd": "AdminCreateLoanForNewCustomerBpmCommand",
"data": {
"firstName": "Adaeze",
"lastName": "Okonkwo",
"middleName": "Grace",
"mobileNumber": "08031234567",
"mobileCountryCode": "+234",
"emailAddress": "adaeze.okonkwo@example.com",
"dateOfBirth": "1990-04-15",
"gender": "Female",
"biometricsId": "22345678901",
"productCode": "PERSONAL_LOAN_01",
"loanAmount": 500000,
"loanTenor": 12,
"loanTenorType": 2,
"branchId": 3
}
}

Request Fields​

FieldTypeRequiredDescription
firstNamestringYesCustomer first name
lastNamestringYesCustomer last name
middleNamestringNoCustomer middle name
mobileNumberstringYesMobile number (digits only, no country code prefix)
mobileCountryCodestringYese.g. "+234"
emailAddressstringYesMust be unique across all channel customers
dateOfBirthstringYesISO date format: "YYYY-MM-DD"
genderstringYese.g. "Male" / "Female"
biometricsIdstringYesBVN — must be unique. Validated against core banking.
productCodestringYesLoan product code from YAML configuration
loanAmountdecimalYesRequested loan amount
loanTenorintYesLoan duration as a number
loanTenorTypeintYes0 = Days, 1 = Weeks, 2 = Months, 3 = Years
branchIdlongNoBranch to assign. Defaults to the admin's own branch, then the system default.

Uniqueness Validation​

The system rejects the request if any of the following already exist on another SelfServiceUser:

  • emailAddress
  • biometricsId (BVN)
  • mobileNumber

Response​

{
"isSuccessful": true,
"statusCode": "00",
"message": "Customer profile and loan application created successfully. Use 'Send Welcome Email' to deliver login credentials to the customer.",
"data": {
"selfServiceUserId": 2048,
"userId": "adaeze.okonkwo@example.com",
"loanQuoteId": 501,
"requestId": "02048PERSONAL_LOAN_01218",
"productCode": "PERSONAL_LOAN_01",
"loanAmount": 500000
}
}

AdminCreateLoanForExistingCustomerBpmCommand​

Creates a loan quote for an existing channel customer. Supply at least one lookup identifier.

Request​

{
"cmd": "AdminCreateLoanForExistingCustomerBpmCommand",
"data": {
"emailAddress": "adaeze.okonkwo@example.com",
"productCode": "PERSONAL_LOAN_01",
"loanAmount": 250000,
"loanTenor": 6,
"loanTenorType": 2,
"branchId": 3
}
}

Customer Lookup Fields (at least one required)​

FieldTypeDescription
selfServiceUserIdlongDatabase ID of the SelfServiceUser
emailAddressstringRegistered email address
mobileNumberstringRegistered mobile number
biometricsIdstringBVN

Loan Fields​

FieldTypeRequiredDescription
productCodestringYesLoan product code
loanAmountdecimalYesRequested amount
loanTenorintYesDuration
loanTenorTypeintYes0=Days, 1=Weeks, 2=Months, 3=Years
branchIdlongNoDefaults to admin's branch

Validation​

  • Customer must have UserClassification == CUSTOMER
  • Customer must not be BlackListed or Deactivated
  • BVN is re-validated against core banking if present

AdminSendWelcomeEmailToCustomerBpmCommand​

Sends a welcome email to a channel customer. Generates a fresh temporary password, saves it to the customer's account, and emails it to them in plaintext.
This command is independent of loan creation — it can be triggered at any time after account creation.

Request​

{
"cmd": "AdminSendWelcomeEmailToCustomerBpmCommand",
"data": {
"selfServiceUserId": 2048,
"subject": "Welcome to EmpireTrust Digital Banking",
"message": "Please visit any of our branches to complete your KYC."
}
}

Request Fields​

FieldTypeRequiredDescription
selfServiceUserIdlongYesThe SelfServiceUser.Id of the customer
subjectstringNoEmail subject override. Defaults to "Welcome — Your channel account is ready"
messagestringNoExtra paragraph appended to the standard email body

What it does​

  1. Generates a new 10-character temporary password
  2. Hashes it and saves it as the customer's current password
  3. Clears any login blocks (IsPasswordBlocked = false, FailedLoginAttempts = 0)
  4. Emails the plaintext temporary password to the customer's registered email
  5. Does not return the password in the API response

Response​

{
"isSuccessful": true,
"statusCode": "00",
"message": "Welcome email sent to 'adaeze.okonkwo@example.com'. The customer can now log in with their new temporary password.",
"data": {
"selfServiceUserId": 2048,
"emailAddress": "adaeze.okonkwo@example.com"
}
}