Skip to content

AI and automation · implementation

AI Document Processing: From a PDF Purchase Order to a Valid Sales Order

AI document processing is the use of AI to turn document details into structured data a process can use. For orders, match products and check customers, units, prices and totals before accepting lines. Send disputes to a person, and use OCR first for scans.

Beezr · Published · 9 min read

Sandline, our example company, runs this on Beezr → see how

On this page

Monday morning. Sara has a PDF open on Sandline's sales desk. One line says “Gloves nitrile M 100pcs”. She can read it just fine.

“So which product do we ship?”

That's the gap AI document processing needs to cross. Let's follow one PO from words on a page to checked sales order lines.

What is AI document processing?

AI document processing turns document details into structured data for a process. AWS describes intelligent document processing (IDP) as moving manual entry from paper or document images into digital form. OCR is one technology within it.

Think of a receiving desk. Reading the packing slip doesn't mean accepting the goods. You still check what arrived against what was expected.

Keep three questions apart. What does the page say? Which records does it mean? Can we accept those terms?

Those jobs are extraction, matching and validation.

How does a document extraction workflow work?

Palmgate Clinics sends Sandline Supplies PO 7731, dated 12 October 2026. Four of its six lines have clean catalogue references. Line 05 has only the gloves wording; line 06 has TPE-48 with a different price.

Open the PO and catalogue together. A catalogue price is a reference. A person decides whether to accept a different quote.

Download the fictional six-line PO 7731 (PDF)

Download Sandline's fictional product catalogue (CSV)

Inspect the CSV or import it as catalogue records. Here, a Load data step brings Products records into the AI instructions.

From PO 7731 to accepted lines

  1. Read. Take the PDF from a file field. Use an OCR connector first for scans.
  2. Extract. Return proposed header and line fields.
  3. Match. Compare source wording with the loaded catalogue.
  4. Check. Check customer, identifiers, units, quantities, prices and sums.
  5. Ask. Have a person settle unsupported matches or disputed terms.
  6. Create. Run a Smart Script after checks and approval.

Six stages don't mean six AI calls. One Beezr AI step can read and match. Later steps check and approve.

Choose the answer shape first: fields, objects and lists. Beezr saves it under a name for later steps.

Keep the PO reference, source wording, quantity, unit and quoted price. Add a proposed SKU and a review reason for unmatched lines.

Tell the AI to keep source descriptions and use only supplied identifiers. Where evidence is missing, leave the identifier empty and explain why. Test those instructions on your own documents.

Keep missing values missing. A missing quantity needs a question, not a guess. Set that rule before seeing the answer.

From the PO to accepted linesSix numbered stages preserve PO 7731 and its source phrase. NG-200 is a candidate with size M unresolved. A magnifying glass reads the source; an open catalogue carries a glove; a checklist validates the proposal. Hana’s review stamp precedes accepted index cards. The six source rules represent six PO lines. 1 · ReadPalmgate Clinics · PO 77312 · ExtractGloves nitrile M 100pcs3 · MatchNG-200 · candidateNitrile gloves, box of 100Size M?4 · ValidateCustomer · unitsPrices · totals5 · ExceptionsHana · approve / rejector clarify6 · Create linesAccepted linesBeezr workflow patternPrice difference
From the PO to accepted linesSix numbered stages preserve PO 7731 and its source phrase. NG-200 is a candidate with size M unresolved. A magnifying glass reads the source; an open catalogue carries a glove; a checklist validates the proposal. Hana’s review stamp precedes accepted index cards. The six source rules represent six PO lines. 1 · ReadPalmgate Clinics · PO 77312 · ExtractGloves nitrile M 100pcs3 · MatchNG-200 · candidateNitrile gloves, box of 100Size M?4 · ValidateCustomer · unitsPrices · totals5 · ExceptionsHana · approve / rejector clarify6 · Create linesAccepted linesBeezr workflow patternPrice difference
The source description stays visible while each stage adds evidence.

Does the proposed product really match?

The intended match for “Gloves nitrile M 100pcs” is NG-200. Its name is “Nitrile gloves, box of 100”. Keep both phrases visible.

Detail What it tells us
Line 05: 40 boxes at AED 28.00 Catalogue unit and price agree: a box at AED 28.00
NG-200 has no size in its name It doesn't establish medium
NG-201, NG-202, NG-203 Small, large and extra-large have separate SKUs
PO substitution rule Procurement must approve substitutes; Sara should confirm the proposed match
Unit A box of 100 gloves isn't one glove

Check each returned SKU against the loaded Products. A display name should not create a new Product as a side effect. Unsupported products go to review.

Do the numbers and terms pass?

Recompute line amounts using Sandline's rounding policy. Compare them with the source. Check quoted prices against catalogue prices too.

PO 7731 check Result
Line 06: 30 rolls of TPE-48 at AED 6.00 AED 180.00; the sum is right
Catalogue price AED 6.50 a roll; a person must decide the price
Six-line subtotal AED 2,760.00
5% VAT AED 138.00
Total AED 2,898.00

The sums pass. The price still needs a decision. Don't silently “fix” a quote to match the catalogue.

Check customer identity apart from the delivery address. A familiar name isn't a confirmed customer record. Require an accepted identifier or a review.

What can go wrong Check to configure What happens next
A line is missing or duplicated during extraction Compare proposed lines against the source document Hold for source review; six populated entries alone don't prove completeness
A plausible SKU isn't in Products Test the candidate against the loaded catalogue Return an unresolved match
“M” or another requested attribute isn't supported Compare requested attributes with product evidence Ask Sara to clarify
Boxes are treated as individual pieces Compare source unit with the product unit and any agreed conversion Stop until the unit is established
Quoted price differs from reference price Compare both values, retaining both Ask Hana to approve, reject or clarify
Extracted amounts disagree Recompute amounts and compare using the agreed rounding policy Hold the order for review
Customer identity is incomplete Require a supported customer match Clarify before line creation
A run fails while creating lines Inspect run steps and existing records before repeating writes Resolve the partial result before resuming

Configure these checks in the workflow. Then add the ways your own paperwork goes wrong.

Sandline · example

Hana gets a question she can answer

The six-line proposal reaches the checks. NG-200 needs size confirmation. Line 06 fails the price check: AED 6.00 quoted, AED 6.50 listed.

A Decision sends an approval task to Hana. Its record has the PDF, source line, proposed SKU and both prices. The review reason says what failed.

She can approve, reject with a reason or ask for clarification. After required approval, a Smart Script creates accepted sales order lines. Unresolved lines stay on the exception branch.

The price exception on Hana’s clipboardPO 7731 line 06: Packing tape 48 mm, TPE-48, 30 rolls. Quoted AED 6.00 per roll versus catalogue AED 6.50. AED 180.00 arithmetic passes; price differs. Hana may approve, reject or ask for clarification. The attached source is kept with the review. PO 7731 · line 06Packing tape 48 mmTPE-4830 rollsCustomer POAED 6.00 / rollCatalogueAED 6.50 / rollPO amount · AED 180.00 · Arithmetic ✓Price differsHana · Approve / Reject / Ask for clarification
The price exception on Hana’s clipboardPO 7731 line 06: Packing tape 48 mm, TPE-48, 30 rolls. Quoted AED 6.00 per roll versus catalogue AED 6.50. AED 180.00 arithmetic passes; price differs. Hana may approve, reject or ask for clarification. The attached source is kept with the review. PO 7731 · line 06Packing tape 48 mmTPE-4830 rollsCustomer POAED 6.00 / rollCatalogueAED 6.50 / rollPO amount · AED 180.00Arithmetic ✓Price differsHana · Approve / RejectAsk for clarification
A reviewer needs the disagreement, not just an AI warning.

Use clear reasons: missing identifier, unconfirmed size, different price. “The AI wasn't sure” doesn't tell Hana what to settle.

Which input route should you use?

A PDF with real text is a typed letter. A scan is a photo of one. They need different preparation.

OCR turns images of text into machine-readable text. Amazon Textract reads typed and handwritten text, forms and tables in images and PDFs.

Check the connector's output and map it into the next stage. Keep the source within reach. Neat fields won't fix an unreadable digit.

Input route When we'd use it Honest catch
Import or parser Data already has agreed columns or keys Correct shape doesn't establish correct business values
AI step over a readable document Layout or wording needs interpretation Proposed fields and matches need validation
OCR connector before interpretation Input is a scan or image Reading errors can enter before matching starts
Human entry or clarification Source is incomplete or the commitment is disputed Someone must own the queue and resolve the question

Choose how to read, then keep the checks

  • If CSV or JSON already has fields → use its parser.
  • If a readable PDF has varied wording → use AI with catalogue context. Check its proposed fields and matches.
  • If the input is scanned → use OCR first. Test its output.
  • If identity, attributes or terms remain unclear → ask a person before creating accepted lines. Someone must own that queue.

How do you test the final order?

Write expected matches, price review and approval results for PO 7731. Add a missing line, unreadable quantity and unknown product description. Use your own documents too.

Anthropic separates the transcript, or run record, from the outcome: the final state. Grade the proposal and the final records. Did any lines appear before Hana approved?

A good proposal that skips approval fails. A correct stop to ask a question can pass.

How Beezr does it

How Beezr does it. Our AI page's PO pattern uses a live product list and a Smart Script to create lines. You add Decisions and approvals. Run history shows steps, timings and errors; approval history shows who approved what.

Myth / Reality

“Structured output means a valid order.” Filled fields still need checks on the customer, product attributes and agreed terms.

Our take

Our take. Show Sara or Hana the review record first. If it doesn't let them settle the question, improve it before adding AI calls.

Key takeaways

  • If you're technical: keep source, proposed fields, matched identifiers and accepted records distinct. Check before writing.
  • If you're not: ask to see the original line and failed check beside the approval choices.
  • A pause for clarification can be the right result.

Build the purchase-order processing pattern in Beezr

Build this workflow pattern with your own acceptance checks.

  1. Keep the source. Add a file field for the readable PDF. Use an Integration Hub OCR connector first for scans.
  2. Load Products. Include the live workflow list in AI instructions.
  3. Ask for proposed lines. Set fields, objects and a list. Name the saved answer.
  4. Check and ask. Add a Decision and approval for disputed terms.
  5. Create accepted lines. Run Smart Script after checks and approval. Inspect run history in tests and failures.

Questions readers ask

Can I automate purchase order data entry?

Yes: Beezr's AI step reads the PO and proposes matched lines. A Smart Script creates lines after your checks and required approval.

What does a document extraction workflow include?

Reading, extraction, matching, checks, exception review and accepted line creation. Extraction and matching can share one AI step.

What file routes does Beezr use?

The AI step reads PDF, Word, Excel, PowerPoint, text and HTML files. Send scans and images through an Integration Hub OCR connector first: Amazon Textract, Google Cloud Vision or Mistral OCR.

For structured CSV, use the CSV parser or record import.

Does OCR support the languages I need?

Check first. Textract's listed languages are English, Spanish, German, Italian, French and Portuguese. That matters for Arabic paperwork.

Should confidence scores decide what gets reviewed?

Textract recommends review thresholds based on how sensitive the task is. That refers to its own scores. A language model saying it's “sure” is different.

Is intelligent document processing the same as OCR?

No. AWS lists OCR as one part of IDP. Reading text still leaves product matching and acceptance checks.

Sandline Supplies is a fictional example company.

Sources

  1. What is Intelligent Document Processing? · AWS · Undated; accessed 2026-10-17
  2. What is Amazon Textract? · AWS · Undated; accessed 2026-10-17
  3. Best Practices for Amazon Textract · AWS · Undated; accessed 2026-10-17
  4. Demystifying evals for AI agents · Anthropic · 2026-01-09

Related guides

Your process, made concrete.

Let's talk

Show us how the work runs today. We'll work through what to build with you.

Talk to us