Send Your Invoices to Excel or Your ERP via API — Without Switching Software
Send Your Invoices to Excel or Your ERP via API — Without Switching Software
Most invoice automation pitches end the same way: migrate to our platform. Move your suppliers, retrain your team, re-import three years of history, and then — eventually — stop typing invoices by hand.
That's a big ask for a problem that is actually narrow. You don't have an ERP problem. You have a data-entry problem sitting between a PDF and a field in software you already pay for.
The fix is to treat extraction as a service, not as a platform. A document goes in, structured data comes out, and that data lands where your team already works: a spreadsheet, or your ERP's API.
Why the migration route is usually the wrong answer
The cost of manual invoice handling is well documented. Industry benchmarks put the fully loaded cost of processing a single invoice somewhere in the $10–$22 range for manual workflows, dropping to a few dollars — or under one — once capture and matching are automated (Ardent Partners AP benchmarks, invoice processing cost benchmarks).
But notice what's actually being priced there: capture and keying, not accounting. Your ERP already does the accounting fine. It posts, it reconciles, it files. What it can't do is read a supplier's PDF.
So swapping the ERP to solve a capture problem is like replacing your kitchen because the tap leaks. It costs months, it breaks reporting continuity, and the person who knows how your chart of accounts really works is going to spend their summer on it instead of closing the quarter.
What "structured data" actually has to mean
Extraction is only useful if the output is predictable. "It reads the invoice" is not a spec. Before you connect anything, define the shape of the data you expect on every single document:
- Header fields: supplier name, tax ID, invoice number, issue date, due date, currency.
- Totals: taxable base, VAT rate(s) and amounts, withholding if it applies, total payable.
- Line items: an array — product code, description, quantity, unit price, line total, per-line tax rate.
- Source reference: a link or ID pointing back to the original file, so anyone can check the PDF in one click.
The line items are where most tools quietly fail. Plenty of OCR services return a decent header and then flatten the table into a blob of text. If you're posting to an ERP that expects line-level detail — or splitting costs across cost centres — a header-only extraction just moves the typing, it doesn't remove it.
One more field that matters more than people expect: a confidence or completeness signal. If the tool can tell you "this total didn't reconcile with the sum of lines", you can route that one document to a human instead of reviewing all of them.
Two integration paths: file drop or API
Path A — Excel/CSV
The underrated option. If your accountant's real workflow is an import template, then the finished job is a file matching that template, not a dashboard.
This works well when:
- Your ERP has a batch import (most do — supplier invoices, journal entries, purchase lines).
- Volume is periodic rather than continuous: you process a batch weekly or at quarter close.
- You want a human eyeballing the sheet before anything is posted.
We covered the mechanics of getting clean tabular output out of documents in How to Automatically Convert PDF to Excel with WhappScan AI. The principle: build the sheet to match the import template exactly — same column order, same date format, same decimal separator — so the import is a non-event.
Path B — API
Use the API when the invoice should land in the ERP without anyone touching a file. The typical shape:
- The document arrives (WhatsApp message, email forward, upload).
- Extraction returns a JSON object with the fields above.
- A small piece of middleware — a script, a Zap, a Make scenario, a Lambda — maps those fields to your ERP's payload and calls its endpoint.
- The ERP returns an ID, which you store next to the original document.
That mapping layer is where the real work lives, and it's worth being honest about it: it is usually 100–300 lines of code, not a weekend project, but not a migration either. It's the only part that is specific to *your* ERP.
The mapping layer: five decisions to make up front
1. Supplier identity. Match on tax ID, never on name. "ACME S.L.", "Acme SL" and "ACME, S.L." are the same vendor and three different strings. Decide what happens when the tax ID is unknown: create a draft supplier, or park the invoice for review.
2. Product/service codes. If you post line-level detail, you need a stable rule that turns a supplier's code into your internal code. Some suppliers print two codes per line — their reference and the manufacturer's — and picking the wrong one silently duplicates your product catalogue.
3. Rounding and tax. Define the reconciliation rule and enforce it: base + VAT − withholding = total, within a cent or two. Any document that fails goes to review. This single check catches more real errors than any accuracy percentage on a vendor's website.
4. Duplicates. Key on supplier tax ID + invoice number. People forward the same PDF twice; assume it will happen weekly.
5. Failure behaviour. What happens when the ERP returns a 500? Retry with backoff, and make the operation idempotent so a retry doesn't post the invoice twice.
Why AI extraction beats per-supplier templates here
Classic OCR wants a template per supplier: coordinates on a page, a zone for the total, a zone for the date. It works beautifully until a supplier redesigns their invoice, adds a second page, or sends a photo taken at an angle — and then it fails silently, which is worse than failing loudly.
Model-based extraction reads the document the way a person does, so a layout change doesn't break it. We went through this trade-off in detail in Why Per-Supplier OCR Templates Break — and Why AI Doesn't Need Them. For an integration project this matters enormously: the maintenance cost of a template-based pipeline is a permanent tax, and it lands on whoever is least able to refuse it.
Where WhatsApp fits
The part everyone underestimates is collection. An extraction API is useless if invoices are still scattered across four inboxes, a WhatsApp group and a folder on someone's desktop.
WhatsApp solves this because it's already where suppliers, site managers and field staff are. Someone photographs the invoice, sends it to a number, and the extraction happens on arrival — no app to install, no login to remember, no training session. The practical setup is covered in How to Automate Invoice Extraction using WhatsApp and AI.
The combination is what makes it stick: WhatsApp as the intake, an API as the outlet, and your existing software untouched in the middle.
What's coming — and why capture matters more, not less
It's tempting to assume structured e-invoicing will make all of this obsolete. It won't, and not soon.
In the EU, the VAT in the Digital Age package was adopted on 11 March 2025 and entered into force on 14 April 2025, but its Digital Reporting Requirements for cross-border B2B supplies only apply from 1 July 2030, with national systems aligning to the EU standard by 1 January 2035 (European Commission).
In Spain, the Verifactu billing-software rules were pushed back: adapted systems are required before 1 January 2027 for companies filing corporate income tax, and before 1 July 2027 for everyone else (Agencia Tributaria). If those dates affect you, see what Verifactu really changes about handling invoices.
Note what both of those regulate: how invoices are issued, not how the ones you receive arrive at your door. For years yet you'll be receiving a mix of structured files, PDFs and photographs — and someone has to turn all three into rows.
A realistic rollout
- Week 1 — Pick your ten highest-volume suppliers. Define the exact field list you need. Run those invoices through extraction and compare against what was keyed manually.
- Week 2 — Build the Excel export first, even if the API is the goal. It makes mismatches visible immediately.
- Week 3 — Wire the API for one supplier only, with everything landing as a draft in the ERP. Nothing posts automatically yet.
- Week 4 — Add the reconciliation check and the duplicate key. Let clean documents post automatically; route the rest to review.
After a month you'll know your real touchless rate, and you'll have changed nothing about the software your team uses every day.
WhappScan does the extraction half: documents arrive over WhatsApp, email or upload, and come back as structured data you can pull into Excel or push to your ERP through the API. Try it free at https://whappscan.com.