Skip to content

Reading purchase orders from PDF, Excel and email: one process for every format

DYNAMINDS Labs team · · 6 min

AI Workers

In brief

Orders in different formats are handled by one process when every format is first turned into the same order record: customer, customer PO number, delivery address and date, and lines with description, quantity, unit and price. Only that record goes through the checks and into the ERP. An AI Worker reads PDFs, scans, spreadsheets and email text without a template per customer, records where it took each field from, and shows a person any conflict between the email and the attachment.

Six formats, six different problems

The order desk at a distributor or manufacturer receives orders in anything that can be sent by email. Each format is difficult in its own way.

FormatWhat is hardWhat to watch for
email bodyfree text, signatures, quoted earlier messagesa line from last week's order in the quoted text is not a new order
PDF from the customer's systema table split across pages, repeated headers, subtotalsthe subtotal at the bottom of page 1 is not an order line
scan or photocharacter recognition, handwritten corrections, stamps over texta crossed-out quantity with a new one written in pen next to it
Excel spreadsheetmerged cells, several tabs, hidden columns, the customer's own templatea hidden column with last year's price
Word documenta table pasted as an image, text in form fieldsthe PO number in the page header, not in the body
attachment inside an attachmenta forwarded email as a file, a ZIP archivethe real order two levels down

The old answer was a template: a separate mask for each customer that says which column holds the quantity and where on the page the PO number sits. That works until the customer changes its form or a new customer arrives. The difference between template-based reading and understanding a document is explained in AI Worker or invoice OCR. Orders work the same way.

A common order record

The idea is simple: whatever the source, reading always produces the same record.

FieldExampleNotes
customertax ID, name, sender's email addressthe sender may be the customer's employee on another domain
customer PO numberZK/2026/1187needed for the confirmation and the invoice
delivery addressconstruction site at 5 Polna Streetif missing, the default address from the customer record, flagged
delivery date"by Friday" turned into a datecalculated from the day the email was sent
linesdescription, customer catalog number, quantity, unit, priceeach line separately, with its row number in the source
notes"deliver before 2 p.m.", "no paper invoice"go into the notes field in the ERP

For each field the AI Worker records two things: where it came from (PDF page and row, spreadsheet cell, sentence in the email) and how confident the reading is. A field with a handwritten correction on a scan has low confidence and goes to review. A field from a generated PDF has high confidence. The sales rep approving the order sees each number's source next to it and can check it with one click.

From here on the process is the same for every format. Checks on item codes, units, prices and duplicates are described in Email order entry into the ERP.

When the email says something different from the attachment

The most common conflict: the PDF attachment says 100 pieces, and the email body says "please make it 120, the PDF was from yesterday". Or the reverse: the email says "order attached", and there are three attachments. The rules need to be set in advance, in the rules card.

  1. Later beats earlier, but only openly. A change in the email body to an attachment in the same thread is applied, and the difference is shown to the sales rep.
  2. Several attachments mean several questions. If it is unclear which file is the order, the AI Worker does not pick one. It shows the files and asks for a choice.
  3. A conflict within one document stops the line. When a line total does not equal quantity times price, the line goes to review instead of being quietly "fixed".
  4. Nothing gets lost. A line that could not be read stays in the draft as unrecognized, with a link to the source, instead of disappearing from the order.

The fourth rule matters most. A 30-line order that silently lost one line is worse than one with a single line flagged in red.

What this process does not cover

Orders through EDI and retail chain portals have a fixed, structured format and their own confirmation rules. There is nothing to "read", but there are other problems: message compliance, response deadlines, delivery booking. They are covered in Orders from retail chains through EDI and portals.

Phone orders also stay outside the process. If a sales rep writes them down in an email to themselves or in the CRM, the note can enter the same process, but whether the customer really placed the order is decided by the person who spoke with them.

How to check whether this will work on your orders

The best test is a sample from recent months chosen to include a bit of every format, especially the worst cases: scans with corrections, multi-page PDFs, spreadsheets with hidden columns. The result is counted separately for each format, because an average of 95% on PDFs and 70% on scans tells you nothing. That is how an AI Worker pilot is built.

At DYNAMINDS Labs, orders in every format are handled by the Order entry operator. It reads the orders@ mailbox, including email text and PDF attachments, and order spreadsheets, maps the customer's names to item codes, checks prices and availability and creates a draft order in the ERP with discrepancies described. When it is not sure about a line, it flags it for review instead of guessing.

Questions and answers

Do I need to prepare a template for each customer?

No. The AI Worker reads the document by content, not through a field mask, so a new customer or a new order form needs no configuration. What helps is history: confirmed matches of names to item codes and the customer's typical quantities, which build up on their own with each order.

How does the AI Worker handle poor-quality scans?

It reads what it can and records read confidence for each field. Uncertain fields, such as a handwritten quantity correction or a digit under a stamp, go to review with a crop of the scan. When the whole scan is unreadable, the case goes back to a person with a request for a better copy from the customer.

What about orders in English or German?

The process is the same, because the common order record does not depend on language. The AI Worker reads the order in the customer's language and fills in the record. Delivery notes stay in the original with a translation, so the warehouse does not have to guess what the customer wanted.

Can orders from different mailboxes go into one process?

Yes. The common record does not depend on whether the email came to orders@, to a sales rep or through a form. What matters is that duplicates from two mailboxes are caught and that each mailbox has defined access. How to set up that access is covered in AI Workers and company email.

Start with one task. Describe it, and DYNAMINDS Labs will prepare a free diagnosis.

Meet DYNAMINDS Labs

Read more: AI Workers

All in AI Workers →