Where documents come from and how they enter the pipeline
Documents rarely arrive in one place. Invoices come by email, onboarding forms through a portal upload, contracts from a shared drive, delivery proofs as WhatsApp photos and scanned bundles from a branch office. The first job is to bring these into one intake service, with each document given an ID, its source, sender and arrival time recorded and duplicates detected by content. Multi-page scans that contain several documents are split, and each page is checked for orientation and legibility before classification.
Classification, extraction and routing as separate steps
We keep three steps distinct, because each fails in its own way and needs its own checks:
- Classify: decide what the document is, such as purchase invoice, credit note, delivery challan, KYC document, contract or general correspondence, with a confidence score.
- Extract: pull the fields defined for that type into a schema, with validation of formats, totals and master data.
- Route: send the document and its data to the right system, queue or approver, based on type, extracted values and your rules, for example invoices above a limit to a finance manager.
Separating the steps means a classification error can be corrected without re-reading the whole document, and routing rules can change without touching the models.
Routing ends in your existing systems rather than a new silo. Purchase invoices can be created as draft vouchers in Tally or as bills in Zoho Books or SAP; contracts can be filed in your document management system with their metadata; onboarding documents can update a case in your CRM or loan system. Each destination gets its own connector with read and write permissions defined per operation. Where a destination system rejects a record, for example because a ledger or vendor does not exist yet, the document returns to the review queue with the reason instead of failing silently, so nothing is lost between systems.
Choosing a classification method
| Method | Best for | Consider |
|---|
| Rules on sender, subject or keywords | Predictable sources, such as one supplier's invoices from a fixed address | Fragile when senders or formats change |
| Language or vision model with instructions | Many document types, few labeled examples, quick start | Running cost per page; needs a clear type list and examples |
| Trained classifier | High volumes of stable types with labeled history | Labeling effort; retraining when new types appear |
A common design uses rules where they are reliable, a model for everything else, and moves high-volume types to a trained classifier once enough reviewed examples have built up. Background on the reading step is in our glossary entry on OCR, and custom model work is covered by NLP and Document AI.
Indian document realities
Indian business documents bring specific challenges. GST invoices vary widely in layout, and tax may be split as CGST and SGST or charged as IGST depending on the place of supply. GSTINs, PAN, HSN or SAC codes and invoice numbers need format checks. Many documents mix English and Hindi or a regional language, carry stamps and signatures over text, or arrive as phone photos taken at an angle. KYC documents such as Aadhaar need special care: identity numbers should be masked where the full number is not required, and storage must follow your obligations under the DPDP Act 2023 and any sector rules that apply to you. We build the test set from your actual documents so these cases are covered before launch.
The review queue and how it improves the system
Low-confidence classifications and failed validations go to a review queue. Reviewers see the document image and the proposed type and fields side by side, correct what is wrong and confirm. Every correction is stored, which gives three benefits: an honest measure of accuracy by type and field, a growing labeled dataset for retraining and a list of the sources and formats that cause the most trouble. Thresholds for automatic routing are set per document type and per field, and are raised only when review data shows the system is reliable at that level.
Audit trail and compliance
For each document we keep the original file, its classification and extracted data with confidence scores, any reviewer changes with names and times, where it was routed and what happened next. This record supports internal audit, GST reconciliation and disputes with suppliers or customers. Retention follows your policy for each document type, and access to sensitive documents is restricted by role.
Measuring the result
Before launch, we measure your current process: documents per day by type, time from arrival to posting, error and rework rates. After launch we track classification accuracy by type, the share of documents processed without review, review time per document, end-to-end time and corrections made after routing. You can try classification and extraction on a sample with our document AI tool. Related pages: document processing, customer KYC onboarding, contract review and the finance and accounts department page.