OCR gets most of the attention in accounts payable automation projects, but it is only the extract step. If you are building or integrating an invoice pipeline for an Indian business, the validation layer between extraction and ERP posting is where most of the value and most of the edge cases sit.
A typical pipeline has five stages: capture, extract, validate, approve, post. Here is what the validate stage should cover.
Duplicate detection
- Key on vendor, invoice number, amount and date together, not invoice number alone
- Expect the same bill to arrive through more than one channel (email and courier, for example)
- Expect resent invoices with a new number, so amount and date matter
Matching rules
- Two-way match: PO against invoice
- Three-way match: PO, goods receipt note (GRN) and invoice
- Make price and quantity tolerances configuration, not code
- Tag vendors as PO-based or non-PO in the vendor master so the right rule runs
GST checks
- Validate supplier GSTIN format and status, and match it to the vendor master
- Read the IRN and signed QR code on e-invoices; flag B2B invoices from suppliers above the e-invoicing turnover threshold that lack them
- Check the CGST, SGST, IGST and cess split against place of supply
- Run a monthly GSTR-2B reconciliation job and output a mismatch list for vendor follow-up
- Keep tax rules configurable, because the rules change and need review with a tax adviser
Posting and observability
- Post to the ERP (Tally, SAP, Oracle, Dynamics or custom) through an API or connector rather than CSV hand-offs
- Keep a full audit trail of every action
- Track touchless rate, exceptions by reason and cycle time from day one, and record a baseline before go-live
One practical note: dirty vendor master data (duplicate vendors, wrong GSTIN or bank details) causes most exceptions after launch. Clean it before you tune any extraction model.
More detail: invoice processing automation guide with GST requirements and a nine-step rollout
Written by the team at Affix Center, an IT services company in Lower Parel, Mumbai.
Top comments (3)
Good breakdown of the validation layer. Treating duplicate detection, configurable tolerances, and an audit trail as first-class steps makes these workflows easier to operate safely. How do you handle retries when an ERP post succeeds but the acknowledgement is lost?
One thing that helps at the post stage is treating the ERP write as idempotent: store a pipeline-side posting record with a deterministic key (vendor + invoice number + amount), and put that same key in the ERP document's external reference field. If the acknowledgement gets lost, the retry first looks the key up in the ERP and only posts if it finds nothing, rather than blindly resending. Then add a nightly reconciliation of 'posted in pipeline' versus 'exists in ERP' so orphaned or duplicate postings show up as an exception queue instead of a month-end surprise.
Great breakdown. One stage I'd add after post is pay, and it needs its own validation: check the payee's bank account or UPI ID against the vendor master before any money moves (IFSC format, name match on the account, and a hold on any bank detail that changed since the last payment). Changed bank details on a familiar vendor are still one of the most common AP fraud patterns. Do you run that check inside the pipeline or leave it to the payment step?