An order-intake pipeline for PDFs arriving by email: per-field confidence thresholds, what goes straight through, what a human sees, and the audit trail.
Key takeaways
- The routing decision belongs to the field, not the document. A file whose quantity is crisp and whose delivery address is smudged is not a failed document - it is a document with one field in the queue.
- High confidence does not mean correct. Amazon Textract returns a percentage `Confidence` on every detected block, and the documentation itself notes that low-confidence detections may need visual confirmation by a human.
- Consistency checks catch what a confidence threshold cannot: an SKU missing from the catalogue, a quantity ten times this customer's norm, a line total that is not quantity times unit price.
- Every draft carries a link back to the source file and page. Without it a reviewer is guessing, and the queue stops being a control.
- The log stores the extracted value, the approved value, who approved it and when. That first pair against the second is the only data that lets you tune the thresholds later.
An order-intake pipeline is not an extraction engine. The extraction engine returns a value and a confidence score per field; the pipeline is what decides what to do with that number. Every order enters as a draft, each field is routed against its own threshold, and only a draft whose fields all cleared becomes a real order.
What an order-intake pipeline does that an extractor does not
An extractor takes a file and returns fields. A pipeline takes an email with an attachment and returns a decision: release, hold for approval, or reject. Those three decisions are the product. Extraction is one stage out of seven.
- Ingest - the message is stored with its message id, sender address, subject and every attachment. The file is kept exactly as received, unprocessed.
- Classify - is this an order at all. Supplier invoices, delivery notes and email signatures saved as image attachments are the three classification errors you will actually see.
- Identify the customer - sender address against the customer record. An unrecognised sender is not an error; it is an item in a different queue.
- Extract - a value and a confidence score for each field you declared required.
- Validate against the business - SKU against catalogue, price against agreement, quantity against history.
- Route - on the weakest field in the draft, never on the document's average confidence.
- Approve - create the real order and return an order number to the sender.
The common failure is jumping from stage 4 to stage 7. That produces an order that looks perfectly healthy in every report, and nobody knows the quantity says 100 instead of 10 until the truck arrives.
Where does the confidence number actually come from?
From the engine that read the document, and its meaning is narrower than people assume. Amazon Textract's documentation defines Confidence as the percentage confidence the service has in the accuracy of the detected item, and adds that depending on the scenario, detections with low confidence might need visual confirmation by a human. That is a statement about character recognition, not about whether the value makes sense.
That distinction is the whole difference between a pipeline that works and one that produces confidently wrong orders:
- A typed PDF reading
Quantity: 100will be extracted with very high confidence, even when the customer meant 10 and added a zero. - A skewed scan of the same document will be extracted with low confidence, even when the extracted value is completely correct.
- An empty field does not return low confidence. It returns no field at all, and that is a third state needing its own handling rather than being folded into "weak".
So a confidence threshold is necessary and not sufficient. It filters bad reading. Business validation is what filters bad values.
Routing table: what goes straight through and what stops
The thresholds below are an example configuration to calibrate against your own documents, not authoritative values. The principle is that the more a mistake in a field costs, the higher its threshold and the harder its accompanying check.
| Field | Example value | Straight-through threshold | Additional business check | On failure |
|---|---|---|---|---|
| Customer PO number | PO-44812 | 95% | Unique against the last 90 days | Queue, flagged as possible duplicate |
| SKU | AC-2210-BLK | 98% | Exists in the active catalogue | Item-matching queue |
| Quantity | 12 | 99% | Inside this customer's historical range | Queue, with the history shown |
| Unit price | 47.50 | 99% | Matches the customer's price list | Pricing queue, never straight through |
| Delivery address | 14 Herzl St, Netanya | 90% | Known on the customer record | Logistics queue |
| Requested delivery date | 2026-09-21 | 95% | In the future, and a working day | Queue |
| Line total | 570.00 | Not applicable | Equals quantity times unit price | Reject, the document is inconsistent |
Look at the last row. A line total is not a field you extract and trust; it is a field you extract and check with. If 12 times 47.50 is not 570.00, one of those three values is wrong - and that is the cheapest way there is to catch an extraction error without spending a person on it.
How is a wrong extraction caught before it becomes a wrong order?
In three layers, applied in order rather than in parallel:
- Internal consistency inside the document. Line totals against the grand total, the declared line count against the lines counted, one currency throughout. A document that disagrees with itself is rejected rather than queued, because there is nothing in it to approve.
- Agreement with your own business data. SKU against the catalogue, price against the customer's agreement, address against the addresses you already hold. This is where most of the errors that sailed past the confidence threshold get caught.
- Deviation from historical behaviour. A customer who reliably orders 8 to 15 units and today ordered 120 is not necessarily wrong, but is necessarily a queue item. This rule catches exactly the extra-zero error, which is the most expensive mistake in order intake.
What survives all three layers is a small set that genuinely needs an eye on it. That is the goal - not removing the human, but bringing them only what deserves looking at, with the original document open beside it.
What the review screen shows, and why two buttons rather than three
A good queue screen is not a form. It is a comparison between two things: what the system extracted, and what the file says.
- The original file is displayed alongside the form, scrolled to the page and region the suspect field came from.
- Every field shows its confidence, and every field below its threshold is marked. The others need no attention and should not attract any.
- Beside the field sits the context needed to decide: this customer's history on this item, the price list that applies to them, the addresses already on their record.
- Two buttons only: approve as extracted, or correct and approve. There is no third "skip", because skipping creates drafts that sit in the queue forever.
- A draft older than a configured number of hours escalates to someone else. A queue without a clock becomes an archive within a month.
Related: extracting data from PDFs with AI, automating order processing end to end, keeping quote, order and invoice under one identifier.
What the audit trail stores, and why it is what lets you tune
Every intake writes an audit record that is never deleted and never updated - only appended to:
- The original email message id and sender address, exactly as received.
- The original file itself, not a processed or compressed rendition of it.
- The extracted value for each field, together with the confidence returned for it.
- The final approved value, including when it is byte-identical to the extracted one.
- Who approved it, when, and how long the draft sat in the queue before anyone touched it.
The pair "extracted value against approved value" is what calibrates the system. After two hundred orders you can ask a precise question: in which field does the human change what was extracted, and in what confidence band. A field where the reviewer approves unchanged 98% of the time has a threshold set too high and is slowing down healthy work. A field where the reviewer keeps changing values even above the threshold has a threshold set too low, or a missing business check. Without the log, both questions are guesswork, and the thresholds end up set by whoever complained most recently.
Sources
Frequently asked questions
How many orders should reach the human queue?
There is no universal figure, because it follows from the quality of the documents you receive and the thresholds you set. What you can measure is the correction rate inside the queue: if most queued items are approved with no change, the thresholds are too high and you are holding up healthy work for nothing.
What do we do when the document is a phone screenshot?
Treat it like any other source, but expect lower confidence scores and a higher share of queued items. What you must not do is open a separate intake path for screenshots, because that leaves you with two systems and two sets of rules, only one of which is genuinely tested.
Can we drop the queue once the system is accurate?
You can promote fields to straight-through based on what the log shows, and that is usually what happens over time. What is rarely worth full automation are the fields where an error costs money immediately - price, quantity and delivery address - even when their confidence scores are high.
What happens when the same order is emailed twice?
A uniqueness check on the customer PO number across a fixed window is what catches it, not a file comparison. A customer resending a corrected file under the same PO number should produce a queue item showing both versions side by side, rather than a second order.
Keep reading
Related service
Business Automation
I build custom automations that remove repetitive work end to end.
About the author
Yehonatan Saadia
Freelance automation, web & MVP developer
I'm Yehonatan Saadia, a senior developer who builds business automation, custom websites, and MVPs for small and mid-sized companies across the US, Europe, and Israel. These guides come from real client work, not theory.
Work with meHave a project like this?
Tell me what you're trying to automate or build. I reply within 24 business hours with a few targeted questions, then we walk through it on a free 30-minute call, with no commitment. You come away with a scope, a timeline and a fixed price - or a straight answer that it isn't worth building.
