How to Automate Extraction Templates in an ERP: Map a Supplier's Invoice Layout Once
For accounts teams reading hundreds of supplier bills a month: stop correcting the same field from the same supplier, and spend review time on real exceptions.
Knowing how to automate extraction templates matters once the easy wins are done. A modern reader handles most invoices without setup. The trouble is a handful of regular suppliers with odd habits that make an operator fix the same field every month.
One puts HSN codes inside the description. Another prints a combined tax line. A third sends a table that runs over three pages, with a rounding line that leaves the total a few paise out.
This guide covers when a template is worth it and how to build one, an illustrative case at a Hosur auto components maker, and how Apragya's document processing app uses templates.
How to automate extraction templates, step by step
An extraction template tells the document reader where a particular supplier puts each field: the invoice number, dates, GSTIN, tax lines, totals and the line item table. It describes the fields to read, not a check on the values.
Automating templates is mostly about choosing well. Build them only for suppliers whose bills are corrected repeatedly, because most invoices read correctly without one. The review queue is the best guide: the supplier that keeps appearing there is your next template.
Keep them current. When a supplier redesigns its bill, confidence on its fields falls, and the template should be updated before errors reach the books.
- Rank suppliers by how often their bills are corrected.
- Pick a recent, typical bill from the top supplier.
- List the header fields, tax lines and totals to read.
- Mark the line item table, including page continuations and rounding.
- Test the template on an older bill and compare the result.
- Watch confidence and update the template when the layout changes.
What an unmapped supplier format costs
The same correction
An operator fixes the same misread field on every bill from one supplier.
Tax splits misread
A combined CGST and SGST line is read as one tax.
Broken line tables
Multi-page bills lose the lines that continue overleaf.
Totals nearly right
A rounding line leaves the record a few paise out.
An example: a Hosur auto components maker
Take an illustrative maker of machined parts in Hosur. Its forging supplier sends a three-page bill every week, with the HSN code inside the description and a rounding line before the total. Every bill stopped for an operator.
How the forging supplier's bills changed
Weeks 1 to 3
The same two fields corrected on every bill.Week 4
A template marks the table, HSN and rounding line.Same day
Tested on an older bill before being trusted.Week 5 onwards
Bills from this supplier read without flags.Format change
Confidence drops, a sign the template needs updating.
Building the template took one sitting. From week five, bills from that supplier stopped reaching the operator, and the only later alert came when the supplier redesigned its invoice. The team then mapped their next three stubborn suppliers the same way.
How Apragya handles supplier invoice format templates
Step 1 of 5
Take one real bill
A recent invoice from that supplier, exactly as they send it.
- Take one real bill: A recent invoice from that supplier, exactly as they send it.
- Define the fields: Name the invoice number, dates, tax lines and totals, with hints and examples.
- Mark the table: Where line items start and end, and which column holds quantity, rate and HSN.
- Test on an older bill: Run a previous month's invoice through it before trusting it.
- Use and maintain: Later bills are read the same way; update it when the layout changes.
Invoice OCR template tools: separate or built in
Template tools outside your books usually need a developer, and the template lives far from the corrections that show it is needed. When templates sit next to the review queue, the person who sees a supplier being corrected again and again can build the fix.
Template approaches, compared with Apragya
| Feature | Separate template tool | Templates in Apragya |
|---|---|---|
| Who builds it | A developer or consultant | The accounts team |
| When it is needed | Guessed up front | Shown by repeated corrections |
| Suppliers without one | Often not read at all | Read without a template |
| Layout changes | Found when figures go wrong | Signalled by falling confidence |
| Tables over pages | Often lost | Continuation mapped |
Checked against public information on 16 September 2026.
What sets Apragya apart for invoice data extraction
No code
Templates are configuration that the accounts team maintains.
Only where needed
Most suppliers read well without one, so you map the stubborn few.
Early warning
Falling confidence tells you a supplier changed its layout.
Multi-page tables
The template records where a table continues and ends.
Totals to the paise
Rounding lines are mapped so totals reconcile exactly.
Changes logged
Edits to a template are recorded.
Templates improve document extraction, their effect shows up in IDP analytics, and unclear fields still stop at supervisor review. See the extraction templates feature.
Getting started
- List your suppliers by bill volume.
- Check which of them are corrected most often in review.
- Build a template for the worst one from a recent bill.
- Test it on an older bill from the same supplier.
- Repeat for the next few, and watch confidence for changes.
Build a template the third time a supplier's bill needs correcting, not the first.
What it costs to start
Automating extraction templates, answered
Do we need a template for every supplier?
What happens when a supplier changes its format?
Can a template handle bills over several pages?
Does a template check whether the figures are right?
What does it cost to start?
Fix a supplier's format once
Map the stubborn layouts and let review time go to real exceptions.