LendWorksLendWorksDocs

Health Scoring

Understand the 12-factor health scoring system, MCA detection, underwriting decisions, and how composite scores map to letter grades.

Composite Score

Every analyzed deal receives a composite health score from 0 to 100 and a letter grade. The score is computed from 12 weighted sub-factors extracted from the uploaded financial documents.

GradeScore RangeInterpretation
A80-100Strong financial health — low risk, favorable terms
B60-79Moderate health — acceptable risk, standard terms
C40-59Weak health — elevated risk, conservative terms
D0-39Poor health — high risk, likely decline or heavy conditions

Accessing Scores

TypeScript
const deal = await client.deals.get(12345);

console.log(deal.health.health_score);  // 78.5
console.log(deal.health.health_grade);  // "B"

// Iterate sub-factors
for (const [name, factor] of Object.entries(deal.health.factors || {})) {
  console.log(`${name}: ${factor.score}/${factor.max} (weight: ${factor.weight})`);
}
Python
deal = client.deals.get(12345)

print(deal.health.health_score)  # 78.5
print(deal.health.health_grade)  # "B"

# Iterate sub-factors
for name, factor in deal.health.factors.items():
    print(f"{name}: {factor.score}/{factor.max} (weight: {factor.weight})")

Factor Breakdown

Each sub-factor contributes to the composite score based on its weight. Factors are scored independently and then combined.

FactorWeightWhat It Measures
Revenue Quality24%Consistency and growth of monthly deposits
NSF Cleanliness12%Frequency and severity of NSF/overdraft events
ADB Stability8%Average daily balance consistency across months
Negative Days8%Number of days with negative balance
Deposit Consistency8%Regularity of deposit patterns
Screening Flags5%Presence of suspicious or flagged transactions
Deposit Quality4%Proportion of organic revenue vs. transfers/loans

Tip: Factor weights can be customized per ruleset. When evaluating a deal against a custom ruleset, the composite score is recalculated using the ruleset's weight configuration.


MCA Detection

LendIQ scans transaction data against a database of 200+ known MCA lender patterns. It identifies existing positions, calculates total daily obligations, and produces a fundability grade that factors into the underwriting decision.

Accessing MCA Data

TypeScript
const deal = await client.deals.get(12345);

console.log(deal.mca?.positions_detected);      // 2
console.log(deal.mca?.total_daily_obligation);  // 450.00
console.log(deal.mca?.mca_credit_score);        // 72
console.log(deal.mca?.fundability_grade);       // "B"
Python
deal = client.deals.get(12345)

print(deal.mca.positions_detected)      # 2
print(deal.mca.total_daily_obligation)  # 450.00
print(deal.mca.mca_credit_score)        # 72
print(deal.mca.fundability_grade)       # "B"

MCA Fields

NameTypeRequiredDescription
positions_detectednumberYesNumber of active MCA positions identified in transactions
total_daily_obligationnumberYesSum of all detected daily MCA payments ($)
mca_credit_scorenumberYesMCA-specific credit score (0-100) factoring position count and obligation ratio
fundability_gradestringYesLetter grade (A-D) indicating fundability given existing positions

Info: MCA detection runs automatically as part of the 12-stage pipeline. No additional configuration is needed. The lender pattern database is updated continuously.


Underwriting Decisions

Decision Types

DecisionDescription
approvedDeal meets all criteria — recommended terms are provided
conditionalDeal meets most criteria but has flags — terms provided with conditions
declinedDeal fails one or more hard decline rules
pendingAnalysis is still in progress

Recommendation Object

NameTypeRequiredDescription
decisionstringYes"approved" | "conditional" | "declined" | "pending"
confidencenumberYesConfidence level (0-1) in the decision
risk_tierstringYesRisk classification: "tier_1" (lowest) through "tier_4" (highest)
advance_amountnumberNoRecommended maximum advance ($)
factor_ratenumberNoRecommended factor rate (e.g., 1.35)
est_daily_paymentnumberNoEstimated daily payment based on advance and factor rate ($)
risk_factorsstring[]YesList of identified risk factors (e.g., "high_mca_exposure")
strengthsstring[]YesList of identified strengths (e.g., "consistent_deposits")

Accessing Recommendations

TypeScript
const deal = await client.deals.get(12345);

if (deal.recommendation) {
  console.log(deal.recommendation.decision);         // "approved"
  console.log(deal.recommendation.confidence);       // 0.87
  console.log(deal.recommendation.risk_tier);        // "tier_2"
  console.log(deal.recommendation.advance_amount);   // 50000
  console.log(deal.recommendation.factor_rate);      // 1.35
  console.log(deal.recommendation.est_daily_payment); // 375.00
  console.log(deal.recommendation.risk_factors);     // ["high_mca_exposure"]
  console.log(deal.recommendation.strengths);        // ["consistent_deposits"]
}
Python
deal = client.deals.get(12345)

if deal.recommendation:
    print(deal.recommendation.decision)         # "approved"
    print(deal.recommendation.confidence)       # 0.87
    print(deal.recommendation.risk_tier)        # "tier_2"
    print(deal.recommendation.advance_amount)   # 50000
    print(deal.recommendation.factor_rate)      # 1.35
    print(deal.recommendation.est_daily_payment) # 375.00
    print(deal.recommendation.risk_factors)     # ["high_mca_exposure"]
    print(deal.recommendation.strengths)        # ["consistent_deposits"]

Info: The recommendation object is only populated after the pipeline completes. Check for deal.recommendation before accessing its fields.