Article
How to track purchase orders and deliveries from SQL Account automatically
If your company runs several projects at once, you probably know this problem. Purchase orders sit in SQL Account. Supplier delivery orders arrive as paper and PDFs. Someone matches the two by hand in Excel, usually when there's time, which means it falls behind. Then three simple questions get hard to answer:
- What have we ordered, and what has actually arrived?
- Which deliveries are late, and which invoices have no delivery behind them?
- Which supplier payments are due this week?
I built a system that answers those every morning for an electrical and ELV contractor in Penang running 7 projects at once. It now tracks 2,441 purchase orders and 8,704 PO lines automatically. Here's how it works, and what I'd tell any SQL Account user who wants the same.
1. Export once a week, and stop if anything doesn't add up
Every Monday, a scheduled job exports four data sets from SQL Account: purchase orders (including cancelled ones), suppliers, purchase invoices and supplier due documents. The job only reads from SQL Account. It never writes anything back.
The exports are merged into one master tracker, split into one tab per project. The job also handles the messy parts: PO revisions, placeholder POs, and cancelled POs, which are kept for the record but left out of totals.
The most important rule: if any count doesn't match, the job stops and reports the problem instead of guessing. A tracker that is quietly wrong is worse than no tracker.
2. Read the delivery orders with AI, but let a person approve
Staff upload a supplier DO (a scan or a PDF), and AI reads it and matches it to the right PO lines. It flags the things people miss when they're busy:
- wrong supplier for that PO
- over-delivery against what's left on the PO
- unit differences (EA vs set, MT = tonnes)
- an old PO revision being delivered against
- items that aren't on the PO at all
Multi-DO PDFs, up to 30 pages, are split automatically. Each supplier's wording and units are remembered from past approvals, so matching gets better every week.
Every DO is approved by a person before it counts. At approval, the system checks the PO balance again, so two part deliveries can never add up to more than was ordered.
3. One watchlist instead of ten spreadsheets
Once POs, deliveries and invoices sit in one place, the useful views are easy:
- late deliveries
- POs invoiced but not delivered
- part-delivered POs
- POs with no activity for 90+ days
All four sit in one view, so nobody has to dig through spreadsheets to find them.
4. Send the answers to people, every morning
The system emails the team instead of waiting for someone to open a file:
- Deliveries due, every weekday morning
- Payments due, every weekday morning, to accounts
- Weekly summary for management, with an Excel attachment
- Monday health check: OK or PROBLEM for every scheduled task
5. Test it like it matters
This is where most automation projects cut corners. Before go-live, the system had two full code audits, about 155 issues found and fixed, and 178 automated tests, also run against live data.
Testing paid off in ways a demo never shows:
- 34 of 40 uploaded DOs turned out to be already recorded or duplicates, and were stopped before anyone approved them.
- False supplier-name matches dropped from 391 to 63.
- 117 of 2,934 DO numbers in the old tracker could never have been matched by the old method.
Guardrails that make people trust it
- A person approves every record.
- Accounting is read-only. The AI never signs in to SQL Account or types a password.
- RM amounts and personal data are masked in apps and emails.
- Files are never overwritten. Every output is a new versioned copy.
- If numbers don't add up, the task stops and says why.
Where to start in your company
- Pick the projects with the most POs, not all of them.
- Run the weekly SQL Account export and the master tracker for two weeks before adding DO reading.
- Add DO reading with human approval, then the morning emails.
You don't need new software. This works with the SQL Account you already have, plus Excel.
If you want to see what this would look like for your company, the free check is a good start: send me 3 to 10 recent DOs with their POs (prices can be blacked out), and I'll show you, free, which ones don't match, within 2 working days.
Pang Jun Han: AI automation for Malaysian construction companies and SMEs. pangjunhan.vercel.app/ai-automation