Skip to content
ManualOut
All posts
Product8 min read

How AI Reads a Free-Text Order

From "12 ctn cola 330" to a matched line item: what actually happens between an incoming message and a validated sales order, and where it should stop and ask.

"12 ctn cola 330." Fourteen characters. A person on your order desk reads that in under a second and knows exactly what it means.

Getting software to do the same thing is more interesting than it looks, and the interesting part is not the bit most people assume.

Two approaches fail here, and both were tried for years.

Optical character recognition turns an image of text into characters. Useful for a scanned PDF, irrelevant to an email that was already text. Getting the letters right was never the hard part.

Text matching — searching your product list for something resembling "cola 330" — fails on the thing that actually matters. It will find your cola. It will not know whether this customer means the twelve-pack or the twenty-four-pack, and it has no way to even represent the uncertainty.

Four things have to be decided at once

"12 ctn cola 330" contains at least four separate judgements, and they depend on each other:

  • 12 is the quantity, not part of the product name. But in "cola 330", the 330 is part of the product — it is the millilitres.
  • "ctn" is cartons. Not cases, not each. Your ERP needs a unit of measure it recognises.
  • "cola" is a category, not a product. You may stock four.
  • Which cola, and which pack, depends on who is asking.

That last one is the whole thing. The same fourteen characters mean different SKUs from different customers, and no amount of reading the text more carefully will tell you which. The information is not in the message.

ManualOutPO #12012Need attention
Source · Email08:12

[email protected]

Order — Thursday delivery

Morning, For Thursday please: 12 ctn still water 500 8 ctn cola 330 6 ctn orange squash 1L 30 pcs salted crackers 10 ctn green tea 48 choc wafers Same delivery address as usual. Thanks, Priya

harborline-po-4471.pdf68 KB

Same order, three channels, identical result. The original stays attached whichever way it came.

Extracted itemsMeridian · NORTHGATE
ProductUnitQtyLine
Still Water 500ml — 24pkCTN12$100.80
Cola Classic 330ml — 24pkCTN8$89.60
Orange Squash 1L — 12pkCTN6$87.00
Salted Crackers 200gPCS30$49.50
Green Tea 250ml — 12pkCTN10$98.00
Chocolate Wafer 45gTwo products match this name — needs a decisionPCS48$34.56
Order value
$459.46
Minimum
$750.00
Status
Under minimum

Six lines, one unmatched, and the order is short of this account's minimum. Both reach the desk as decisions rather than typing.

Six lines in, six lines out — five matched, one flagged. The flagged line is the system working, not failing.

The account's history is the missing input

This is where it resolves. Northgate Grocers has ordered Cola Classic 330ml in the twenty-four-pack forty times and has never ordered any other cola. "12 ctn cola 330" from Northgate is not ambiguous. It is obvious.

The same message from an account that has never ordered cola is genuinely ambiguous, and should be treated as such. Same text, different confidence, because the context is different.

This is what your experienced clerk is doing, and it is why they are hard to replace and harder to hire. They are not reading better than a new starter. They know the account.

Free text is not the hard part. Free intent is

Real orders contain instructions that are not lines at all:

  • "Same as last week but drop the tea" — an order defined by reference to another order, with an exclusion.
  • "Usual delivery address" — a fact, not a line, and it needs to reach the right field.
  • "Can you check if the wafers are back in stock?" — a question sitting in the middle of an order.
  • "Make it 20 if you have them" — a conditional quantity.

The last one is worth dwelling on. There is no correct automatic answer. The system can check stock and decide, but it has just made a commercial decision on your behalf. That line belongs to a person.

Knowing when to stop

The measure of a system like this is not how many lines it matches. It is whether it knows which ones it should not have.

A line matched at high confidence, against an account with fifty prior orders of the same product, should go straight through. A line matched at 60% confidence, or a quantity ten times this account's normal, or a product they have never bought, should stop and ask — with the original message attached so the person deciding can see what the customer actually wrote.

A system that never flags anything is not more accurate than one that does. It has just stopped telling you when it is guessing, and it now has your ERP's authority behind it. That is a worse position than typing.

See it run on one of your own orders

Send us a real order — the messiest one you can find. We will run it live and show you what happens when it works, and when it does not.