How the decisioning works
Reference page with details on our decisioning logic, fetching data, and coming to a decision
๐ In this section, you will...โ
- Review the app's decisioning logic,
- Understand how we fetch the required data,
- See how the app makes a decision based on that data.
Review the app's decisioning logicโ
Each lender usually has their own set of data points they use to review an application.
The loan qualification model we use as our example in the LoanUnderwriter service is a rules-based model that requires certain thresholds to be passed for gross profit margin, revenue, and gearing ratio. The threshold values for these data points are maintained in appsettings.json
.
It also requires validated application details and the company's fully categorized accounts.
- Gross profit margin
- Revenue
- Gearing ratio
Gross profit margin uses Income.Operating
values and Expense.CostOfSales
values returned by Lending' profitAndLoss
endpoint. It is calculated by subtracting the cost of sales from net sales and dividing the resulting gross profit by net sales. It is then expressed by a ratio and indicates a businessโs profitability.
Its threshold is maintained as MinGrossProfitMargin
in appsettings.json
. In the demo app, the value is set to 0.4.
The revenue relies on the profitAndLoss
endpoint and the Income.Operating
value returned by it, together with loanAmount
and loanTerm
values provided in the application form. It uses operating income value to determine whether the companyโs monthly revenue covers the proposed monthly repayment to a sufficient threshold. It can serve as a useful indicator of overall business growth.
Its threshold is maintained as RevenueThreshold
in appsettings.json
. In the demo app, the value is set to 0.3.
The gearing ratio used in the example model is the debt ratio, calculated byย dividing total debt by total assets. It uses the balanceSheet
endpoint and its Asset
and Liability.NonCurrent.LoansPayable
values. Having too much debt may indicate a higher financial risk associated with the company.
Its threshold is maintained as MaxGearingRatio
in appsettings.json
. In the demo app, the value is set to 0.5.
See how we fetch financial dataโ
Codat supports automatic loan decision-making by providing the data required to calculate the ratios described previously. To fetch the required data, we use Lending's Enhanced Profit and Loss and Enhanced Balance Sheet endpoints for analysis. The {companyId}
used in the endpoint call is the same id
as previously returned by the /applications/start
endpoint.
GET https://api.codat.io/data/companies/{companyId}/connections/{connectionId}/lending/enhancedProfitAndLoss
GET https://api.codat.io/data/companies/{companyId}/connections/{connectionId}/lending/enhancedBalanceSheet
Both endpoints require a reportDate
, periodLength
, and numberOfPeriods
as query parameters. The loan application's createdDate
is used where the year and previous month are set as the reportDate
. This ensures that a full year of financial data is returned by Codat. In addition, includeDisplayNames
parameter is set to true
in the request because it allows accounts to be accessed via Codat's standardized taxonomy display names.
Once both enhanced data types have been fetched, they are passed to the LoanUnderwriter service together with the application's loan amount and term length. This is to perform an assessment of the prospective borrower's creditworthiness and make a decision on their application.
Understand how we generate an automatic decisionโ
Once the demo app fetches the data, it uses the results to calculate the data points we use in our loan qualification model: gross profit margin, revenue, and gearing ratio. In the loan qualification industry, there are other models and data points that can be used to make a decision. The selection depends on the needs of your business.
The LoanUnderwriter service then checks how these values compare to the thresholds set in the app:
- Gross profit margin must be more than
MinGrossProfitMargin
threshold set to 0.4, - Revenue must exceed the
RevenueThreshold
set to 0.3, and - Gearing ratio must be below the
MaxGearingRatio
threshold set to 0.5.
Only if all the thresholds are met or surpassed by the applicant, the app updates the loan request automatically with an Accepted status. Otherwise, the application is updated with a Rejected status. The app also caters for a scenario of programmatic errors that means a decision could not be made with a UnderwritingFailure status.
Access additional resourcesโ
๐๏ธ You may want to enhance this simple working guide with some UI elements - why not use Embedded Link to seamlessly include our authorization journey into your app?
๐ If you are interested in loan qualification models used by lenders in the industry, you can read through Bigfoot Capital's blog on revenue-based finance or Workweek's article on unlocking loan qualification innovation.
๐ธ Lenders also use Lending to understand a business' liquidity via the enhanced cash flow report, or whether a business's accounts are accurate using both data integrity and the audit report.
๐ง See what else Codat recommends to build your loan qualification process effectively.
๐ฃ๏ธ Anything unclear in this guide? Got feedback? We're working on a whole host of new content for you, so let us know.
Recapโ
In this reference section, you have learned and understood in detail the data points we chose for our loan qualification model, how we fetched the data used in the calculation of these data points, and how all of this influenced the decision on the loan made automatically.
Next, you can find out more about Lending, or explore other use cases.