How to Automate PO and Invoice Matching in Malaysia
Automate three-way matching of purchase orders, delivery orders and supplier invoices: steps, tolerances, AI extraction, approval and what to measure.
To automate PO and invoice matching, extract the fields from each supplier invoice with an AI or OCR step, look up the matching purchase order and delivery order in your system, compare quantity and price within set tolerances, and send only mismatches to a person. Finance should approve before anything is posted to the ledger.
Part of the guide: AI Automation in Malaysia: The 2026 Guide for SMEs

On this page
Three-way matching is one of the best first automations in a trading or distribution business: high volume, clear rules, and a cost for every error. It is also a place where an unchecked AI mistake turns into a wrong payment, so the control design matters as much as the extraction.
Part of the guide: AI automation in Malaysia. Shorter context for traders: PO and invoice reconciliation. Checked 22 October 2026.
What are the steps?
- Receive: invoices arrive by email or upload; the workflow saves the file with a reference.
- Extract: an AI or OCR step reads supplier, invoice number, date, PO number, lines, tax and total.
- Validate: rules check that line totals add up, tax is plausible and the invoice number is new (duplicate check).
- Match: look up the PO and delivery order by PO number; compare quantity and unit price per line.
- Decide: within tolerance, mark "matched"; outside tolerance, create an exception.
- Approve: finance reviews exceptions and approves batches.
- Post: write to the accounting system or create the payment batch, only after approval.
- Log: keep the original file, the extracted data and who approved.

What tolerances should you set?
Decide these with finance, in writing, before building.
| Check | Example rule (illustrative) |
|---|---|
| Quantity | Invoice must not exceed quantity received |
| Unit price | Within an agreed percentage of the PO price |
| Total | Within a small ringgit amount or percentage |
| Duplicates | Same supplier and invoice number is blocked |
| New supplier or bank change | Always manual review |
The numbers above are examples. Your own history of disputes tells you where to set them.
Where does the AI step belong?
Only in extraction. Matching and tolerance decisions should be plain rules, because a rule is predictable and auditable. If the AI is unsure of a field, it should say so, and the invoice goes to a person. Compare the logic in Automation or AI first?.
Template-based reading fails when suppliers change their PDF layouts. A language model copes better with mixed Malay and English line items and with reference numbers typed in the wrong field, but a handwritten quantity change on a delivery-order photo should still go to a person. The result is a structured draft in your accounting system, not an automatic posting. A sensible intake path is: invoices from email or WhatsApp into one document store, extraction and matching against PO and goods-received numbers, an exception queue that states the reason in plain words, and finance approval before the post. To size the problem first, measure staff hours a month on manual matching, the share of invoices on hold for more than five days, and duplicate payments or missed credit notes in ringgit. Write controls on every posting step as described in the write-path security guide; the wider picture for distributors is in AI for trading and distribution.

What can go wrong?
- Handwritten or scanned delivery orders that the extraction misreads.
- Suppliers whose invoices reference no PO number.
- Partial deliveries and split invoices.
- A forged invoice with changed bank details. Treat bank detail changes as a manual control, always.
- Invoices that contain hidden instructions aimed at the AI. Never let the extraction step decide payments; see Prompt injection.
What does it save?
It depends on volume and exceptions, so measure the baseline first: minutes per invoice, matching errors per month, late payment charges, early payment discounts missed. A worked example with assumed figures is in the pillar guide. We size this in ringgit during an AI Opportunity Audit before building. The same pattern works on the sales side: WhatsApp orders written as draft sales orders in SQL Account or AutoCount.
What should you do next?
Pull 50 recent invoices with their POs and delivery orders and count how many match cleanly. That test shows whether a pilot will pay. Bring the result to a free call, or see what we build for trading and distribution companies or our software service.
Reading invoices into fields and flagging mismatches is a standard build in the AI-steps module of our AI automation course.
Sources
(checked November 2026)
- LHDN e-Invoice implementation timeline, Inland Revenue Board of Malaysia; confirm which phase applies to you.
- OWASP Top 10 for LLM Applications, OWASP GenAI Security Project.
Frequently asked questions
Can AI read supplier invoices accurately?
Usually well on clean PDFs, less well on scans, handwriting or unusual layouts. Test on your own suppliers' invoices and keep a rule-based check after the AI step, such as line totals adding up.
What is three-way matching?
Comparing the purchase order (what you ordered), the delivery order or goods received note (what arrived) and the supplier invoice (what you are asked to pay) before payment.
Does e-invoicing change this?
Malaysia's MyInvois e-invoice system from LHDN means more invoices arrive as structured data, which makes matching easier. Which phase applies to your company depends on turnover; check LHDN's current guidance.
Which accounting systems can this connect to?
Anything with an API, an import file or a database connection. Common local packages differ a lot; check connection options before you choose the tool.