# Intelligent Document Processing (IDP): OCR and AI for Invoices, POs, and Delivery Notes

> A guide to using OCR and AI to read invoices, POs, and delivery notes: classification, field extraction, business-rule validation, master data matching, human review, honest automation thresholds, and security and forged-document risks.

Source: https://www.agsora.tech/en/blog/pemrosesan-dokumen-cerdas-idp-ocr-dan-ai-untuk-faktur-po-dan-surat-jalan
Category: Technology · Published: 2026-11-24 · Updated: 2026-11-24 · By PT Agsora Teknologi Indonesia

In many companies business data still arrives as documents: supplier invoices as PDFs, delivery notes photographed on a phone, customer purchase orders sent by email, and transfer receipts as images. Administrative staff then retype the contents into the ERP line by line. The work is slow, tedious, and prone to typos. Intelligent document processing (IDP) uses OCR and AI models to read documents, extract the important fields, and send them to your systems for review. This article explains how it works, where it pays off, how to design a safe workflow, and the limits you should understand before promising "fully automatic".

*Documents arrive in many formats; the goal of IDP is to turn them into structured data that people can verify.*

## From plain OCR to intelligent document processing

OCR (optical character recognition) only turns an image into text. The result is still a bag of words without meaning: the system does not know which value is the invoice number, which is the due date, or which is the total payable. IDP adds several layers on top of OCR.

- Document classification: deciding whether a file is an invoice, delivery note, PO, receipt, or something else.
- Field extraction: finding values such as document number, date, supplier name, tax ID, totals, tax, and line items.
- Validation: checking that numbers make sense, for example that subtotal plus tax equals the total.
- Matching: linking extracted values to ERP master data such as suppliers, item codes, and PO numbers.
- Human review: showing uncertain results to staff for correction, then learning from those corrections.

Modern language and vision models make extraction more flexible than the rigid per-supplier templates of the past. But flexibility does not remove the need for validation and oversight, because a model can misread something with complete confidence.

## Which documents to automate first

Do not start with every document. Pick those with high volume, fairly consistent formats, and errors that are easy to spot.

- Supplier invoices for accounts payable: high volume and clear value. The output can be matched against POs and goods receipts, as covered in [accounts payable automation and three-way matching in ERP](https://www.agsora.tech/en/blog/otomatisasi-utang-usaha-dan-pencocokan-tiga-arah-di-erp).
- Delivery notes and proofs of receipt: useful for speeding up receiving and invoicing.
- Customer purchase orders: reduce sales order entry time, especially when large customers use their own formats.
- Receipts and employee expense proofs: speed up expense claims and petty cash handling.
- Customs and shipping documents: valuable for exporters, but usually more complex and in need of extra care.

Documents that arrive rarely or vary widely, such as long contracts, are better handled by another flow, for example AI-assisted summaries with human review, rather than automatic field extraction.

## A healthy workflow architecture

A good IDP flow is not one magic box but a chain of steps with clear control points.

### 1. Document intake

Documents can arrive through a dedicated mailbox, a portal upload, a mobile app, or a shared folder. Make sure every original is stored unaltered, given a unique identifier, and logged with the sender and time of receipt. The original file is your evidence in a dispute.

### 2. Pre-processing

Skewed images are straightened, contrast is improved, blank pages are removed, and multi-page PDFs are split into the right documents. These simple steps often raise accuracy more than swapping the model.

### 3. Extraction and confidence scores

The model outputs each field value with a confidence score. Keep the score, because it drives decisions: high-confidence fields can pass through, uncertain ones go to a reviewer.

### 4. Business-rule validation

Rules that do not depend on AI are often the most useful.

- The invoice number has not been used before by the same supplier, to prevent duplicate invoices.
- The total equals the sum of lines plus tax, within a clearly defined rounding tolerance.
- The invoice date is not in the future and not unreasonably old.
- The tax ID and supplier name match master data.
- The currency matches the PO or contract.

### 5. Matching to master data

Supplier names on invoices are often spelled differently from the master. Use matching based on name similarity, tax ID, bank account, and transaction history, and ask a human to confirm when there are several candidates. Master data quality strongly affects results, as discussed in [data quality and data governance for mid-sized businesses](https://www.agsora.tech/en/blog/kualitas-data-dan-tata-kelola-data-untuk-bisnis-menengah).

### 6. Human review

The review interface should show the document image on one side and the extracted fields on the other, with the location of each value highlighted. Reviewers only need to check fields flagged as uncertain rather than re-read everything. This design follows the principles of [human-in-the-loop for AI agents](https://www.agsora.tech/en/blog/human-in-the-loop-persetujuan-manusia-untuk-ai-agent-di-proses-bisnis).

### 7. Posting to the ERP and the audit trail

Once approved, data goes to the ERP as a draft or final transaction depending on policy. Record who corrected what. This trail matters for audits and for improving the system, and ties into [audit trails and internal controls in ERP](https://www.agsora.tech/en/blog/jejak-audit-dan-pengendalian-internal-di-sistem-erp).

## Setting honest automation thresholds

The most common question is what percentage of documents can pass without human touch. The honest answer: it depends on document quality, supplier variety, and your risk tolerance. Avoid promising a figure until you have measured on your own real documents.

A safe approach is staged.

- Shadow stage: the system extracts, but staff keep typing as usual. Compare both results to measure real per-field accuracy.
- Assist stage: the system fills in the form and staff check everything before saving.
- Selective stage: fields and suppliers with proven high accuracy pass through with sample checks, while the rest remain reviewed.

Thresholds can differ per field. A wrong invoice number causes different problems than a misread line description. Payment totals and bank account numbers deserve the strictest thresholds.

## Measuring accuracy properly

Average accuracy is misleading. Measure per field and per document type, and distinguish several kinds of error.

- Misread fields: the extracted value differs from the document.
- Missed fields: the value is on the document but was not found.
- Wrong matches: the field was read correctly but linked to the wrong supplier or item.
- Escaped errors: errors not caught by validation and discovered only after the transaction was posted.

The last kind is the most expensive, so monitor it specifically. Prepare a test set of documents with correct answers labeled by staff, and rerun it whenever the model or configuration changes. More general evaluation methods are covered in [evaluating AI and LLM output quality for business applications](https://www.agsora.tech/en/blog/evaluasi-kualitas-output-ai-llm-untuk-aplikasi-bisnis).

## Security and privacy risks

Business documents contain sensitive data: bank account numbers, tax IDs, contract prices, and sometimes employees' personal data. Several decisions need to be made upfront.

- Processing location: are documents sent to a third-party AI service, and in which country is the data processed? See the considerations in [data location and hosting compliance](https://www.agsora.tech/en/blog/lokasi-penyimpanan-data-dan-kepatuhan-hosting-aplikasi-bisnis-di-indonesia).
- Provider retention policy: make sure your data is not used to train models without consent, and check retention periods.
- Access rights: not every employee needs to see every document, such as payslips or high-value contracts.
- Instruction injection: external documents may contain text that tries to command the model. Treat document content as data, not instructions, and limit what the system can do based on it. This is discussed in [AI application security: prompt injection and data leakage](https://www.agsora.tech/en/blog/keamanan-aplikasi-ai-prompt-injection-dan-kebocoran-data).
- Retention: original documents and extracted results follow your [data retention policy](https://www.agsora.tech/en/blog/kebijakan-retensi-data-dan-penghapusan-data-pelanggan-di-aplikasi-bisnis) and financial record-keeping obligations.

## Fraud through forged documents

IDP speeds up processing, but it can also speed up the entry of forged documents if left unguarded. Altered invoices, suddenly changed supplier bank accounts, and duplicate invoices with slightly different numbers are common patterns. Controls that help:

- Supplier bank account changes must go through separate verification, not email alone.
- Invoices with an account different from the master are flagged and not paid automatically.
- Duplicate detection checks the combination of supplier, amount, and date, not just the invoice number.
- Segregation of duties: whoever approves extraction is not the person who approves payment.

Data-driven screening for odd patterns can complement these controls, as described in [detecting anomalies and transaction fraud with AI on ERP data](https://www.agsora.tech/en/blog/deteksi-anomali-dan-kecurangan-transaksi-dengan-ai-pada-data-erp).

## Choosing an approach: off-the-shelf or self-assembled

There are three common routes. Off-the-shelf IDP services install quickly and suit standard documents, but per-page costs and customization limits need to be calculated. Assembling your own from OCR and language models gives more control over flow and data, at the price of more maintenance. A hybrid, using a service for basic extraction and building validation and matching logic inside your ERP, is often a sensible compromise.

When comparing, look at the following.

- Support for Indonesian-language documents and formats, including tax invoices, handwriting, and low-resolution photos.
- Ability to expose per-field confidence scores.
- How it integrates with the ERP: API, webhook, or file import.
- Cost per document at your volume, including the human review that remains.
- Dependence on a single provider, related to [exit strategies from vendor lock-in](https://www.agsora.tech/en/blog/vendor-lock-in-di-cloud-dan-software-bisnis-strategi-keluar).

## Estimating benefits without overstating them

IDP benefits usually come from less keying time, fewer typos, and shorter processing cycles so payments and invoicing are not delayed. To calculate them, first measure the current state: documents per month, average minutes per document, share needing correction, and time from receipt to posting. After the shadow stage, compare the same numbers. Remember to include new costs: review, rule maintenance, and AI service fees.

## Common mistakes

- Aiming straight for full automation without a shadow stage and without measuring accuracy.
- Not storing the original document and confidence scores, making errors hard to trace.
- Ignoring master data quality so supplier and item matching becomes messy.
- Not providing a comfortable review interface, so staff go back to manual typing.
- Assuming the model needs no monitoring after go-live, even though supplier document formats change over time.
- Giving overly broad access to sensitive documents.

## Implementation steps

1. Pick one document type, such as supplier invoices, and collect real samples from several months.

2. Define mandatory fields and validation rules with finance and operations.

3. Run a shadow stage for a few weeks and measure per-field accuracy.

4. Build the review interface and connect it to master data and the ERP.

5. Roll out the assist stage, then the selective stage for fields and suppliers that prove stable.

6. Monitor escaped errors, review results regularly, and update rules.

7. Document the flow, access rights, and retention policy.

## Closing

IDP is not magic that removes administrative work; it moves human effort from typing to checking. The best results come from a flow with validation, confidence scores, review, and an audit trail, and from measuring accuracy on your own documents. Start with one high-volume document type, run the shadow stage, and raise automation only when the data supports it.

**Cut manual document entry in your business** Tell the Agsora team your document types and monthly volume to design an extraction, validation, and review flow connected to your ERP. [Free consultation](https://www.agsora.tech/en/services/ai-automation)
