Blog/Agent Deployment

Agent Deployment Diary: Automating Accounts Payable with AI

How we deployed AI agents to automate invoice processing, reducing cycle time from 8 days to 2 hours while cutting manual work by 78%.

Nick Simmons, Lomo AI··5 min read
Agent Deployment Diary: Automating Accounts Payable with AILomo AI

Agent Deployment Diary: Automating Accounts Payable with AI

Last month, we deployed an AI agent system for a $180M manufacturing company that was drowning in paper invoices. Their AP team of 6 people was processing 2,400 invoices monthly with an average cycle time of 8 business days. Exception handling consumed 40% of their time, and late payment penalties were costing $15,000 quarterly.

Today, their AI agents process 89% of invoices end-to-end in under 2 hours. Here's exactly how we built it.

The Pre-Deployment Reality

Before automation, their AP workflow looked like this:

  • Manual data entry: 15 minutes per invoice
  • PO matching: 8 minutes per invoice
  • Approval routing: 3-5 days average
  • Exception research: 45 minutes per problematic invoice
  • Total cost per invoice: $12.50

The breaking point came when a delayed $2.3M payment triggered supplier contract penalties. The CFO green-lit our AI deployment within 48 hours.

Architecture and Tool Selection

Document Ingestion Layer

We deployed UiPath Document Understanding for OCR and initial data extraction. UiPath's pre-trained invoice models achieved 94% accuracy on structured invoices and 87% on complex purchase orders.

For email ingestion, we integrated Microsoft Power Automate to monitor the AP inbox and automatically route attachments to the processing pipeline. This handled their 400+ weekly invoice emails without human intervention.

Data Processing Core

The heart of our system runs on OpenAI GPT-4 for invoice interpretation and Anthropic Claude 3 for complex exception handling. We chose dual models because Claude excels at nuanced reasoning when invoices don't match purchase orders exactly.

Our custom Python orchestration layer manages the workflow:

# Simplified workflow logic
if invoice_confidence > 0.95 and po_match_score > 0.90:
    route_to_auto_approval()
elif requires_manager_review:
    generate_exception_summary()
else:
    escalate_to_human_review()

ERP Integration

We built direct API connections to their SAP S/4HANA system using SAP's OData services. This eliminated the manual keying that was eating 25 minutes per invoice. Real-time PO matching now happens in 3 seconds instead of 8 minutes.

Approval Routing Intelligence

Using Microsoft Teams integration, our AI agents automatically route invoices based on:

  • Amount thresholds ($500, $5,000, $25,000)
  • Department budgets and approval hierarchies
  • Supplier risk scores from their existing vendor management system
  • Historical approval patterns

Managers receive structured approval requests with all context pre-populated. Average approval time dropped from 3-5 days to 4 hours.

Deployment Timeline and Results

Week 1-2: Infrastructure Setup

  • Configured secure API connections to SAP
  • Set up document processing pipelines
  • Trained initial AI models on 500 historical invoices
  • Achieved 91% accuracy in controlled testing

Week 3-4: Parallel Processing

  • Ran AI system alongside manual process
  • Processed 600 invoices through both workflows
  • Refined exception handling rules based on real data
  • Accuracy improved to 96% by week 4

Week 5-6: Full Deployment

  • Switched to AI-first processing
  • Human reviewers handle only flagged exceptions
  • Implemented real-time dashboard monitoring
  • Fine-tuned approval routing based on manager feedback

Measurable Outcomes After 90 Days

Processing Speed

  • Invoice cycle time: 8 days → 2 hours (96% reduction)
  • Data entry time: 15 minutes → 30 seconds per invoice
  • PO matching: 8 minutes → 3 seconds automated
  • Exception resolution: 45 minutes → 12 minutes average

Cost Impact

  • Processing cost per invoice: $12.50 → $2.80 (78% reduction)
  • Late payment penalties: $15,000/quarter → $800/quarter
  • Staff redeployment: 4.5 FTEs moved to strategic analysis
  • Annual savings: $847,000 projected

Quality Improvements

  • Data accuracy: 87% → 98.5%
  • Duplicate payment prevention: 100% catch rate
  • Compliance violations: 23/month → 2/month
  • Audit preparation time: 40 hours → 6 hours

Volume Scaling

  • Monthly invoice capacity: 2,400 → 8,000+ without additional staff
  • Peak day processing: Previously backed up 3 days, now same-day
  • Seasonal surge handling: Automated scaling during month-end

Exception Handling Deep Dive

Our most sophisticated component handles the 11% of invoices that require human judgment:

Smart Exception Categories

  1. PO Variance Analysis: When invoice amounts exceed PO by >5%, the AI generates variance reports with supplier communication history
  2. New Vendor Verification: Automatically creates vendor profiles and flags for compliance review
  3. Multi-way Matching: Handles complex scenarios with partial deliveries and progress billing
  4. Tax Jurisdiction Logic: Validates tax calculations across 12 states automatically

Human-AI Collaboration

Our exception dashboard presents each case with:

  • AI-generated summary of the issue
  • Recommended actions with confidence scores
  • Relevant historical context and similar cases
  • One-click resolution for common scenarios

This approach reduced average exception handling from 45 minutes to 12 minutes while improving resolution accuracy.

Technical Architecture Lessons

API Rate Limiting

We learned that SAP's API has strict rate limits. Our solution implements intelligent batching and retry logic, processing invoices in optimized groups of 50.

Model Redundancy

Running dual AI models (GPT-4 and Claude 3) in parallel for complex cases improved accuracy by 7% and provides fallback reliability.

Security Implementation

All document processing happens within their AWS VPC using encrypted storage. We implemented field-level encryption for sensitive financial data and maintain full audit logs.

Scaling Considerations

This deployment model scales efficiently:

  • Additional locations: 2-week deployment per site
  • Volume increases: Linear cost scaling with no staff additions needed
  • New invoice types: Model retraining takes 3-5 days
  • Integration complexity: Modern ERPs integrate in 1-2 weeks

Looking Forward

Phase 2 launches in Q3 with:

  • Predictive cash flow modeling based on invoice patterns
  • Automated vendor payment optimization
  • Integration with their treasury management system
  • Real-time spend analytics and budget alerts

The Bottom Line

This AP automation delivered $847,000 in annual savings with a 4.2-month payback period. More importantly, it freed their finance team to focus on strategic analysis instead of data entry.

The key success factors were:

  1. Starting with high-volume, repeatable processes
  2. Maintaining human oversight for exceptions
  3. Integrating deeply with existing systems
  4. Measuring everything from day one

AI agents excel at this type of structured, rule-based workflow with clear success metrics.


Want to explore AI automation for your finance operations? Our Lomo Sprint helps identify the highest-impact opportunities and builds proof-of-concept deployments in 30 days. Let's map out what's possible for your business.

Have questions about what this means for your business?

The Lomo Sprint is designed to answer exactly that. We're always happy to talk.

Let's Talk