AI & Automation

AI Document Extraction for Distributors: From Purchase Orders in PDF to Entries in the ERP

November 11, 2026 · 7 min read · Etzal Group Team

A building materials distributor receives about 300 purchase orders a week from contractors and shops. They arrive as PDF attachments, photos of handwritten forms, spreadsheets, and text typed into chat. Four administrators spend most of their day retyping them into the ERP. Orders received after 15:00 wait until the next morning. Roughly one order in forty contains a keying error that becomes a wrong delivery. AI document extraction is well suited to this work, provided it is built with checks around it and not treated as magic.

What changed

Older document capture needed a template for each layout: the order number is here, the table starts there. Every new customer format meant new setup, and a small change in layout broke it.

Current AI models read a document more as a person does. Given a page and an instruction, they find the customer name, the order number and the lines wherever they are, in whatever layout, in Indonesian or English. A new customer's format usually works without setup.

That flexibility is the gain. The cost is that the model can also be confidently wrong, so the design around it matters more than the model itself.

The pipeline

Six stages.

1. Intake. Documents arrive from a shared mailbox, a chat channel, an upload page. Each is logged with sender and time.

2. Reading. The model receives the document and returns structured data in a fixed format:

  • Customer name and any customer code.
  • Purchase order number and date.
  • Delivery address and requested date.
  • Lines: customer's item code, description, quantity, unit, price.
  • Totals.
  • Notes.

3. Matching. The extracted values are matched to your master data.

  • The customer to a customer record.
  • Each line to a product in your catalogue.
  • Units converted: the customer orders in boxes, you stock in pieces.

This is the hardest step. Customers describe products in their own words: "semen 40kg", "PC cement 40", a competitor's code. Matching uses the customer's own past orders first, then code, then description similarity.

4. Validation. Rules check whether the result makes sense. See below.

5. Review. Orders that pass every check go straight to a draft in the ERP, or directly to confirmed, depending on the rule you set. Orders that fail any check go to a review screen showing the document beside the extracted data, with the doubtful fields highlighted.

6. Posting and feedback. The order is created through the ERP's interface. Every correction a reviewer makes is saved, so the same customer's wording is matched correctly next time.

Five validation checks

These catch most errors before they reach the warehouse.

1. Arithmetic. Quantity times price equals line total. Lines sum to the document total. A mismatch means something was misread.

2. Master data. The customer exists. Each product exists and is active. The unit is valid for that product.

3. Plausibility. The quantity is within the usual range for this customer and product. A customer who normally orders 50 bags and appears to order 5,000 is flagged.

4. Price. The price on the order agrees with the agreed price list within a tolerance. A difference goes to a person, since it may be the customer's error or an expired quotation.

5. Duplicates. The same customer and order number has not been entered before. Customers often send the same order by email and by chat.

Add the model's own signals: fields it marked as unclear, and pages it could not read.

What accuracy to expect

Be precise about what is being measured.

  • Field accuracy: the share of individual fields read correctly.
  • Document accuracy: the share of whole documents with no error at all. This is always lower. An order with twenty lines needs every line right.
  • Straight-through rate: the share of orders that pass all checks and need no human touch.

Typical patterns:

  • Clean, typed PDFs from regular customers: high accuracy, high straight-through.
  • Scans and phone photos: lower. Skewed or dark images hurt.
  • Handwriting: much lower, and variable.
  • Long tables across several pages: risk of skipped or duplicated lines.
  • Product matching: often the limiting factor, more than reading.

Do not rely on a vendor's headline figure. Measure on two hundred of your own documents, covering your real mix.

Where a person must stay

  • Anything that fails a check.
  • New customers and first orders.
  • Orders above a value threshold.
  • Unmatched or ambiguous products.
  • Price differences.
  • Handwritten documents, until measured accuracy justifies otherwise.

The goal is not zero human involvement. It is that people look only at the orders that need judgement, and see the reason why.

A caution about review: a person who approves two hundred correct extractions in a row stops looking carefully. Keep the review queue for real exceptions, and sample the straight-through orders weekly to confirm they are right.

Other documents in the same pattern

Once the pipeline exists, it extends.

  • Supplier invoices, matched to purchase orders and goods receipts.
  • Delivery notes signed by customers, as proof of delivery.
  • Bank transfer slips sent by customers, matched to open invoices. Treat these with particular care: an image of a transfer is not proof that money arrived, and confirmation should come from the bank record.
  • Price lists from suppliers.
  • Customer registration forms.

Start with one type. Purchase orders usually give the fastest return.

Data and security

  • Know where documents are sent. If a cloud model is used, read the provider's terms on retention and on use for training, for the specific service and plan.
  • Personal data. Orders contain names, phone numbers and addresses. The usual data protection duties apply.
  • Access. The review screen shows prices and customer details. Limit it to those who need it.
  • Keep the original. Store the source document with the order, for disputes and audits.
  • Manipulated content. A document is untrusted input. It may contain text that looks like instructions. The extraction step should only ever return data, with no ability to take actions.

A four-week pilot

Week 1: collect and label.

  • Gather 200 recent purchase orders with their correct ERP entries.
  • Include the difficult ones.
  • Agree the fields and the output format.

Week 2: build and measure.

  • Run extraction and matching on the 200.
  • Compare with the known correct entries.
  • Record accuracy by field, by document and by document type.

Week 3: validation and review.

  • Add the five checks.
  • Build a simple review screen.
  • Measure the straight-through rate and how many errors slip past the checks.

Week 4: shadow run.

  • Process live orders in parallel with the normal manual entry for one or two customers.
  • Compare results daily.
  • Measure time per order, with and without.

Decide with numbers: time saved per order, error rate before and after, share needing review, and cost per document.

Costs to count

  • Build and integration with the ERP.
  • Model usage, per page or per document. Usually small per order, and worth estimating at your volume.
  • Review time for exceptions.
  • Maintenance: master data, matching rules, changes when the model or the ERP changes.

Against: administrator hours, wrong deliveries and their returns, and orders that wait overnight.

Common mistakes

  • Trusting extraction without validation.
  • Measuring field accuracy and calling it done.
  • Ignoring product matching, the real bottleneck.
  • Testing only on clean documents.
  • Sending everything to review, which saves nothing, or nothing to review, which is reckless.
  • No feedback loop, so the same mistake repeats.
  • No duplicate check.
  • Discarding the source document.
  • Messy master data. Extraction cannot match to a catalogue with three records for the same product.

We build extraction pipelines with validation, review and ERP integration as part of AI Consulting and Enterprise Software. If your team still retypes orders, contact us and send us twenty typical documents.

Summary

AI can read purchase orders in varied layouts and return structured data, and it can be confidently wrong. Build a pipeline: intake, reading, matching to master data, five validation checks, a review queue for exceptions, and posting with feedback. Measure document accuracy and straight-through rate on your own documents. Keep people on new customers, large orders and anything that fails a check. Pilot for four weeks with 200 real documents before deciding.

Frequently asked questions

What is AI document extraction?

It is using an AI model to read a document such as a purchase order, invoice or delivery note and return its contents as structured data: customer, order number, date, each line with item, quantity and price. The data can then be checked and entered into a business system without retyping.

How accurate is AI at reading purchase orders?

On clear, typed documents, modern models read most fields correctly most of the time, and results on poor scans, handwriting and unusual layouts are noticeably worse. Accuracy must be measured on your own documents. Plan for validation rules and human review of anything uncertain, because a small error rate across thousands of lines still means wrong orders.

Does AI extraction replace order entry staff?

It changes their work. Typing is replaced by reviewing exceptions: the orders where a product could not be matched, a price differs or a field is unclear. The same team handles more orders with fewer keying mistakes, and their knowledge of customers and products is what resolves the exceptions.

Author

Etzal Group Team

Etzal Group Team, helping businesses grow with technology. Contact us.

Related service

WhatsApp AI Chatbot

We build, train, and run a WhatsApp AI agent that answers customers 24/7, qualifies leads, and follows up.