Back to The Times of Claw

AI Document Processing for Business

How to use AI to extract, classify, and route business documents — invoices, contracts, forms, and unstructured data — at scale.

Mark Rachapoom
Mark Rachapoom
·7 min read
AI Document Processing for Business

Every business runs on documents. Invoices from vendors. Contracts with customers. Applications from candidates. Forms from regulators. Proposals from prospects. Most of these arrive as PDFs, images, or Word files — and getting the data out of them and into your systems is slow, manual, and expensive.

AI document processing has reached the point where it's genuinely production-ready for most common document types. This guide covers what you can automate, how to set it up, and what to expect in terms of accuracy and reliability.

What AI Document Processing Can Handle#

Invoices and receipts. This is the most mature category. Modern AI can extract vendor name, invoice number, date, line items, quantities, unit prices, totals, payment terms, and tax amounts from virtually any invoice format — including handwritten receipts and low-quality scans.

Contracts. AI can extract key terms: parties, effective date, termination date, payment terms, renewal clauses, governing law, and defined terms. It can also flag potentially unfavorable terms (unusual liability caps, non-standard IP clauses) for legal review.

Applications and forms. Job applications, loan applications, insurance claims, customer intake forms — structured forms where the same data appears in different positions depending on the form type. AI normalizes these into a standard schema.

Unstructured correspondence. Emails, letters, and other prose documents where the important information isn't in fields. AI can extract entities (people, companies, dates, amounts), classify intent (complaint, inquiry, contract change request), and route appropriately.

Identity documents. Driver's licenses, passports, business registration documents. Useful for KYC workflows, though regulations vary by jurisdiction.

Accuracy: What to Expect#

Accuracy varies significantly by document type and quality:

Document TypeClean Digital PDFScan/Photo
Invoice (major vendor)97–99%90–95%
Invoice (handwritten)N/A80–90%
Standard contract93–97%85–92%
Free-form letter88–93%80–88%
Identity document95–98%90–95%

"Accuracy" here means field-level extraction accuracy — the percentage of individual extracted values that match the ground truth. For business-critical data (amounts, dates, contract terms), you want a human review layer for anything below 99%.

The practical implication: automate the clean case, route the exceptions. Set a confidence threshold. High-confidence extractions flow through automatically. Low-confidence extractions route to a human reviewer with the AI's best guess pre-filled. This gives you automation benefits while maintaining accuracy on the documents that matter.

Setting Up Document Processing#

Option 1: Managed API (fastest to production)#

For teams that need document processing production-ready quickly, managed APIs are the path:

Reducto — Strong performance on contracts and complex multi-page documents. Good API design. Usage-based pricing.

Docsumo — Best-in-class for financial documents (invoices, bank statements, purchase orders). Good pre-trained models for common document types.

AWS Textract + Claude — If you're already in AWS, Textract handles OCR and basic extraction; Claude handles the semantic understanding and structured output.

Basic flow:

Document arrives (email attachment, upload, scan)
↓
Send to processing API
↓
Receive structured JSON
↓
Validate against schema
↓
High confidence → auto-route to destination system
Low confidence → route to human review queue

Option 2: Claude API DIY (most flexible)#

For custom document types or unusual requirements, building with the Claude API directly gives you full control:

import anthropic
import base64
 
client = anthropic.Anthropic()
 
def extract_invoice(pdf_bytes):
    pdf_b64 = base64.standard_b64encode(pdf_bytes).decode("utf-8")
    
    message = client.messages.create(
        model="claude-opus-4-5",
        max_tokens=1024,
        messages=[{
            "role": "user",
            "content": [
                {
                    "type": "document",
                    "source": {
                        "type": "base64",
                        "media_type": "application/pdf",
                        "data": pdf_b64,
                    },
                },
                {
                    "type": "text",
                    "text": """Extract the following from this invoice as JSON:
                    {
                      "vendor_name": string,
                      "invoice_number": string,
                      "invoice_date": "YYYY-MM-DD",
                      "due_date": "YYYY-MM-DD",
                      "line_items": [{"description": string, "quantity": number, "unit_price": number, "total": number}],
                      "subtotal": number,
                      "tax": number,
                      "total": number,
                      "payment_terms": string
                    }
                    Return only valid JSON, no other text."""
                }
            ],
        }]
    )
    return message.content[0].text

The advantage: you define exactly the schema you need, and Claude fills it in. Works for any document type without a pre-trained model.

Option 3: DenchClaw with nano-pdf skill#

For teams using DenchClaw as their workspace, the nano-pdf skill handles ad-hoc PDF operations without a separate service:

"Extract the key terms from this vendor contract and add them 
to the Vendor Contracts object in my CRM"

DenchClaw reads the PDF, extracts the terms, and writes them to your DuckDB database — all in one natural language instruction.

Routing Extracted Data Into Your Systems#

Extraction is only half the job. The extracted data needs to go somewhere useful.

To your accounting system: Invoice data extracted as JSON maps directly to the vendor/invoice schema in QuickBooks, Xero, or NetSuite. Most have APIs that accept structured invoice creation.

To your CRM: Contract data (customer, start date, ARR, renewal date) maps to your deal or account object. With DenchClaw, this is automatic — the agent updates the relevant CRM entry with extracted contract terms.

To a review queue: For any extraction requiring human validation, surface it in a simple interface (a table, a Dench app, or even a spreadsheet) where a reviewer can confirm or correct values before final submission.

To your document management system: Even if you're automatically extracting data, store the original document linked to the extracted record. You'll need it for audit purposes.

Contract Review Automation#

A specific use case worth calling out: contract review.

Most small and mid-market companies lack the legal bandwidth to review every vendor contract carefully. AI can't replace legal review for significant contracts — but it can handle first-pass triage:

  1. Extract key terms automatically
  2. Flag any terms that deviate from your standard template (e.g., IP assignment clauses that claim ownership of work product more broadly than usual)
  3. Check renewal and termination notice dates against your calendar
  4. Summarize in plain English for a non-lawyer to understand what they're agreeing to

This doesn't replace a lawyer's judgment on material contracts — it reduces the number of contracts that need a lawyer's time, and ensures the ones that do get routed there quickly.

Frequently Asked Questions#

How do I handle sensitive documents?#

For documents containing PII (identity documents, financial records), be careful about which processing services you use. DenchClaw's local processing (via Claude API calls) means your documents go to Anthropic for processing but aren't stored in a third-party document management service. Evaluate your regulatory requirements before choosing a provider.

What accuracy is good enough for auto-approval?#

For financial documents (invoices, contracts with dollar amounts), we recommend 99%+ confidence for auto-approval of amounts. For metadata fields (dates, names), 95%+ is usually sufficient. Build your confidence thresholds based on the cost of an error vs. the cost of a manual review.

Can DenchClaw process documents in bulk?#

Yes — you can point the agent at a folder of PDFs and it will process them in sequence. For very large batches, using a managed API with async processing will be faster.

How does this integrate with the CRM in DenchClaw?#

See what-is-denchclaw for how the document and database layers work together. In short: extracted data writes directly to DuckDB entries, and the original documents are stored as entry documents linked to the relevant records.

Ready to try DenchClaw? Install in one command: npx denchclaw. Full setup guide →

Mark Rachapoom

Written by

Mark Rachapoom

Building the future of AI CRM software.

Continue reading

DENCH

© 2026 DenchHQ · San Francisco, CA