AI AutomationFinTech / Supply Chain Accounting

InvoiceRecon — Autonomous 3-Way AP Reconciliation Engine

Domain / Scope
B2B Wholesale & Cold-Chain Food Distribution ($85M Revenue)
Year
2026
Duration
10 weeks
Primary metric
$287K billing errors caught
$287,400
Recovered in duplicate charges, incorrect unit prices, and missing damage credits in first 9 months
82%
Reduction in manual accounts payable auditing labor (from 140 hrs/wk to 25 hrs/wk)
2.4 days
Invoice approval cycle time — accelerated down from an 18-day average
99.1%
First-pass matching accuracy across 4,200+ monthly vendor invoices
100%
Audit trail compliance for SOC 1 / SOX financial controls
0
Late payment vendor penalty fees incurred post-launch

The Problem

System Bottlenecks & Technical Friction

A high-volume wholesale distributor processing $85M in annual perishable goods was losing an estimated $320,000 annually to un-reconciled vendor discrepancies. Four full-time accounts payable clerks spent 140 combined hours every week manually cross-referencing vendor PDF invoices against NetSuite purchase orders and physical warehouse receiving slips. Discrepancies in catch-weight unit pricing, un-credited freight damages, and retroactive vendor rebate variances routinely slipped past human auditors because manual checking of 80-line invoices under tight payment windows was unsustainable.

Our Engineering Approach

Architecture Design & Implementation

We engineered InvoiceRecon as a deterministic 3-way reconciliation pipeline. When a vendor emails an invoice PDF or EDI payload, the system parses multi-page line items using layout-aware Pydantic schemas powered by Claude 3.5 Sonnet. A PostgreSQL fuzzy-matching engine (`pg_trgm`) correlates SKU variants, vendor aliases, and purchase orders in NetSuite. Line-item unit prices, delivered quantities from dock scanners, and freight terms are mathematically cross-verified. Clean matches (<$5 variance threshold) auto-approve and push directly to NetSuite for batch ACH payment. Discrepancies generate interactive Slack approval cards with exact side-by-side line-item diffs for buyer sign-off.

Technical Architecture

System breakdown & stack.

8 core subsystem modules
01

Layout-aware document parser extracting multi-page tabular invoice items with 99.4% field accuracy

02

Fuzzy line-item matcher in PostgreSQL (pg_trgm + custom SKU normalization) handling 12,000+ vendor aliases

03

Deterministic 3-way reconciliation state machine comparing PO, Goods Receipt Note, and Invoice

04

NetSuite SuiteTalk REST API bidirectional sync for real-time ledger write-back and status updates

05

Slack Bolt SDK workflow engine dispatching interactive audit cards for variances > $250

06

Redis semantic cache storing recurring vendor invoice templates for sub-500ms processing

07

FastAPI backend deployed on AWS ECS with end-to-end OpenTelemetry tracing and audit logs

08

Next.js AP finance portal featuring live discrepancy queues, vendor risk scores, and cash-flow forecasting

Claude 3.5 SonnetPython FastAPIPostgreSQLpg_trgmNetSuite SuiteTalk APIRedisNext.jsSlack Bolt SDK

Engagement Timeline

Engineering delivery schedule.

Total: 10 weeks
Weeks 1–2

AP workflow profiling, extraction schema definition across top 50 vendor invoice formats, NetSuite API connector setup

Weeks 3–5

Layout-aware Claude extraction pipeline, PostgreSQL pg_trgm fuzzy matching logic, historical PO backtesting

Weeks 6–7

3-way deterministic reconciliation rules engine, tolerance threshold calibration, NetSuite write-back integration

Weeks 8–9

Slack interactive approval bot, Next.js finance dashboard, Exception triage queue

Week 10

Parallel-run audit testing against manual AP team, security hardening, full production go-live

More Case Studies

Related AI projects

Want results like these for your business?

Book a 30-minute scoping call with a senior engineer. We'll scope your AI project, define the architecture, and give you a fixed-price proposal within 5 business days.