---
name: invoice-processing
description: Automate end-to-end invoice processing from receipt to payment with OCR data extraction, PO matching, approval routing, and exception handling. Use when processing vendor invoices, setting up automated invoice workflows, handling invoice exceptions, managing approval chains, or optimizing AP cycle time. Triggers on phrases like "process invoice", "invoice workflow", "AP automation", "invoice approval", "PO matching", "invoice exception", "vendor invoice", "invoice receipt", "OCR invoice", "invoice coding".
---

# Invoice Processing Automation

Automate the complete invoice lifecycle from receipt through payment with AI-powered data extraction and intelligent routing.

## Workflow

### Invoice Processing Pipeline

Trigger upon invoice receipt (email, portal upload, EDI, or scan):

1. **Capture and digitization**: Accept via email, vendor portal, EDI 810, or scan. OCR extracts vendor, invoice number, date, due date, total, line items, tax. Confidence scoring: >95% auto-process, <95% manual review. Duplicate detection by invoice number + vendor + amount.
2. **Validation and enrichment**: Verify vendor in master data; validate date range; check required fields (PO, tax ID, bank details); currency detection and conversion; tax validation (VAT/GST/sales tax).
3. **Purchase order matching**: 2-way match (invoice vs PO), 3-way match (invoice vs PO vs goods receipt). Tolerance: auto-approve within 2% price variance, 5% quantity variance. Flag short shipments, overbilling, pricing discrepancies.
4. **Account coding and GL assignment**: Auto-code from vendor history/PO; AI suggestion for uncoded; department chargeback routing; project/job cost allocation.
5. **Approval workflow routing**: Route to budget owner for non-PO; escalate >$5K to manager; >$50K to CFO. Parallel approval for multi-cost-center. SLA: 2 business days.
6. **Exception management**: Mismatch queue, missing PO queue, approval holds, vendor master issues. Resolution SLA: 48 hours.
7. **Payment preparation**: Schedule by terms; discount optimization; method selection (ACH, wire, check, virtual card); batch creation.
8. **Posting and reconciliation**: Auto-post to GL; vendor statement reconciliation monthly; open item aging analysis.

### Processing Performance Benchmarks

```
INVOICE PROCESSING BENCHMARKS
===============================

By processing method:

  Straight-Through Processing (STP):
    - Percentage: Target 70–85% of all invoices
    - Cycle time: < 24 hours from receipt to posting
    - Cost: $1–3 per invoice (fully automated)
    - Error rate: < 0.1%
    - Requirements: PO on file, vendor in master, clear line items, within tolerance

  Touchless Processing (minimal human review):
    - Percentage: Target 10–15% of all invoices
    - Cycle time: 1–2 business days
    - Cost: $3–6 per invoice
    - Touch points: Single review by AP clerk (data validation only)
    - Typical cases: Recurring vendors, subscription invoices, utility bills

  Exception Processing (manual intervention required):
    - Percentage: 5–15% of all invoices (target < 10%)
    - Cycle time: 3–5 business days
    - Cost: $12–25 per invoice
    - Touch points: 2–4 (clerk, analyst, manager, vendor communication)
    - Typical cases: Price variances, missing PO, coding disputes, credit memos

Industry benchmarks (cost per invoice):
  Manual processing:         $12–25 per invoice
  Semi-automated:            $6–12 per invoice
  Fully automated (STP):     $1–3 per invoice
  ROI of automation:         60–80% cost reduction in Year 1

Cycle time benchmarks:
  Manual:                    7–14 days receipt to payment
  Semi-automated:            3–7 days receipt to payment
  Fully automated:           1–3 days receipt to payment
  Target:                    < 3 days for 80% of invoices
```

### Approval Matrix and Thresholds

```
INVOICE APPROVAL MATRIX
========================

  Invoice Amount    | PO Matched  | Non-PO        | Exception
  ------------------|-------------|---------------|----------
  $0 – $1,000       | Auto-post   | Department    | AP Manager
                    |             | Head          |
  $1,001 – $5,000   | Auto-post   | Department    | VP Finance
                    |             | Head +        |
                    |             | AP Manager    |
  $5,001 – $25,000  | Auto-post   | Department    | CFO
                    |             | Head + VP     |
                    |             | Finance       |
  $25,001 – $100K   | AP Manager  | Department    | CFO + CEO
                    | review      | Head + VP     |
                    |             | Finance + CFO |
  $100,000+         | CFO review  | Department    | Board
                    |             | Head + CFO +  | Finance
                    |             | CEO           | Committee

Approval rules:
  - Segregation of duties: Requester cannot approve own invoice
  - Dual approval: Invoices > $50K require two independent approvers
  - Budget check: Auto-reject if department budget exhausted (unless override approved by CFO)
  - Emergency procurement: Pre-approved emergency process (post-facto approval within 5 business days)
  - Recurring invoices: Pre-approved annual contracts (auto-process within contract limits)
  - Splitting prevention: Flag multiple invoices from same vendor within 24 hours totaling > threshold
```

## PO Matching Engine

### Matching Tolerance Configuration

```
PO MATCHING RULES
==================

2-Way Match (Invoice vs PO):
  Price tolerance: ± 2% per line item OR $50 (whichever is greater)
  Quantity tolerance: ± 5% per line item
  Total invoice tolerance: ± 1% of invoice total OR $100 (whichever is greater)
  Within tolerance → Auto-approve for payment
  Outside tolerance → Route to exception queue

3-Way Match (Invoice vs PO vs Goods Receipt):
  All 2-way rules PLUS:
  - Receipt required before invoice processing (goods/services delivered)
  - Quantity tolerance: Invoice qty ≤ PO qty AND Invoice qty ≤ Receipt qty
  - Short shipment: Receipt qty < PO qty → Invoice processed for received qty only
  - Over-receipt: Receipt qty > PO qty by > 5% → Requires PO amendment or rejection
  - Partial receipt: Invoice for partial qty → Processed with open PO balance tracked

Match exception types:
  1. Price variance: Invoice price > PO price
     Resolution: Contact vendor for credit memo; or approve variance with manager approval
  2. Quantity variance: Invoice qty ≠ PO qty ≠ Receipt qty
     Resolution: Verify receipt records; request PO amendment; partial payment
  3. Missing PO: No PO found for vendor/invoice
     Resolution: Verify with requesting department; create retrospective PO; or reject
  4. Duplicate invoice: Same invoice number + vendor already processed
     Resolution: Verify with vendor; mark as duplicate; do not pay
  5. Expired PO: PO beyond validity date
     Resolution: Re-authorize PO or reject invoice
```

## Invoice Data Extraction

### OCR and AI Extraction Quality

```
OCR EXTRACTION PERFORMANCE
============================

Field Extraction Accuracy:
  Invoice number:         99.2%
  Invoice date:           98.5%
  Vendor name:            97.8%
  Total amount:           98.9%
  Line item descriptions: 92.3%
  Unit prices:            95.1%
  Quantities:             96.4%
  Tax amounts:            94.7%
  PO number:              96.8%
  Due date:               97.2%

Improvement strategies:
  - Vendor template library: Pre-built layouts for top 100 vendors (99%+ accuracy)
  - Machine learning feedback: Corrections feed back into model (improves 0.5–1% monthly)
  - Multi-OCR comparison: Cross-validate with 2 engines (ABBYY + Amazon Textract)
  - Vendor portal integration: Structured data from vendor portals (100% accurate)
  - EDI 810: Electronic invoice (100% accurate, no OCR needed)

Top exception sources:
  - Handwritten invoices: 60–75% accuracy (recommend elimination)
  - Poor quality scans: < 200 DPI reduces accuracy by 15–25%
  - Multi-page invoices: Page break issues (use page continuation detection)
  - Foreign language: Requires language-specific OCR models
  - Complex layouts: Non-standard formats (create vendor-specific templates)
```

## Edge Cases

- **Partial shipments and partial invoices**: 
  - Match partial receipt to partial invoice; track open PO balance
  - System auto-calculates remaining PO quantity and expected future invoices
  - Alert when PO nearing completion (> 90% received) for reorder planning
  - Payment: Process for received quantity only; hold balance until completion

- **Credit memos**: 
  - Apply against oldest outstanding invoice from same vendor (FIFO method)
  - Track credit balance per vendor; alert when credit > $5,000 for offset
  - Aging credits: > 90 days old flagged for review (vendor may have written off)
  - Resolution options: Offset against new invoice, request refund, or write off (< $500)

- **Prepayment/advance invoices**: 
  - Record as prepaid asset (balance sheet) until delivery confirmed
  - Auto-expire if no delivery within 90 days (flag for follow-up)
  - Release to expense upon goods receipt or service completion
  - Reporting: Prepaid aging report (30, 60, 90+ days) reviewed monthly

- **Recurring/subscription invoices**: 
  - Auto-match to contract in vendor management system
  - Validate rate consistency: flag any rate change > 5% from contract
  - Annual renewal: Trigger 60-day advance notice for review and renegotiation
  - Usage-based: Validate usage quantities against internal tracking systems

- **Foreign currency invoices**: 
  - Record at transaction date FX rate (spot rate on invoice date)
  - Revalue open items at month-end ( unrealized FX gain/loss)
  - Realized FX gain/loss calculated at payment date vs. invoice date rate
  - Hedging: Large foreign payables may be hedged with forwards
  - Tax: VAT/GST handling varies by jurisdiction (reverse charge, input tax)

- **Split invoices (multi-cost-center)**: 
  - Route to multiple department approvers (parallel workflow)
  - Each department approves only their allocated portion
  - Consolidated payment once all portions approved
  - Allocation basis: Headcount %, revenue %, square footage, or custom rules
  - Dispute resolution: AP analyst assigns split if departments disagree

- **Invoice splitting to avoid approval**: 
  - Detection: Flag multiple invoices from same vendor within 24 hours
  - Rule: Aggregate and apply approval threshold to combined amount
  - Example: Two $4,500 invoices from same vendor in 1 day → treated as $9,000 → higher approval required
  - Enforcement: System auto-combines; cannot be bypassed by separate submission
  - Audit: Quarterly review of invoice patterns for splitting indicators

- **Disputed invoices**: 
  - Hold payment immediately; document dispute reason in system
  - Escalation: AP Manager → VP Finance → CFO (if > $25,000)
  - Vendor communication: Formal dispute letter within 5 business days
  - Resolution timeline: Target 30 days; extend with vendor agreement
  - Impact: Vendor relationship score reduced; payment terms may be affected
  - Prevention: Improve PO accuracy, receipt process, and vendor communication

## Integration Points

- **Email gateways**: Microsoft Exchange, Gmail — invoice receipt via dedicated email address with auto-forwarding rules
- **OCR engines**: ABBYY FineReader, Amazon Textract, Google Cloud Vision, Microsoft Azure Form Recognizer — data extraction
- **ERP/GL**: NetSuite, SAP S/4HANA, Oracle ERP Cloud — invoice posting, GL coding, payment execution
- **Procurement systems**: Coupa, SAP Ariba, Workday Procurement — PO data, vendor master, contract terms
- **Payment platforms**: bill.com, Tipalti, Concur Expense — payment execution, ACH/wire processing, virtual cards
- **EDI networks**: SPS Commerce, Clear Commerce — electronic invoice (810) and payment (820) data exchange
- **Bank APIs**: SWIFT gpi, Plaid, bank直Connect — payment confirmation, reconciliation, real-time status
- **Document management**: SharePoint, Google Drive, DocuWare — invoice archive, retrieval, audit trail
- **Vendor portals**: SAP Ariba Network, Coupa Commerce — structured invoice submission from vendors
- **RPA tools**: UiPath, Automation Anywhere, Blue Prism — legacy system integration, manual process automation
