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

# Ocrolus Cash Flow Analysis

## Ocrolus Cash Flow Analysis

The **Ocrolus Cash Flow Analysis** Workflow Builder block analyzes business bank data and checks uploaded statements for suspicious activity. The current block represents `ocrolus_cfa` and `ocrolus_suspicious_activity`.

## Requirements

### Ocrolus Cash Flow Analysis

| Application field | Requirement | Notes |
| - | - | - |
| Plaid transaction data | Conditional | Required when uploaded bank statements are not selected; must contain stored transactions. |
| Uploaded bank statements | Conditional | Required when Plaid transaction data is not selected; accepts PDF or image-backed statements. |

### Ocrolus Suspicious Activity

| Application field | Requirement | Notes |
| - | - | - |
| Ocrolus book data | Required | Created from the selected Plaid transaction data or uploaded bank statements. |

## API flow

1. Add the bank statements to the application or complete Plaid and fetch transactions.
2. Call [Enrich Business Credit Application](/api-reference/workflow-management/enrich-business-credit-application) with `provider: "ocrolus_cfa"`.
3. Optionally set `options.bookOption` to select the Plaid JSON or bank-statement source. If omitted, Lendflow uses an available source.
4. Confirm `data.onqueue: true`.
5. Poll [Get Commercial Data](/api-reference/workflow-management/get-commercial-data) with `services[]=ocrolus_cfa`.

```json theme={"system"}
{
  "provider": "ocrolus_cfa",
  "options": {
    "bookOption": "plaid_json"
  }
}
```

`ocrolus_suspicious_activity` is a block-related capability, not a valid standalone commercial-data API service ID. Do not send it as `provider` or `services[]`. Suspicious-activity data is fetched as part of the Ocrolus book-processing flow.

## Data Orchestration availability and flow

The block is available in the **Cash Flow Analysis** group for business entities. Ocrolus creates or reuses a book from the selected source. If document verification is required, the job remains in progress until the Ocrolus webhook arrives; otherwise, available book data can be enriched immediately. Multiple Ocrolus operations are coordinated against the same book.

## What the service returns

| Result area | Response path | Meaning |
| - | - | - |
| Lifecycle | `data.statuses.ocrolus_cfa` | Latest CFA execution message. |
| CFA summary | `data.commercial_data.ocrolus_cfa` | Monthly cash-flow measures. |
| Book data | `data.commercial_data.ocrolus_books` | Latest book, document-processing, and associated analysis data. |
| Suspicious activity | Within the latest Ocrolus book data | Document-level suspicious-activity flags when Ocrolus returns them. |

## Representative response

```json theme={"system"}
{
  "data": {
    "statuses": {"ocrolus_cfa": "Success"},
    "commercial_data": {
      "ocrolus_cfa": [{
        "month": 8,
        "year": 2026,
        "estimated_revenue": "42500.00",
        "deposit_sum": "48750.00",
        "withdrawal_sum": "39100.00",
        "daily_balance": "12840.22",
        "deposit_count": 34,
        "transaction_count": 146,
        "nsf": 1,
        "net_cash_flow_sum": 9650
      }]
    }
  }
}
```

## Field meanings

| Field | Type | Meaning |
| - | - | - |
| `month`, `year` | Integer | Calendar period represented by the summary row. |
| `estimated_revenue` | Numeric string | Provider-estimated monthly revenue after excluding identified non-revenue credits. |
| `deposit_sum` | Numeric string | Total credits in the period. |
| `withdrawal_sum` | Numeric string | Total debits in the period. |
| `daily_balance` | Numeric string | Average daily ending balance, including weekends. |
| `deposit_count` | Integer | Number of credit transactions. |
| `transaction_count` | Integer | Total transaction count. |
| `nsf` | Integer | Unique NSF and overdraft fees identified for the account and period. |
| `net_cash_flow_sum` | Number | Net cash flow derived from deposits and withdrawals. |
| Suspicious-activity flag | Provider-defined object | Identifies a document and pages for which Ocrolus reported a potential issue. Absence does not prove that a document is authentic. |

The complete provider response can contain account-level balances, monthly category inflows and outflows, counterparties, loan sources, document statuses, missing periods, and fraud signals. Those provider-defined sections are conditional and are not reproduced here.

## Errors and statuses

| Signal | Meaning |
| - | - |
| `A plaid connection with transaction data OR uploaded bank statements are required to perform CFA` | Neither valid source is available. |
| `A plaid connection with transaction data is required to perform CFA` | Plaid was selected but no stored account transactions exist. |
| `Uploaded bank statements are required to perform CFA` | Statements were selected but none are attached. |
| `Invalid book creation option` or HTTP `422` | The selected source or options are invalid. |
| `Started` | The request or document verification is still in progress. |
| `Success` | Lendflow stored finished Ocrolus data. |
| Failure message | Review the latest status and correct the source, credentials, or rejected document before retrying. |

## FAQ

<AccordionGroup>
  <Accordion title="Can Ocrolus run from either Plaid or uploaded statements?">
    Yes. Plaid must already contain transaction data. Uploaded statements must be attached as accepted bank-statement files.
  </Accordion>

  <Accordion title="Can I call ocrolus_suspicious_activity directly?">
    No. It appears in the current block's related services but is intentionally excluded from valid commercial-data service IDs. Run the Ocrolus CFA block and read suspicious activity from the resulting book data.
  </Accordion>

  <Accordion title="Why can the status remain Started?">
    Ocrolus may still be verifying uploaded documents. Lendflow waits for the configured webhook before marking that asynchronous work successful.
  </Accordion>
</AccordionGroup>
