A strong candidate for an AI agent: high volume, document-heavy, with clear rules and excellent API access.
Invoice processing is one of the most compelling automation targets we see: 6,000 runs a year at 22 minutes each amounts to 2,200 person-hours a year. The process combines document understanding (reading unstructured PDFs), structured data lookup (matching purchase orders in SAP), and conditional routing (approval thresholds). Exactly the profile where an AI agent beats both RPA and traditional scripted automation.
With REST APIs available for all three key systems, integration risk is low. Your Azure + Python stack fits well: the agent's logic is plain Python and can run as a container on Azure Container Apps or AWS ECS, depending on your existing infrastructure.
The accounts payable team receives supplier invoices by email and occasionally by mail. Every invoice has to be matched to an open purchase order in SAP, verified for amount and line items, routed for approval (invoices over €5,000 require sign-off from two managers), and then posted to the SAP payment run. The supplier gets a confirmation once the payment posts, and the PDF is archived in SharePoint.
About 20% of invoices hit an exception, most often a missing or incorrect PO reference or a price mismatch, and need manual handling. The remaining 80% follow a predictable, rule-based path suited to automation.
Six paths. One honest answer.
The combination of unstructured PDF handling, fuzzy PO matching, and exception decisions is exactly what an LLM-driven agent handles best. Claude on Bedrock can natively read invoice PDFs, reason about discrepancies, and decide which approval path to trigger.
A strong alternative if your compliance team wants human review on all exceptions. The agent handles 85% of clean invoices autonomously; a human approves the remaining 15%.
RPA can handle data entry into SAP, but struggles with unstructured PDF extraction and exception decisions. You would still need a separate OCR layer and brittle screen-scraping rules.
Workflow tools handle orchestration well but lack the document-understanding depth to reliably extract invoices across varied supplier formats.
A rule-based script would need a separate OCR tool and brittle regex patterns per supplier template. The 12% rate of missing PO references alone would need more exception-handling code than the business logic itself.
At 6,000 invoices a year, manual processing costs roughly €110,000 a year in labor. This isn't sustainable, and the process has no qualities that would justify staying manual.
Eight dimensions shape the recommendation. Each is scored 0 to 10 with a note.
A mix of structured SAP data and unstructured PDFs from suppliers
Approval thresholds and matching rules are well defined
~20% of invoices hit an exception requiring judgment
REST APIs available for SAP, SharePoint, and Exchange
6,000/year × 22 min = 2,200 person-hours; the ROI is compelling
Business rules change rarely; supplier formats more often
Most decisions are rule-based; ~5% need real judgment
GDPR and a 7-year retention duty require careful data handling
Audit the SAP REST API endpoints needed for PO lookup and invoice posting. Verify SharePoint Graph API permissions and Exchange webhook availability. Collect 50 representative invoice PDFs (clean and exception cases) to test the agent against.
Build the invoice-extraction module using Claude's native PDF support. Define the extraction schema (supplier, invoice number, date, line items, VAT, PO reference) and validate accuracy on the 50 test invoices. Target: over 95% field accuracy for clean invoices.
Implement the agent's main loop: extraction → SAP PO lookup → amount verification → routing decision. Register SAP's REST endpoints as agent tools. Implement approval routing logic (single vs. double approval).
Build an exception queue: a simple web UI or Teams notification for the AP team to review flagged invoices. The agent pauses and waits for a human decision. This is the human-in-the-loop gate.
Implement structured logging to Azure Blob Storage for the 7-year retention requirement. Every agent run produces a JSON audit record: invoice ID, extracted fields, matching result, approval decision, timestamps.
Run in parallel with manual processing for 2 weeks on 10% of invoice volume. Compare the agent's decisions against human decisions. Fix edge cases. Scale to 100% of volume with the AP team monitoring the exception queue.
Claude handles most layouts reliably, but unusual formats (scanned handwritten invoices, non-standard tables) will generate exceptions. Plan for ongoing prompt refinement; it's a maintenance cost, not a one-time build.
Test in a sandbox environment before connecting to production. A bug that posts wrong amounts or duplicate payments is expensive to fix. The human-in-the-loop gate for exceptions isn't optional: it's both a compliance safeguard and a safety net for accuracy.
Invoice processing falls squarely into AI-agent territory for three reasons. First, the inputs are unstructured: invoices arrive as PDFs in dozens of layouts from hundreds of suppliers. Second, matching and verification involve fuzzy comparison (amounts within tolerance, slightly mangled references) that requires real reasoning. Third, the 20% exception rate means the system has to make meaningful escalation decisions rather than fail on an unusual input.
RPA was considered and rejected: PDF extraction would require a separate OCR layer with per-supplier templates, making the solution brittle and expensive to maintain.
The gap between the AI agent (9) and the hybrid (8) is a question of risk tolerance, not technical capability. A pure agent handles 100% of volume autonomously and escalates only genuine exceptions. The hybrid routes every flagged invoice to a human queue.
For a first rollout, the hybrid is the safer choice: the AP team stays in the loop, which builds trust and surfaces edge cases faster. As confidence grows, the human gate can narrow to only the highest-value cases.
The agent runs as a Python service triggered by an Exchange webhook when a new invoice email arrives. It calls Claude on AWS Bedrock with the PDF attached and extracts structured data into a defined JSON schema: supplier name, invoice number, date, line items, VAT breakdown, and PO reference, all without a separate OCR tool.
The PO reference is used to call SAP's REST API. The agent compares amounts within a configurable tolerance (±2% by default). If everything matches and the amount is under €5,000, the agent calls the posting endpoint directly. If the amount exceeds €5,000, it creates an approval request in SharePoint via the Graph API and waits for a callback.
Exceptions are routed to a queue where the AP team sees the flagged invoice, the agent's reasoning, and actions: approve, reject, or ask the supplier to correct it. Every run produces a JSON audit log in Azure Blob Storage for the 7-year retention requirement.
The primary operational risk is PDF format variability. Edge cases (scanned handwritten invoices, non-standard column structures, unusual languages) will show up; treat prompt refinement as routine maintenance. The exception queue is your early-warning system: a rising exception rate usually signals a new supplier format.
SAP integration requires careful testing. Run the agent in parallel with manual processing for at least two weeks before giving it write access to production. Keep a dry-run mode that logs intended actions without executing them: useful for debugging and for regulatory audit.
Your own assessment includes a ready-made project. Unzip, open the folder, and Claude starts building right away.
This assessment gives you direction. Fullvio can help you get there, whether that's a full process audit or implementing this specific process.