← Insights

API Integration & Workflow Automation

Invoice Data Extraction: A Guide for Accounting Teams

Invoice data extraction turns vendor PDFs, scans and email attachments into structured header and line item fields. We cover which fields to pull, how OCR, pretrained models and LLMs compare, the validation rules to run before QuickBooks or NetSuite, and how to design the review queue.

Published
Author
Cass & York Team
Series
Cass & York
Reading time
10 min read
0

It is the last week of the month and your AP clerk is keying invoice number 400 into QuickBooks: vendor, bill number, date, terms, six line items, tax, total. Somewhere in that stack sits a bill that was entered last week under a slightly different number. Nobody will catch it until the vendor statement fails to tie.

Short answer: invoice data extraction turns vendor PDFs, scans and email attachments into structured fields, the header (vendor, invoice number, dates, PO, totals) plus every line item. Pulling the fields is the quick part. Most of the time savings come from the steps after it: validation rules that check the vendor, the math, the PO and duplicates before anything reaches QuickBooks or NetSuite, and a review queue that shows a person the failed fields next to the page they came from.

For scale: Ardent Partners' 2025 AP benchmarks put the average cost to process one invoice at $9.40, against $2.78 for best in class teams, and on average 32.6% of invoices go through with no human touch.

Below is how we design an extraction pipeline for accounting and ops teams: which fields to pull, how OCR, templates and LLMs compare, the validation rules we run before posting, and how to size the review queue. A calculator near the end estimates hours saved on your own volume.

Which invoice fields to extract

Extract every field that a validation rule or a posting needs, and skip the rest. The table covers about a dozen header fields and five line item fields. The list below follows the normalized field types in Amazon Textract's invoice and receipt API, a useful reference because it is a published, standard field list.

Field

Level

Why you need it

Vendor name and address

Header

Matches the bill to a vendor record; the address separates two vendors with similar names

Vendor tax ID

Header

The most reliable vendor match key when it is printed

Invoice number

Header

Duplicate check; goes into the bill number field

Invoice date and due date

Header

Posting period and payment scheduling

Payment terms

Header

Early pay discounts; checks the due date

PO number

Header

Links the bill to an open purchase order for matching

Subtotal, tax, shipping, discount

Header

Inputs to the math check

Total and amount due

Header

The number you pay; amount due can differ when a prior balance or payment appears

Remit to address

Header

Flags bank or address changes before payment

Item description and product code

Line

Item or GL account mapping

Quantity and unit price

Line

PO and receipt matching

Line amount

Line

Must equal quantity times unit price, and lines must sum to the subtotal

Two fields cause most of the trouble. The invoice number arrives with prefixes, spaces and leading zeros that change between a vendor's PDF and their statement. We store a normalized copy (uppercase, symbols and leading zeros stripped) for duplicate checks next to the raw value.

Line items are the other one. A service vendor may send one line; a parts supplier may send 40 across three pages. If you post each invoice total to one expense account, you can skip line extraction and save effort. If you match to POs or code by item, line items are the job.

OCR vs template vs LLM extraction

There are three ways to get fields off the page, and many production setups combine two of them.

OCR with templates reads the text, then pulls each field from a fixed position or a pattern you define per vendor layout. It is fast, costs little per page and does well on layouts it knows. Every new vendor or redesigned invoice needs a new template, and somebody has to maintain them.

Pretrained invoice models such as Amazon Textract AnalyzeExpense return standard invoice fields with no template to build. Textract, for example, returns a confidence score for the label and the value of every field it finds, which is exactly what a review queue needs.

LLM extraction sends the document text or image to a language model with a schema and gets JSON back. It handles unfamiliar layouts and messy line tables well, costs more per page and runs slower.

What the accuracy numbers show

The best public comparison we found is small but useful. A 2025 study on invoice information extraction tested a layout and rules pipeline (Docling) against an LLM extractor (LlamaExtractor) on 102 English and German invoices:

Measure

Layout and rules pipeline

LLM extractor

Overall field accuracy

63%

94%

Line item accuracy

58%

91%

Math validation errors

20

0

Seconds per document

10

30

The gap is widest on line items, the part accounting teams need most for PO matching. The same study found the rules pipeline strong on simple identifiers like invoice number (90%) and weak on tax, net and currency fields (60%).

LLMs make a different kind of mistake. One engineering team that built both approaches reported that 1% to 3% of LLM extractions in their testing were wrong, including a $4,532 total read as $4,523. A transposed digit looks plausible, and a person skimming the screen can miss it. A rule that adds the lines and compares them to the total will catch it every time.

How we choose a method

Our take: pick the extractor on your volume and vendor mix, then spend most of the build on what happens after extraction. If 80% of your invoices come from 15 vendors with stable layouts, templates or a pretrained model cover them cheaply and an LLM handles the long tail. If your vendor list is long and changes often, start with an LLM or a pretrained model and skip templates.

Plan the intake before the extractor

Ingestion deserves the same care. On the New York Lottery data pipeline we built for a system that reaches over 6 million users, the work included the plumbing around the processing: AWS ingestion and batch processing, secure movement of encrypted files, and deployment automation. An invoice pipeline needs the same pieces: one intake inbox or folder, a stored copy of every original file, a batch ID on every document, and a log of what happened to it.

Validation rules to run before QuickBooks or NetSuite

Every extracted invoice passes six rules before it becomes a bill. A bill that passes all six can post with no human touch. A bill that fails any rule goes to review with the reason attached. This is the part most extraction guides skip, and it decides whether automation saves time or creates cleanup.

Rule

What it checks

Data it needs

When it fails

1. Vendor match

Extracted vendor maps to exactly one active vendor record, by tax ID first, then name plus address

Vendor list from QuickBooks or NetSuite

No match or two matches: review

2. Math check

Line amounts equal quantity times unit price; lines sum to subtotal; subtotal plus tax, shipping and fees minus discount equals total

The extracted invoice alone

Any difference above one cent: review

3. PO match

Bill lines match open PO lines on item, quantity and price within your tolerance; for three way match, quantity also matches the item receipt

Open POs and receipts

Outside tolerance or no open PO: review

4. Duplicate check

Same vendor plus normalized invoice number already exists; or same vendor, same amount and an invoice date within a few days

Existing bills

Likely duplicate: hold for a person to check

5. Dates and period

Invoice date is plausible and falls in an open accounting period; due date agrees with the terms

Closed period settings, vendor terms

Closed period or date in the future: review

6. Field confidence

Every required field meets its confidence threshold

Confidence scores from the extractor

Any required field below threshold: review that field

Use the accounting system's controls first

QuickBooks Online has a setting called Warn if duplicate bill number is used under Account and Settings, Advanced, Other Preferences. It warns, and a QuickBooks community answer notes it only compares bills within the same vendor. Your pipeline should also catch the same invoice entered under a duplicate vendor record and the same invoice with a reformatted number, which is why rule 4 runs on normalized numbers and on amount plus date.

Set PO tolerances in one place

NetSuite's 3 Way Match Vendor Bill Approval workflow already supports quantity and amount tolerance limits at the vendor, item and subsidiary level. If you use it, your extraction pipeline should read those same limits so every tolerance has a single home. On QuickBooks, we keep the PO tolerance rule in the pipeline and write the matched result to the bill.

Write failures in plain words

"Lines sum to $1,212.40, subtotal says $1,221.40" gets fixed in ten seconds. "Validation error 3" sends someone back to the PDF.

We built the Horizon Roofing pricing portal (CurbPricing) around rules managed by admins. Admins there manage pricing, labor, margins and approvals themselves, on PostgreSQL and Supabase, with a Google Sheets integration. The same principle applies to invoice rules: the controller should be able to change a tolerance or add a vendor alias without filing a ticket with engineering.

How to design the review queue for low confidence fields

The review queue is where a person checks what the rules flagged. Design it so a reviewer can clear an item in under a minute, and so every correction makes the next invoice easier.

  1. Show the field and the source side by side. Put the extracted value next to a crop of the page where it came from, with the failed rule in plain words. The reviewer confirms or corrects that one field and moves on.
  2. Queue by field, with the whole invoice one click away. A bill with one low confidence date needs a five second check. A bill with no vendor match needs a lookup. Sort the queue so quick checks clear first and lookups go to the person who owns vendor records.
  3. Set thresholds per field. Totals, invoice numbers and vendor IDs deserve a strict threshold because a wrong value costs money. Descriptions can run looser because the GL coding step catches most problems there. Start strict and loosen a field only after a few hundred clean results on it.
  4. Feed corrections back. Each correction becomes a vendor alias, a template tweak, a GL mapping or an example for the LLM prompt. Track the review rate per vendor each week; a vendor whose rate stays flat needs a fix at the source, such as asking them for a PDF instead of a phone photo.
  5. Hold duplicates apart from everything else. Route a suspected duplicate to someone who can check the vendor statement and payment history before anything posts.
  6. Log every decision. Record who approved what, the value before and after, and the rule that fired. Auditors ask for it, and it is also how you measure the queue.

How big will the queue be? It depends on your vendors, your documents and how strict your thresholds are, so treat any vendor's promised number with care.

For a benchmark of the whole process, Ardent's 2025 data puts the share of invoices processed with no human touch at 32.6% on average and 49.2% for best in class teams (apexanalytix summary). The same summary puts exceptions at 14% of invoices on average, and Ardent reports that best in class teams flag 9% (Ardent Partners). Plan your first month at a high review rate, measure it per vendor and per rule, and tune from there.

How many hours invoice data extraction saves

The hours saved come down to one number more than any other: the share of invoices that still need a person. Plug in your own volume and minutes to see where your break even sits.

Set invoices per month, minutes per manual entry, share sent to review and minutes per review; the chart shows hours a month with extraction across every review rate against your manual baseline.

The math is simple enough to run on a napkin:

Hours saved = (N × m_manual − N × r × m_review) ÷ 60

Here N is invoices per month, r is the share sent to review, and each m is minutes per invoice. Two things follow.

First, savings reach zero only when the review rate passes the ratio of manual minutes to review minutes. If keying an invoice takes 6 minutes and checking a flagged one takes 2, extraction wins at every review rate.

Second, minutes per review matter as much as the review rate. A queue that shows the flagged field next to its crop of the page keeps that number low; a queue that makes reviewers open the PDF and hunt pushes it back toward manual entry.

Treat the result as time back for the AP team, then decide what to do with it: faster close, earlier payment discounts, or the vendor statement reconciliation that keeps slipping to next month.

Invoice data extraction FAQ

What is invoice data extraction?

Invoice data extraction is the process of pulling structured fields from vendor invoices, such as vendor, invoice number, dates, PO number, totals and line items, so they can be validated and posted to an accounting system without manual typing.

Is OCR the same as invoice data extraction?

OCR turns an image into text. Extraction goes further and decides which text is the invoice number, which is the total and which rows are line items. Most tools combine OCR with templates, a pretrained invoice model or an LLM to do that second step.

Do I need to extract line items?

You need line items if you match bills to purchase orders, code expenses by item or track costs by job. If you post each bill to a single expense account, header fields are enough.

How accurate is LLM invoice extraction?

In one 2025 study of 102 invoices, an LLM extractor reached 94% overall field accuracy and 91% on line items, against 63% and 58% for a layout and rules pipeline. Any method can still misread a digit, so run a math check and a duplicate check on every invoice before posting.

Can extracted invoices go straight into QuickBooks or NetSuite?

Yes, through each system's API, once an invoice passes vendor match, math, PO match, duplicate and confidence rules. Invoices that fail a rule should wait in a review queue. NetSuite's 3 Way Match Vendor Bill Approval workflow can apply its own tolerance limits after the bill is created.

How do you prevent duplicate invoices?

Compare each new bill against existing bills on vendor plus a normalized invoice number, and on vendor plus amount plus a nearby date. Turn on QuickBooks Online's duplicate bill number warning too, and remember it only checks within one vendor.

Where to start

The goal is a month end close where AP spends its hours on the invoices that need judgment. Pick your top 15 vendors by volume, write down the six rules above with your own tolerances, and measure how many of last month's invoices would have passed all six. That number tells you what extraction is worth to your team before you buy anything.

If you would like a second pair of eyes, our free workflow review looks at one process on a small set of your records and gives you findings and a working example you keep either way. You can see how we approach document intelligence and systems integration or send us your workflow.

Sources

Share this article

Start with the process

Show us the workflow your existing software can't handle.

You don't need a technical specification. Walk us through the process, the systems involved, and where your team is losing time.

Book a Workflow Call →
Systems involved