← All posts

Invoices and purchase orders: how AI reads the documents your team retypes

A step-by-step look at using AI to pull data out of invoices and purchase orders, check it, and put it in your spreadsheet or system, plus the parts a person should still review.

Every company that buys or sells physical goods has someone who spends part of the day copying numbers out of documents. A supplier invoice arrives as a PDF. A customer sends a purchase order as a scan. Someone opens it, finds the PO number, the line items, the quantities and the prices, and types them into a spreadsheet or the accounting system. Then the next one arrives.

The work isn’t hard, but it adds up, and it’s exactly the kind of reading-and-retyping that AI now handles well. Here’s how the workflow fits together, and where a person stays in charge.

Why this used to be hard to automate

Software has been able to read text in a scan (OCR) for decades. The problem was never the letters. It was layout. Every supplier puts the invoice number in a different place, calls the same field something different (“Inv #”, “Invoice No.”, “Document number”), and lays out line items in its own table.

The traditional fix was a template per supplier: “on this supplier’s invoice, the total is in the box at the bottom right.” That works until the supplier changes its form, or you add your fortieth supplier.

Modern AI models read a document more like a person does. They understand that “Amount due” and “Balance” usually mean the same thing, and that a table of parts is a table of parts wherever it sits on the page. That’s what makes this workflow practical now for a small team.

Step 1: Collect the documents in one place

Invoices and POs arrive by email, mostly. The first step is a shared mailbox, like ap@ or orders@, or a folder where attachments land. Nothing clever, but if documents are scattered across personal inboxes, no system will find them all.

Step 2: Extract the fields you need

The AI reads each document and fills in a fixed set of fields. For a supplier invoice that might be:

  • supplier name
  • invoice number and date
  • PO number it refers to
  • each line: part number, description, quantity, unit price, line total
  • subtotal, tax, shipping and total
  • payment terms and due date

The output is the same structure every time, whatever the document looked like. That’s the part that used to need a person.

Step 3: Check the numbers with ordinary software

This step separates a reliable system from a demo. After extraction, plain code (not AI) checks what it can:

  • Do the lines add up? Quantity × unit price should equal the line total, and the lines should add up to the subtotal.
  • Is the PO real? The PO number should exist in your records, for that supplier.
  • Do prices match the PO? If the invoice price differs from the agreed price, that’s worth a look.
  • Is it a duplicate? The same invoice number from the same supplier shouldn’t be entered twice.

Anything that fails a check is flagged for a person. Arithmetic is not something you want a language model to be trusted with. It’s something you want ordinary code to verify every time.

Step 4: Write the data where it belongs

Clean, checked rows go where your team needs them: a spreadsheet, an import file for your accounting system, or straight into a system that has an import or API. We match whatever format your team already uses, so the people downstream don’t notice anything changed except that the data is there sooner.

Step 5: A person reviews the exceptions

Your team no longer types every line. They review:

  • documents the system flagged because a check failed
  • fields it marked as unclear, such as a smudged scan or a handwritten note
  • anything new: a supplier it hasn’t seen before, an unusual charge

For routine documents, reviewing a flagged item takes much less time than typing the whole thing.

What can go wrong

  • Poor scans and handwriting. The system should mark these as unclear, not guess.
  • Documents that aren’t what they seem. A credit note that looks like an invoice, or a quote attached to an order email. Classifying the document type first catches most of these.
  • Over-trusting it early on. For the first weeks, compare the system’s output with what your team would have entered. That’s how you learn where it’s reliable.

What you need to start

  1. A sample of real documents: a few dozen invoices or POs from a range of suppliers or customers, including the awkward ones.
  2. What they turned into: the spreadsheet rows or system entries your team created from them. These are the answer key.
  3. Your rules: tolerances for price differences, which fields are required, where the data goes.

With those, you can test the system on your own documents and see exactly where it’s right and where it isn’t before anyone relies on it. Tomorrow’s post covers how to run that test.


Spending hours a week on document entry? Book a free 30-minute workflow review. Bring a few sample invoices or POs and we’ll tell you honestly whether it’s a good fit.

← All posts Book a free review