Turning WhatsApp Order Messages Into a Clean Order Sheet
How does an AI agent for WhatsApp business orders work?
An AI agent for WhatsApp business orders reads each incoming message, whether text, voice note or photo of a handwritten list, and extracts the party, item, quantity, unit and delivery date for every line. It matches each line to your item master and scores its confidence. Clear lines go into the order sheet. Unclear lines go to a person. The customer confirms the order before it is booked, and every step is logged.
The aim is a clean sheet your team can trust, not a faster way to guess.
What should the agent extract from each message?
Capture the same five fields from every input type, so the order sheet looks identical whatever the customer sent.
- Party: who is ordering. Resolve it from the sender and any name mentioned in the message, and check it against your customer list.
- Item: the product as the customer described it, kept exactly as written alongside the matched item.
- Quantity: the number the customer stated.
- Unit: pieces, boxes, kilograms, dozens or whatever the customer said. Keep it separate from quantity.
- Delivery date: the date or phrase given, such as "Friday" or "next week", stored with the message date it was read against.
Store the original message with each extracted line. A reviewer should always be able to see what the customer actually wrote.
Leave a field empty when the message does not state it. An empty field is a visible gap. A guessed value looks complete and goes unnoticed.
How do you match lines to the item master?
The item master is the list of products you sell, with their codes, names and permitted units. Customers may not use those names. They use shorthand, local names and brand names.
Match in layers:
- Look for an exact or known alias match, using aliases your team has approved for that item.
- Look for a close match in name, and narrow it using the customer's usual items where you hold that history.
- If more than one item fits, do not choose. Mark the line ambiguous and list the candidates.
- Check that the stated unit is one the matched item can be sold in.
Keep the alias list under your control. When a person resolves an unclear line, offer to save the customer's wording as an alias, so the same phrase matches next time. A person approves each addition.
What confidence rule sends a line to a person?
Set the rule per line, not per message. One unclear line should not hold up five clear ones, and one confident message should not hide a doubtful line.
A workable rule has three outcomes:
- Accept: every field is present, the item match is unique, and the unit is valid for that item.
- Review: a field is missing, two items fit, the quantity looks unusual for this customer, or the source was hard to read or hear.
- Reject and ask: the line cannot be read at all, so the customer is asked to resend it.
Choose the numeric cut-off by testing against your own past messages, not by borrowing a figure. See setting confidence thresholds for document extraction for how to calibrate one. Start strict, and relax it only where review shows the agent is reliably right.
Reviewers need a queue that shows the original message, the proposed line and the reason it was flagged. Designing an AI workflow exception queue covers that handoff, and human-in-the-loop approval steps explains where a person should sit in the flow.
What can go wrong with each input type?
| Input type | What can go wrong | The check |
|---|---|---|
| Text message | Shorthand, mixed languages, several orders in one message, quantity and unit run together | Match against approved aliases, split lines before extracting, validate the unit against the item |
| Voice note | Misheard item names or numbers, background noise, corrections made mid-sentence | Keep the transcript beside the audio, treat numbers and names as low confidence when unclear, honour the latest correction and flag it |
| Photo of a handwritten list | Illegible handwriting, cropped edges, crossed-out lines, ticks that mean something else | Check image quality first, flag crossed-out lines, send unreadable lines for review |
| Any input | Wrong party, repeated order, delivery date relative to an unknown day | Confirm the sender against the customer list, check for a similar recent order, store the message date |
Photo quality affects how much of a list can be read reliably. Scanned document quality for extraction and processing handwritten business forms go deeper on the image side.
What does a worked example look like?
The numbers and items below are illustrative only.
A customer sends three messages in one chat. A text says: "Need 10 box tea and 5 kg sugar, send Friday." A voice note adds: "Also add two dozen of the small biscuit, no wait, three dozen." A photo shows a handwritten list with "oil 2" and a crossed-out line.
The agent produces this:
| Line | Source | Extracted | Outcome |
|---|---|---|---|
| 1 | Text | Tea, 10, box, Friday | Accepted, unique match |
| 2 | Text | Sugar, 5, kg, Friday | Accepted, unique match |
| 3 | Voice | Small biscuit, 3, dozen | Review: the quantity was corrected mid-note, and two biscuit items are called "small", date not stated |
| 4 | Photo | Oil, 2, no unit | Review: unit missing, several oil items fit, date not stated |
| 5 | Photo | Crossed-out line | Review: crossed-out line, reviewer decides whether it is cancelled |
A person resolves lines 3 to 5 using the original message. The agent then sends one confirmation back to the customer, listing every line in plain words: item, quantity, unit and delivery date. The order is booked only after the customer replies to confirm it.
How should confirmation work before booking?
Send the customer a short summary in the same chat, written in their own wording where possible, with the matched item named clearly. Ask them to confirm or correct it.
Rules that keep this safe:
- Do not book on silence. Hold the order as pending until there is a clear yes.
- Treat a correction as a new version of the order and re-run the checks on changed lines.
- Set a time after which an unconfirmed order goes to a person to follow up, instead of expiring unseen.
- Book the order once. Check for an existing booking before creating one, as described in preventing duplicate transactions.
If the customer later changes a booked order, treat it as an amendment, covered in processing order amendments. For orders that arrive by email rather than chat, see turning customer emails into ERP sales orders.
What should the log record?
Keep one log entry per order line and per action, so any booked line can be traced back to its source.
- The original message, its type and the time received.
- The extracted fields and the item matched.
- The confidence outcome and the reason for any flag.
- The person who reviewed it and what they changed.
- The confirmation sent, the customer's reply and the time.
- The booking reference once created.
Apply your retention rules to voice notes and photos, which can contain personal details. Setting data retention for AI automation helps decide how long to keep them.
What mistakes should you avoid, and when does this not apply?
Common mistakes
- Scoring the whole message rather than each line.
- Guessing a missing unit or date instead of leaving it empty.
- Booking before the customer confirms.
- Letting the alias list grow without approval.
- Dropping crossed-out or corrected lines silently.
When this does not apply
This design suits a business that receives repeat orders from known customers in a chat. If you receive only a handful of orders a week, a shared spreadsheet and a person may be enough. If most orders carry complex pricing or custom specifications, extraction is the smaller problem and a quoting process fits better. If you have no clean item master, build that first, because matching has nothing to match against.
What are the common questions?
Can the agent book orders without any human check?
Only for lines that pass every check, and only after the customer confirms. Anything missing, ambiguous or unusual should go to a person. Start with review on every order, then relax it for lines that prove reliable.
What if the customer sends the order in pieces over several hours?
Group messages from the same customer into one open order for a set period, and show the combined list in the confirmation. Ask the customer to confirm only when the list looks complete, and keep the grouping rule visible to your team.
How are voice notes handled when the audio is unclear?
Keep the transcript and the audio together, and mark unclear names and numbers as low confidence. A reviewer listens to the original, or the customer is asked to repeat the item. The agent should never fill the gap with a likely guess.
Do we need an item master before starting?
Yes. Matching needs a reliable list of items, codes and permitted units. If yours is incomplete, clean it up first, since every unmatched line will otherwise land in the review queue and slow your team down.