Finance & Admin

Document processing automation, done properly

The six-stage pipeline behind automated document handling — ingest, classify, extract, validate, route, store — and how to pick which documents to automate.

Published 8 min read By DoubleTime AI

What is document processing automation?

Document processing automation is a pipeline that takes documents in whatever form they arrive, works out what each one is, pulls the facts out of it, checks those facts against rules, and puts both the data and the file where they belong. It applies to contracts, intake forms, quotes, statements and delivery notes as much as to invoices. The pipeline is the same each time; only the labels, extraction schema and validation rules change. The hard part is never extraction — it's what happens when something doesn't fit.

Most businesses find this need the same way. Somebody spends three hours a day opening PDFs and typing what's in them into another system. The work is genuinely manual, and it's invisible in a P&L because it's spread thinly across people whose job titles say something else.

Invoices get automated first because they're obvious. The same pattern sits under a contract whose renewal date needs to reach a calendar, an intake form that should create a CRM record, and a certificate of insurance checked before a subcontractor starts.

The pipeline, stage by stage

1. Ingest

Documents arrive by email attachment, shared drive, portal upload, scanner, API, or a photo from someone's phone. Ingest normalises that into one queue with consistent metadata: source, timestamp, sender, and the original file preserved untouched.

Two rules earn their keep immediately. Keep the original forever and treat derived versions as disposable, because you'll want to re-process history when extraction improves. And deduplicate on content hash.

2. Classify

Before extracting anything you need to know what you're looking at. Classification assigns a type — invoice, purchase order, contract, remittance advice, statement, delivery note — and splits multi-document files, which matters because scanner output routinely holds six documents in one PDF.

Keep the label set small and mutually exclusive at first: six well-separated classes beat twenty-five with fuzzy edges. Add an explicit "unknown" class routed to a person rather than forcing a guess — what lands there tells you what the next class should be.

3. Extract

Extraction pulls a defined set of fields per document type. Modern systems read text and page layout together — the research line beginning with LayoutLM established that jointly modelling what text says and where it sits substantially improves document understanding versus treating a page as a flat string — which is why they generalise across unfamiliar layouts.

Define the schema per class and pull more fields than you need today: one more field now costs nothing, re-processing two years of archives later costs plenty. For invoices, the extraction and matching detail is in OCR invoice processing.

4. Validate

Extraction produces values. Validation decides whether to trust them. Most of it is deterministic, which is what you want in the step that gates automation.

Validation typeExample
ArithmeticLine items sum to subtotal; subtotal plus tax equals total
FormatTax ID, IBAN, postcode, email and date formats conform
Reference lookupVendor, customer, contract or PO exists in your system of record
Cross-field logicEnd date after start date; due date consistent with stated terms
Range and plausibilityAmount within a normal band for this counterparty and document type
Duplicate detectionSame document number and counterparty already processed
Required fieldsEverything mandatory for downstream posting is present

Validation is also where extraction quality becomes measurable: a document failing its own arithmetic almost certainly has a misread digit, and you learn that without a labelled test set.

5. Route

Everything passing validation goes to its destination automatically. Everything failing goes to a person, with the specific reason attached rather than a generic flag.

Route by cause: failed arithmetic to a data reviewer, unknown counterparty to whoever owns onboarding, a non-standard contract clause to legal, a quantity mismatch to the buyer who raised the order. Sending all exceptions to one queue is the most common design error, because it puts every decision in front of the person least equipped to make it.

6. Store

The document goes to a system of record with extracted data attached as searchable metadata, an audit trail of what was extracted and corrected and by whom, and a retention rule.

Retention isn't decoration. For US tax records held electronically, IRS Rev. Proc. 97-22 requires an electronic storage system to maintain a "high degree of legibility and readability" on screen and in hardcopy, provide an indexing system permitting identification and retrieval of the records, and retain the ability to reproduce legible hardcopies — for as long as the contents may be material in administering any internal revenue law. Most modern systems clear that bar, provided somebody checked.

Which documents are worth automating

Three factors, multiplied. A type needs to score on all three.

Volume. How many arrive monthly, and how many minutes does each consume? Twenty a month at two minutes is under an hour — not a project. Four hundred at six minutes is 40 hours, most of a person.

Structural consistency. Not identical layout — modern extraction handles variety. What matters is whether the same facts appear in every instance. Invoices always have a total. Contracts always have parties and dates. Miscellaneous correspondence has nothing consistent to extract.

Cost of error. High error cost doesn't rule automation out; it argues for tighter validation and mandatory review. It should stop you from auto-posting.

Document typeVolumeConsistencyError costVerdict
Supplier invoicesHighHighMediumAutomate first; arithmetic validates itself
Client intake formsHighHighLowStrong candidate; feeds CRM directly
Purchase ordersHighHighMediumGood where a PO system already exists
Remittance adviceMediumMediumLowGood candidate; makes payment matching possible
Bank and card statementsMediumHighLowAutomate extraction, supervise reconciliation
Standard contractsMediumMediumHighExtract dates and metadata; never auto-approve terms
Negotiated agreementsLowLowHighDates only. Human review of substance.
General correspondenceHighNoneVariesClassify and route. Don't try to extract.

A useful shortcut: automate the type your team complains about that also has a number on it which must add up. Self-validating documents are the cheapest to trust — invoices most of all, on both the inbound and outbound side.

Where these projects actually fail

Not on the model. Consistently on the surroundings.

Six months in, a working system looks like this: the routine majority posts untouched, a meaningful minority routes to people who spend under a minute each, and adding a seventh document type takes days rather than months. What you won't get is a system that never needs attention. It's an operational system, not an installation.

Frequently asked questions

What is intelligent document processing?

Intelligent document processing (IDP) is the industry term for the pipeline described here: classifying incoming documents, extracting structured data, validating it against rules, and routing it downstream using machine learning rather than fixed templates. The "intelligent" prefix mainly distinguishes it from earlier template-based capture. In practice IDP and document processing automation describe the same thing, and vendors apply the label to very different levels of capability.

How accurate is automated document extraction?

Accurate enough to trust on validated fields, never accurate enough to skip validation. The honest framing avoids a headline percentage, because per-field and per-document accuracy differ substantially and both depend on document quality. For context on the ceiling: on DocVQA, a benchmark for answering questions about scanned document images, human accuracy was measured at 94.36%. Measure your own straight-through rate and error escape rate instead.

Which documents should we automate first?

Pick the type with high monthly volume, consistent facts across instances, and validation that checks itself. Supplier invoices usually win on all three — the arithmetic proves the extraction. Client intake forms are a strong second because they feed a CRM directly and the cost of a caught error is low. Avoid negotiated contracts or general correspondence first: one has high error cost and low consistency, the other has nothing reliable to extract.

Do we need a separate tool for each document type?

No, and buying one per type is a common and expensive mistake. The pipeline is shared. What differs per type is the classification label, extraction schema, validation rules and destination system — all configuration rather than new infrastructure. The economics depend on that reuse: the first type carries the build cost and each one after should cost a fraction of it. If a proposal prices type five like type one, ask why.

How long does a document automation project take to pay back?

It depends almost entirely on the baseline you measured before starting, which is why measuring first matters more than any other preparation. Multiply documents per month by minutes per document by loaded hourly cost to get current spend. Then estimate honestly: automation removes most of that for the clean majority and reduces, but doesn't remove, exception handling. Add maintenance and processing fees. Projects that fail this arithmetic on paper don't improve once built.

What about documents containing sensitive personal data?

Handle them under the rules that already applied, plus two additions. Know where processing happens and whether document content leaves your infrastructure or is retained by a third party — read the data processing terms rather than assuming. And use the fact that automation makes retention enforceable in a way manual filing never was: set retention and deletion rules per document class at the storage stage. For US tax records, IRS Rev. Proc. 97-22 sets the requirements an electronic storage system must satisfy.

Want this built for you?

The audit is free and takes 30 minutes. We map where your hours actually leak, price the leak in dollars, and tell you what we would automate first — whether or not you hire us.

Book a free audit ↗

Sources

  1. Rev. Proc. 97-22: Electronic Storage Systems — Internal Revenue Service
  2. LayoutLM: Pre-training of Text and Layout for Document Image Understanding — arXiv (Xu et al.)
  3. DocVQA: A Dataset for VQA on Document Images — arXiv (Mathew, Karatzas, Jawahar)