AP automation

AI agents for accounts payable: a deployment guide

· updated May 21, 20265 min read

The 60-second framing

Mid-market finance teams spend dozens of hours per week keying invoices into the ERP. AP modules in NetSuite / Dynamics / SAP handle workflow (approval, payment) but don't replace the keying. AI invoice automation replaces the keying — and earns its money fast at any meaningful volume.

Honest economic case:

MetricManualAI-automated (target)
Time per invoice4-6 min~30 sec (reviewer queue, ~13% of volume)
Loaded cost per invoice€3-5€0.15-0.30
Cycle time2-4 days4 hours
Error rate2-3%<1%
Payback on €25-50k buildn/a4-8 months at typical volume

Above ~250 invoices/month, the math typically works. Below, it doesn't.

The deployment shape

[Email inbox / portal / SFTP]
            ↓
[Ingestion + dedup queue]
            ↓
[Vision LLM extraction → Zod schema]
            ↓
[Business rules]
   - tax math reconciles
   - PO match against NetSuite/Dynamics/Xero
   - vendor on whitelist
   - duplicate check
            ↓
[Confidence routing]
   ├─ high → auto-post to ERP
   ├─ medium → reviewer queue
   └─ low → reject + supplier notify
            ↓
[ERP write + PDF attach + audit log]
            ↓
[ERP approval workflow → payment]

The agent owns "ingest to ERP write." Your existing ERP approval workflow takes it from there.

The phases that pay back

A typical engagement, broken into phases that each ship value:

Phase 1: Schema sprint (week 1). Sit with the AP team. Define what "structured invoice" means for your business — not the generic standard. Build the Zod schema. Capture 50-100 representative invoices to test against. Output: clear scope.

Phase 2: Prototype (weeks 2-3). End-to-end pipeline on real invoices in shadow mode. Agent extracts, humans still post. Compare outputs. Quantify per-field accuracy. Tune.

Phase 3: Build (weeks 4-7). Production pipeline: confidence routing, ERP integration, audit trail, reviewer UI, observability dashboard.

Phase 4: Phased rollout (week 8). 10% → 50% → 100% over two weeks. Reviewer queue staffed from day one. Daily standup with AP team.

Phase 5: Operate (ongoing). Eval cadence (monthly). New vendor onboarding. New document types as needed.

The 5 most common mistakes

After multiple AP deployments, the predictable failure modes:

1. Skipping the schema sprint

"Just extract everything" produces garbage. The week with your AP team is the highest-leverage week in the entire engagement. Don't skip it.

2. Skipping shadow mode

Cutting over before two weeks of parallel running is how clients end up posting wrong invoices. Shadow mode catches the bugs that no eval finds.

3. Bad reviewer UI

If reviewing a flagged invoice takes 3 minutes instead of 30 seconds, the system doesn't save time. Reviewer UX is the difference between automation that works and automation that adds work.

4. No vendor whitelist

Auto-posting invoices from a vendor you've never seen before is how social-engineering fraud succeeds. New vendors should always route to review until explicitly whitelisted.

5. No duplicate detection

Same supplier, same invoice number, sent twice. Without dedup, you pay twice. Always hash (vendor, invoice number, total) at ingestion.

What about three-way matching?

Three-way matching (PO + receiver + invoice) is the gold standard for high-value POs. The agent extends naturally:

  1. Extract invoice (vision LLM).
  2. Query ERP for PO. Match line items with tolerance.
  3. Query ERP for receiver (goods received note). Match received quantities to invoice quantities.
  4. All three reconcile → auto-post. Mismatch → review with the specific discrepancy highlighted.

Modest additional complexity; high value for capital-intensive industries where 3-way is mandated.

ERP integration patterns

ERPIntegration
NetSuiteSuiteTalk SOAP for legacy, REST API for current. Custom bill record with PDF attached.
Dynamics 365 / Business CentralOData REST + custom Dataverse tables for queue and audit.
XeroPublic API + webhooks. Tenant-scoped credentials.
Sage IntacctREST API; per-entity routing for multi-entity clients.
QuickBooks OnlinePublic API; works fine for SMB volume.
SAP / Oracle EBSiDocs + middleware; harder, takes longer, scope it carefully.

We've shipped each of the above. Custom field mapping (your cost centres, tax codes, vendor classifications) is part of every build.

When it doesn't pay back

Some AP environments don't benefit:

  • Very low volume (<150 invoices/month). Build cost amortises too slowly.
  • Already automated by a vendor solution that works. Don't replace working systems.
  • Highly bespoke workflow where every invoice needs human judgement on more than just extraction.
  • Compliance regime that mandates human review on every invoice regardless of automation capability.

We will tell you which side of the line you're on after a free intro call.

What we typically deliver

For a €30k-50k build:

  • Multi-channel ingestion (email + portal + SFTP).
  • Vision LLM extraction with typed Zod schema.
  • PO matching with configurable tolerance.
  • Confidence-tier routing.
  • Reviewer UI (Next.js + shadcn/ui).
  • ERP integration (one ERP, with mappings).
  • Audit log + dashboard.
  • Eval suite + observability.
  • Phased rollout + handover.

For a larger build, add: multi-ERP, multi-entity, multi-language, three-way matching, advanced anomaly detection.

Where to go next

For the full architecture of how this kind of pipeline works see How AI invoice processing actually works. For pricing detail see How much does an AI agent cost. For the deeper case study of a real build see Document Intake Agent.

If you have an AP volume problem, drop us a note. We'll come back with a feasibility take within a business day.

Frequently asked questions

Keep reading

Want this delivered in your stack?

If the article describes a workflow you'd like to ship, drop us a note. We reply within one business day.