|
|
Invoice Reconciliation Agent
Author: Venkata Sudhakar
ShopMax India processes hundreds of vendor invoices each month. Manually matching each invoice to the corresponding purchase order, checking quantities, unit prices, and GST amounts, takes the finance team days and is prone to error. An automated reconciliation agent that performs this matching in seconds and flags only the exceptions for human review transforms a week-long process into a daily automated workflow. This tutorial builds an Invoice Reconciliation Agent using ADK and Gemini. The agent matches incoming invoices to purchase orders, validates line-item quantities and amounts, and produces a reconciliation report distinguishing clean matches from discrepancies that need finance team review. The below example shows invoice reconciliation for ShopMax India vendor payments.
It gives the following output,
Invoice Reconciliation Report - ShopMax India
2 invoices processed | 1 matched | 1 discrepancy
CLEAR FOR PAYMENT:
INV-SONY-9812 | PO-2025-002 | Sony India Ltd | Rs 7,08,000
-> All quantities, prices, and GST verified. Approve payment.
HOLD - DISCREPANCY FOUND:
INV-SAM-4421 | PO-2025-001 | Samsung India Pvt Ltd
Invoice total: Rs 27,16,950
Discrepancies:
1. SKU-1010 (Samsung Remote): PO price Rs 500, Invoice price Rs 550
Overcharge: Rs 50 x 50 units = Rs 2,500
2. GST mismatch: expected Rs 4,09,500, charged Rs 4,14,450
Excess GST: Rs 4,950
Total financial exposure: Rs 7,450
Action: Request corrected invoice from Samsung India before releasing payment.
In production, connect this agent to your ERP system via Cloud Functions - new invoices arriving in Cloud Storage trigger the reconciliation automatically. Matched invoices get routed to payment approval workflow; discrepancies trigger an email to the vendor via SendGrid with the specific line items to correct.
|
|