> ## Documentation Index
> Fetch the complete documentation index at: https://docs.moneyline.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Concepts

> Core concepts in Moneyline's data model.

## Submissions

A **submission** is the top-level container — typically one per loan application, deal, or merchant under review. It holds documents, transactions, and analytics.

**Lifecycle:** `new` → `ready` → `processing` → `processed` → `reviewed`

Two statuses sit outside that happy path: `failed` when processing errors out,
and `review_requested` when a submission is flagged for manual attention. The
SDKs' `waitForProcessing` / `wait_for_processing` helpers stop on `processed`,
`reviewed`, or `failed`.

| Field | Description |
| - | - |
| `external_id` | Your system's identifier (deal ID, application ID) |
| `company_info` | Business name, EIN, address, industry |
| `loan_info` | Requested amount, term, product type |
| `metadata` | Arbitrary key-value pairs |

## Documents

**Documents** are files attached to a submission — bank statements, tax returns, P\&Ls, balance sheets, ISO applications, voided checks, IDs.

**Processing pipeline:**

1. **Upload** — File stored, basic metadata extracted
2. **OCR** — Text extraction from PDF/image (Tesseract, Google Vision, or custom)
3. **Classification** — ML model identifies document type
4. **Parsing** — Type-specific parser extracts structured data (fields, tables, transactions)

**Document classes:**

* `bank_statement` — Monthly/quarterly bank statements
* `tax_return` — Federal/state tax returns (1040, 1120, 1065)
* `pnl` — Profit & loss / income statements
* `balance_sheet` — Balance sheets
* `iso_application` — ISO/MCA applications
* `voided_check` — Voided checks
* `identity` — Government-issued ID
* `financial_statement` — Generic financial documents
* `other` — Unclassified

## Transactions

**Transactions** are the atomic financial records extracted from bank statements or imported via Plaid/API. Each transaction goes through enrichment:

* **Cleaning** — Normalize description, remove noise
* **Categorization** — Assign to category taxonomy (revenue, expenses, transfers, etc.)
* **Merchant detection** — Identify merchant name, MCC code
* **Recurring detection** — Flag subscriptions, rent, payroll, loan payments
* **Duplicate detection** — Find matching/duplicate transactions across accounts

## Enrichment

The **enrichment pipeline** transforms raw transaction descriptions into structured, categorized data:

1. **Clean** — Strip check numbers, reference codes, trailing digits
2. **Classify** — ML model assigns primary + secondary categories
3. **Merchant** — Fuzzy match against merchant database, extract MCC
4. **Recurring** — Pattern detection for periodic transactions
5. **Anomaly** — Flag unusual amounts, patterns, or timing

## Categories

Moneyline uses a hierarchical category taxonomy:

* **Revenue** — Sales, service income, refunds, interest
* **Expenses** — Operating, payroll, rent, utilities, marketing
* **Transfers** — Internal transfers, owner draws, loan proceeds
* **Fees** — Bank fees, NSF/overdraft, wire fees
* **Other** — Uncategorized transactions

Each category has a `slug`, `name`, and `group` (revenue/expense/transfer/fee).

## Analytics

Analytics are computed from enriched transactions:

* **Scorecard** — Multi-metric financial health assessment with grades
* **Cashflow** — Revenue, expenses, net income by period (day/week/month/quarter)
* **Balances** — Daily ending, minimum, and average balances
* **Risk Score** — ML-generated risk assessment (0-100)
* **Anomalies** — Flagged unusual transactions
* **Forecasts** — Category-level projections
* **Recurring** — Identified recurring transaction patterns
* **Merchant Summary** — Spend breakdown by merchant
* **Statistics** — Summary metrics (totals, averages, growth rates)

## Policies

**Policy rules** are configurable conditions evaluated against analytics:

```
IF monthly_revenue < 10000 THEN severity=error message="Revenue below minimum"
IF nsf_count > 3 THEN severity=warning message="Excessive NSF/overdraft"
IF average_balance < 1000 THEN severity=error message="Low average balance"
```

Rules are evaluated per-submission and produce pass/fail/warn results with severity levels.

## Integrations

* **Plaid** — Direct bank account connection, transaction import
* **Finicity** — Alternative bank data provider
* **Yodlee** — Additional bank data provider
* **Decision Logic** / **Ocrolus** / **Inscribe** — Document verification
* **Salesforce** / **HubSpot** — CRM sync (push analytics + status)

## Webhooks

Real-time event notifications for:

* `submission.created`, `submission.processed`, `submission.failed`
* `document.uploaded`, `document.classified`, `document.parsed`
* `transactions.enriched`
* `policy.evaluated`

All webhook payloads include HMAC-SHA256 signatures for verification.

NextPut it to workThe data model makes more sense once you have run a document through it end to end.

[Run the quickstart](https://docs.moneyline.co/get-started/quickstart.md)
[API reference](https://docs.moneyline.co/api-reference/introduction.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.