AI That Reads Every Purchase Order: Automating Order Entry for a UAE HORECA Distributor
How Techies Infotech built an AI document-extraction pipeline that turns purchase orders arriving as PDFs, scans, images and HTML exports into clean, ERP-ready orders for a Dubai-based food distributor serving hotels, restaurants, cafés and caterers, and is now adding ordering straight from a WhatsApp catalogue so smaller customers never need paperwork at all.
- 20,000+purchase orders processed so far
- 170+customer layouts with their own instruction sheet
- 100%field accuracy on layouts with a sheet

- Industry
- HORECA food & beverage distribution
- Market
- UAE
- Platform
- AI document extraction (Claude) + ERP integration
- Engagement
- AI order automation (in UAT) + WhatsApp commerce (in build)
The project in 30 seconds
The challenge
Hundreds of purchase orders a day arrived as PDFs, scans, images and HTML, each laid out differently, and every one was typed into the ERP by hand.
What we did
We built an AI pipeline that reads any order from a SharePoint folder, applies a per-layout instruction sheet, cleans and maps the data and scores its own confidence.
The result
Over 20,000 orders processed, 100% accuracy on covered layouts, and only low-confidence orders reach a person before going to the ERP.
From a purchase order in any format to a clean ERP order, untouched
Nobody feeds the system one document at a time. Orders land in a folder, and every step after that runs on its own, with a person stepping in only where the system itself is unsure.
Intake from SharePoint
Purchase orders (LPOs) are dropped into a watched SharePoint folder as PDFs, scans, images or HTML exports and picked up automatically.
Duplicate check
The system remembers every order it has handled. A re-sent or forwarded order is moved to a duplicates folder instead of being read or pushed again.
Layout detection
It identifies which customer and which order layout the document belongs to, and loads that layout's instruction sheet alongside the general rules.
AI extraction
Claude reads the header and every line item: tax number, PO number, dates, contact, delivery point, barcode, item code, description, unit, pack size, quantity, price and total.
Self-checks
Where a sheet defines one, the model verifies its own reading, for example quantity × price plus 5% VAT against the printed total, and corrects a shifted column.
Normalisation
Values are stripped of print artefacts, spacing is tidied and every date is converted to one standard format using that customer's known convention.
Customer & address mapping
Every spelling of a customer name or outlet, and every branch or cost-centre code, is matched to the single record the ERP already holds.
Confidence gate & ERP push
Each value carries a confidence score. Orders above the threshold (90% today) go straight to the ERP; the rest are held for review with weak fields flagged.
Turning Hundreds of Daily Purchase Orders into ERP-Ready Data Without Manual Typing
Our client is a Dubai-based HORECA food distributor. Every working day it receives purchase orders, known locally as LPOs, from hotels, restaurant groups, supermarkets, hypermarkets, cloud kitchens and catering companies across the UAE. Those orders arrive as PDF attachments, scanned pages, images and HTML exports from whatever purchasing system each customer happens to run. Before anything could be picked or delivered, somebody had to read every order and type it into the ordering system.
Read the full backgroundShow less
That work was slow and did not scale. A busy morning brings in hundreds of orders, many running to dozens of line items, each laid out differently from the last. Typing errors were inevitable, and every one turned into a wrong delivery, a credit note or a phone call later in the week.
The goal was easy to describe and hard to deliver: take any purchase order that arrives, read it without anyone touching it, and produce clean structured data the ERP can accept directly. For every order the system captures the customer's tax registration number, PO number, order date, customer name, contact email and phone and requested delivery date, and for every line the delivery location, barcode, article code, description, specification, unit of measure, packing factor, quantity, unit price and line total.
Alongside each value the system returns a confidence figure and a short note whenever something had to be repaired or looked doubtful. That early design decision became the heart of the product: instead of checking every field of every order, a reviewer goes straight to the handful of values the system itself was unsure about, and the confidence figure now decides whether an order needs a human at all.
The engagement tackles the problem from both ends. Reading purchase orders properly solves it for the customers who send them; ordering over WhatsApp, now in build, removes the paperwork altogether for everybody else. More than 20,000 purchase orders have been processed so far with deterministic, confidence-gated straight-through processing and automatic duplicate protection, and the system is in user acceptance testing with the client's own team on live orders. The client's name is withheld under NDA.
How HORECA supply and distribution works
HORECA (also written HoReCa) stands for Hotels, Restaurants and Cafés, with "CA" sometimes also standing for Catering. A HORECA distributor supplies these businesses across two broad categories.
Food & beverage supply
- Fresh produce
- Frozen and chilled goods
- Dairy
- Specialty and dietary items
- Pantry staples
- Beverages
Equipment & non-food supplies
- Back-of-house kitchen machinery: ovens, refrigeration, prep gear
- Front-of-house tableware and glassware
- Bar and coffee equipment
- Linens and disposables
Scope of work
- LLM document extraction (PDF, scans, images, HTML)
- 170+ layout-specific instruction sheets
- Normalisation & customer / address mapping
- Confidence scoring & human review
- SharePoint intake, de-duplication & ERP push
- Review web application & testing utility
- WhatsApp catalogue ordering & admin panel (next phase)
Why One Generic AI Prompt Could Not Read Every Purchase Order Correctly
Supplier and Customer Details Kept Getting Mixed Up
The distributor's own name, address, phone, email and tax number are printed on almost every order, usually larger and bolder than the customer's. A generic model would take the nearest tax number and return the supplier's registration instead of the customer's. Label variations (PO No, LPO No, Order Number and in-house codes) made it worse.
Dates, Codes and Totals That Depend on Who Sent the Order
Some customers write the day first, others the month first, and some switch between order and delivery date on the same page. One order can carry a barcode, an article number, a supplier reference and a catalogue code side by side. Line totals are printed before tax, after tax or both. The right answer depends on the sender.
Delivery Points Hidden in Unexpected Places
Some documents carry a clean Ship To block. Others bury the delivery point in a department code, a cost-centre heading above a group of items, an outlet name repeated under each line, or a branch number tucked into a corner of the page.
Damaged, Duplicated and Multi-Order Documents
Scanned pages, tables whose columns collapse into one cell, product names cut off mid-word, HTML exports that repeat every line two or three times, and single files holding several orders stacked together. Pushing a general prompt harder to fix one customer broke documents it had read correctly the week before.
A Layout-Aware AI Pipeline Built for Supply-Chain Accuracy
01A Template Override for Every Order Layout
We kept a detailed general instruction set as the foundation and added a short, specific instruction sheet for each distinct order layout. The system identifies which customer and layout a document belongs to and loads the matching sheet alongside the general rules; where they disagree, the specific sheet wins. Each sheet names the columns in the order they appear, says which column holds the article number and which the barcode, states whether line totals include tax, points at the label the delivery address sits under, gives the date format and names the traps. There are now more than 170 sheets covering hotels, restaurant groups, supermarket and hypermarket chains, cloud kitchens, caterers and online grocers, with two for customers who order from two different purchasing systems.
02Self-Checks the Model Runs on Its Own Output
Several sheets carry a check the model runs on itself. On one layout it multiplies quantity by unit price, adds 5% VAT and compares the result with the printed total; if they disagree, it has read the columns one place out, and the sheet tells it exactly how to correct itself. Two authoring rules keep the library robust: never write a customer's actual values into a sheet (point at the label instead), and never write an instruction that only makes sense for one sample file.
03Normalisation Layer for ERP-Clean Values
Every extracted value passes through a normalisation layer before it goes anywhere else. It strips pipe symbols left by flattened tables, backticks, asterisks, dot-leaders, stray quotes, non-standard spaces and currency symbols inside numbers, and tidies spacing. Dates get special handling: day-first, month-first, month names and abbreviations, two- and four-digit years, any separator and stray timestamps are all converted, using the customer's known convention from its sheet, into one standard format.
04Customer and Delivery-Address Mapping
The same business rarely writes its name the same way twice: with or without the licence suffix, with the emirate added, in capitals with a branch code in front. Outlets appear as codes, kitchen names or in-house nicknames. A mapping layer matches every variation back to the single customer record and every delivery spelling or code to the outlet it means, so the ERP never opens a duplicate record because a name was written slightly differently.
05Model Selection for Accuracy and Determinism
We started on GPT-5 mini, which was fast and economical enough to prove the idea but struggled on harder layouts that require holding several rules at once. We then tested Amazon Bedrock with Nova 2 Lite: accuracy fell short, and the same document produced different answers on different runs, which makes a system untestable. We moved to Anthropic's Claude, using Haiku for straightforward documents where speed and cost matter and Sonnet for difficult ones. Accuracy reached 100% on layouts with sheets, and the same document now produces the same result every time, so a fix stays fixed.
06Automated Intake, Confidence Gate and Review Application
Orders are dropped into a SharePoint folder that the system watches; anything new is picked up, read and structured with no one pressing a button. Orders above the confidence threshold (90% today, planned to rise to 95–96% after UAT) are pushed straight to the ERP. Orders below it are held in a web application that lays out the header and line items with uncertain values flagged; the reviewer corrects, approves and the order flows on. Re-sent or forwarded orders are recognised and moved to a duplicates folder so nothing is ordered twice. New customers or layouts are onboarded by writing a new sheet, not by changing the application.
Measured, Iterative AI Engineering from Prototype to UAT
Step 1
Start General, Learn Where It Fails
A single detailed prompt proved the concept on easier documents and, just as importantly, showed exactly where it broke: supplier versus customer details, dates, codes, totals, delivery points and damaged files. Those failure patterns shaped the architecture that followed.
Step 2
Specific Beats General
Instead of tuning one prompt until it broke something else, we layered short, blunt per-layout sheets on top of the general rules. Once a layout had its own sheet, orders from it were read correctly field for field and line for line.
Step 3
Build the Measuring Tool Early
Our own testing utility runs batches of orders through the full pipeline, compares results with known-correct values field by field, and re-runs a single document straight after a sheet is edited. A change could be checked against the whole set in minutes, which is what let the library grow past 170 sheets safely.
Step 4
Earn Trust Before Removing the Human
The confidence threshold starts at 90% so the client's team can watch the system's judgement on live orders during UAT, then tighten it to 95–96%. Confidence scores and flagged notes are sortable in the tools, so review time goes only to the values that deserve attention.
Business Impact from AI Order Automation
- 20,000+purchase orders processed so far
- 170+customer layouts with their own instruction sheet
- 100%field accuracy on layouts with a sheet

100% Field Accuracy on Covered Layouts
Every layout with its own instruction sheet is read correctly, field for field and line for line. The sheets now cover the customers the distributor deals with day to day, across more than 170 layouts.

20,000+ Purchase Orders Processed
More than twenty thousand orders have run through the pipeline, from SharePoint intake to structured ERP-ready data, with duplicates caught before they could be ordered twice.

Deterministic, Testable Output
On Claude the same document produces the same result on every run, so fixes stay fixed, regression tests stay meaningful and the operations team can trust what reaches the ERP.

Human Review Only Where It Is Needed
High-confidence orders go straight to the ERP. The rest arrive in the review app with weak fields flagged, so people spend their time on the few values that matter, and onboarding a new customer means writing a sheet, not changing software.
What we learned
A general prompt sets the floor, not the ceiling
It is worth writing well and carries you a long way, but on its own it will not reach the accuracy a supply chain process needs.
The specific beats the general
A short sheet that names the actual columns on an actual page is worth more than pages of careful general guidance.
Reading the value is only half the work
A correct value can still be unusable if it arrives wrapped in print characters or under a name the ERP has never seen.
Consistency is a feature in its own right
A model that is right most of the time but different every time is harder to work with than one that is completely steady.
Build the measuring tool early
The instruction-sheet library could only grow safely because we could see, in minutes, what a change did to everything else.
Describe the layout, never the sample
Instructions written around one sample file break on the next order; instructions written around the shape of the page keep working.
Taking orders over WhatsApp, with clean data from the start
Reading purchase orders properly solves the problem for customers who send them. Many smaller customers never raise one; they send a message or call. The next phase removes the paperwork altogether: they open a chat, browse the catalogue inside WhatsApp, pick and send, with no app to install, no login and no portal to learn, and the order arrives already structured with real product codes. Most of the build sits behind an admin panel that keeps one catalogue in step with what customers see on WhatsApp.
Data model
Products, categories, prices, units, images and stock status arranged so a product means the same thing in the catalogue, the admin panel and the ERP.
Backend
Create, read, update and delete operations behind the panel, with an audit trail of who changed what and when.
Meta Commerce sync
Every admin change pushed to the WhatsApp catalogue and confirmed, with handling for failed pushes, rejected images and drift between the two sides.
Admin interface
Screens built for the catalogue owner, not a developer: bulk editing, simple image upload and an honest view of what is live.
Sync monitoring dashboard
Built on the purchase-order log viewer pattern: every catalogue change, whether it reached Meta, and what to do about the ones that did not.
Access control, testing & deployment
Roles and permissions from day one, plus proper pre-release checks and a release process that does not depend on one person's memory.
Technology we used
- Claude Haiku & Sonnet (Anthropic)
- GPT-5 mini (evaluated)
- Amazon Bedrock, Nova 2 Lite (evaluated)
- Microsoft SharePoint
- ERP integration API
- Web application (review & upload)
- Regression testing utility
- Order log & sync monitoring dashboards
- WhatsApp Business & Meta Commerce (next phase)
Want results like these?
Tell us where you are today. A senior consultant will review your setup and come back with a practical plan, timeline and estimate, with no obligation.
- eCommerce, apps and integrations for brands across the UAE, Saudi Arabia and the GCC
- Adobe Commerce, Shopify Plus, VTEX and headless experts in one team
- Office at Dubai CommerCity




