---
id: contract-ingestion
title: AI Contract Ingestion & OCR Clause Extraction
sidebar_label: Contract Ingestion
description: How GAAPx uses AI vision and natural language processing to ingest customer contracts, MSAs, Order Forms, and SOWs into structured accounting data.
keywords:
  - AI contract ingestion
  - contract OCR finance
  - revenue contract extraction
  - order form parser
  - legal clause extraction
author: GAAPx Engineering Team
last_updated: 2026-10-02
---

# AI Contract Ingestion & OCR Clause Extraction

> **Quick Summary:** GAAPx automated contract ingestion processes PDF, DOCX, and scanned image agreements using multi-modal AI vision and legal-domain NLP. The engine automatically extracts commercial terms (effective dates, multi-year ramp schedules, billing cadences), non-standard terms (service level credits, early termination carve-outs), and decomposes contract lines into distinct ASC 606 performance obligations with 99.4% field accuracy.

---

## Contract Ingestion Pipeline

```mermaid
flowchart LR
    Upload["1. Raw Document Upload\n(PDF, DOCX, Scans, CRM Webhook)"] --> OCR["2. Layout Analysis & OCR\n(Tables, Headers, Multi-Page Signatures)"]
    OCR --> NLP["3. Legal-Domain Extraction\n(Clauses, Rates, Escalators, Termination)"]
    NLP --> Valid["4. Deterministic Validation\n(Cross-Totaling, Date Continuity, SSP Rules)"]
    Valid --> Subledger["5. GAAPx Revenue Subledger\n(POBs, Waterfalls & Billing Schedule)"]
```

---

## Supported Agreement Types & Formats

GAAPx natively parses and links the following document structures into a single unified contract family:

| Agreement Type | Extracted Key Fields | Accounting Significance |
| :--- | :--- | :--- |
| **Master Services Agreement (MSA)** | Governing law, payment terms (Net 30/60), termination for convenience clauses, liability caps. | Step 1: Enforceability and contract duration evaluation. |
| **Order Forms / Statements of Work (SOW)** | Product SKUs, committed volumes, platform tiers, professional services milestones, pricing escalators. | Step 2 & 3: Distinct POB separation and transaction price determination. |
| **Amendments & Addendums** | Effective amendment dates, proration schedules, scope increases or downgrades. | Contract modification accounting (Cumulative Catch-Up vs Prospective). |
| **Usage Rate Cards** | Base platform entitlements, overage tiers, credit consumption drawdowns. | Variable consideration and usage-based revenue recognition. |

---

## Extracted Field Taxonomy & Confidence Scoring

Every ingested contract generates a structured JSON contract model accompanied by field-level confidence scores and raw document bounding boxes:

```json
{
  "contract_id": "gx_ctr_98412",
  "customer_name": "Acme Corp Enterprise",
  "effective_date": "2026-10-01",
  "termination_date": "2028-09-30",
  "currency": "USD",
  "total_contract_value": 240000.00,
  "confidence_score": 0.994,
  "performance_obligations": [
    {
      "pob_id": "pob_01",
      "name": "Enterprise SaaS Platform License",
      "term_months": 24,
      "stated_amount": 180000.00,
      "ssp_allocated_amount": 165400.00,
      "timing": "over_time",
      "citation": "Order Form Section 2.1 (Page 2, Lines 14-22)"
    },
    {
      "pob_id": "pob_02",
      "name": "Custom Integration & Deployment",
      "stated_amount": 60000.00,
      "ssp_allocated_amount": 74600.00,
      "timing": "point_in_time_milestone",
      "citation": "SOW Attachment A (Page 6)"
    }
  ]
}
```

---

## Human-in-the-Loop (HITL) Exception Review

When a contract contains non-standard legal phrasing or confidence scores fall below **95%**, the contract is automatically routed to the **GAAPx Exception Queue**:

1. **Side-by-Side Verification**: Accountants see the raw PDF highlighted in the left pane and extracted data fields in the right pane.
2. **One-Click Override**: Finance users can correct or refine extracted values, instantly training the tenant's custom parser.
3. **Audit Immutability**: All manual overrides are logged with user identity, timestamp, and rationale for external auditors.
