An AP agent that reads invoices, posts to SAP, and escalates only what it can't resolve: 92% straight-through by month 2.

We replaced a legacy AP process (OCR plus manual work) with an agentic automation that reads unstructured invoices, applies PO-matching and GL-coding rules, posts to SAP, and routes only true exceptions to people.

Client
Regional manufacturerClient anonymised under contractual confidentiality.
Industry
Manufacturing

Measured outcome

Straight-through processing
92%
AP throughput
3×
Cost per invoice
< $0.40

The challenge

A 9-person AP team processed 30,000 invoices a month from 40+ vendors with inconsistent formats. The legacy OCR performed well on structured invoices but failed on free-form PDFs, forcing manual rework on 40% of the volume. Finance leadership needed to scale AP throughput without adding headcount as the business grew.

The approach

Instead of upgrading the OCR, we designed an AP agent: an LLM-powered agent with tool access to SAP, the vendor master, the general ledger, and the purchase-order system. The agent extracts line items, applies PO-matching and GL-coding rules, posts the invoice to SAP, and escalates to a person only when confidence falls below threshold. We paired it with UiPath for the deterministic parts (SAP posting, PDF routing, the ERP inbox) and built a review UI for exceptions.

The solution

Claude Sonnet as the reasoning engine with function calling into internal tools. UiPath bots for deterministic SAP posting and PDF handling. A Next.js review UI for exceptions with keyboard-first UX. An evaluation pipeline with 500 golden invoices. Observability in Power BI.

AP agent: PDFs in, agent reads & decides, SAP posts, exceptions to humansAP AGENT FLOW · 92% STRAIGHT-THROUGHAP inbox30k invoices / moAP AGENTRead · Match · DecideExtract line itemsPO + GL matchConfidence scoreSAP POSTUiPath botdeterministic postHUMAN REVIEWReview UI8% at month 2Evaluation pipeline · Observability (Power BI)500-invoice golden set · prompt and model versions pinned quarterly92%Straight-through3×AP throughput<$0.40Cost / invoice
Architecture of the delivered solution

Illustrative example. An invoice arrives by email, the agent reads the vendor, PO number, total and GL account, checks the PO, the vendor master and the tolerance, and automation posts it in SAP with no human touch.

Invoice EX-2041PDF, example data
Vendor
Example Supplier Inc.
Invoice no.
EX-2041
Date
2026-09-14
PO number
EX-7731
Currency
USD
DescriptionQtyUnit priceAmount
Hydraulic fittings4012.50500.00
Steel brackets2518.00450.00
Freight185.0085.00
Total USD1,035.00
GL account, proposed by the agent
510200 Raw materials
  1. 1

    Received

    The invoice arrives as a PDF in the AP mailbox.

    EX-2041.pdf

  2. 2

    Read by the agent

    Claude reads the free-form PDF and extracts the fields.

    • Vendor
    • PO number
    • Total
    • GL account
  3. 3

    Checked

    The agent checks it against the systems of record.

    • PO match: PO EX-7731 open, lines found
    • Vendor master: Vendor active, record matches
    • Tolerance: Quantities and prices within limits
  4. 4

    Posted in SAP

    Deterministic automation (UiPath) creates the document.

    SAP 5100001234 (example)

  5. 5

    Done: straight-through

    No human touch. Posted, logged and closed. In the published case, 8% of invoices go to a person instead.

Audit trail Illustrative entries

  1. 09:14:02Invoice received (email PDF)
  2. 09:14:044 fields read by the agent
  3. 09:14:05PO found and matched
  4. 09:14:05Vendor master: match
  5. 09:14:06Within tolerance
  6. 09:14:09Posted in SAP (automation)
  7. 09:14:09Closed, straight-through

Illustrative walkthrough; figures from the published case

In production: 92% straight-through by month 2, 3× throughput with the same team, under $0.40 per invoice.

The outcome

Straight-through processing reached 92% in month 2 and stabilized at 95% by month 6. AP throughput tripled with the same headcount. Cost per invoice fell below $0.40. The exceptions that do reach people are resolved in under a minute thanks to the review UI.

“It's not just faster, it's more accurate than we are.”
AP Lead, Regional manufacturer

Lessons

The review UI mattered more than we expected: AP teams are fast when the tool is fast too. We also learned to pin prompt and model versions quarterly for auditability.

All case studies
  • Coopecaja Financial Services

    From 14 business days to same day for 87% of cases: automating member onboarding across three legacy systems.

    Cycle-time reduction
    92%
    Legacy systems unified
    3
    Cases completed the same day
    87%
  • LATAM shared-services center Shared Services / BPO

    40% faster month-end close with process redesign, RPA, and a close cockpit refreshed every 15 minutes.

    Client anonymised under contractual confidentiality.

    Faster month-end close
    40%
    Workflows automated
    14
    Close cockpit refreshed every 15 minutes
    1

Bring one process. We will show you what changes.

Share the workflow, its monthly volume, the systems involved and where exceptions pile up. A delivery lead will come back with an assessment of fit and a practical next step.