Overview
Our client, an international transportation and logistics company in Europe, processed its documents and filing by hand. Accountants spent hours reading invoices and other logistics documents and typing the data into their systems, which added cost and let some errors slip through. Our task was to build an OCR system that extracts the relevant data at a volume of about 300,000 documents per year, with people stepping in only where needed. The system had to work across the many invoice layouts the client receives.
Solution
- Invoice recognition: an OCR-based system that extracts key data points from invoices, such as the invoice number and date.
- Document classification: a machine learning classifier that tells document types apart, such as invoices and CMR consignment notes.
- Error detection: anomaly detection that flags errors and inconsistencies in scanned documents for review.
- Seal identification: computer vision that finds document seals and checks that they are present.
- Document registration: recognized documents are uploaded and registered with little manual work.
- User interface: a simple interface for reviewing and managing documents.
- New formats: the system handles new invoice layouts with little reconfiguration.
Technology Stack
Features
- Automatic invoice classification and data extraction
- Error detection, with flagged fields sent to a person for correction
- Recognition of document seals
- Automated document registration to reduce manual work
- Support for new invoice formats
- An interface for document review and management

Outcome
- Less manual entry: invoice and CMR data is captured by the system, and accountants review flagged documents instead of typing every field.
- Fewer missed errors: automated checks flag inconsistencies that are easy to overlook by eye.
- Built for the volume: the system is sized for about 300,000 documents per year.
- Time for other work: accounting staff spend less of their day on data entry.
- Room to improve: corrections from the review queue show where extraction and checks can be tuned next.
documents per year in scope
document types told apart automatically: invoices and CMR notes
project timeline
How We Build Document Processing for Logistics
Logistics paperwork arrives as a mix of invoices, CMR consignment notes, delivery notes and customs forms, scanned on different devices and often stamped by hand. Our document pipelines handle this in a fixed order:
- Classification first. Each page gets a document type before extraction, because an invoice and a CMR need different fields and different checks.
- Two readers. Classical OCR provides text with coordinates. A vision-language model extracts the fields into a schema for that document type. Where the two disagree, the field is flagged.
- Business rules. Totals must equal the sum of lines plus VAT, VAT numbers must follow the country format, invoice numbers must not repeat for the same supplier, and amounts are matched against the order or shipment record.
- Visual elements. Stamps, seals and signatures are detected as separate objects, since their presence often decides whether a document is valid.
- Review queue. Low-confidence documents go to an accountant with the uncertain fields highlighted, and the corrections feed the test set.
Today we orchestrate the workflow with LangGraph and trace each document in LangSmith. Review screens and integrations are built in TypeScript with Next.js and Node.js. A new supplier layout is handled by adding examples to the test set, not by writing a template for each supplier.
Why Invoices Still Need Exception Handling
Automating the clean majority of invoices is the easier half of the problem. The cost sits in the exceptions: a missing purchase order, a price that does not match the contract, a duplicate sent twice, a scan with the total cut off. In Ardent Partners' State of ePayables 2025 benchmarks, the average invoice exception rate is 18.4% and the average cost to process one invoice is $9.84. An extraction system that ignores exceptions moves the work elsewhere instead of removing it.
We design for exceptions from the start. Every flagged field carries a confidence score and a reason, so the reviewer sees why a document stopped and not only that it stopped. Rules that catch the same error again and again are reviewed with the finance team, because some exceptions come from suppliers or internal processes rather than from the model.
Two limits remain. Handwritten corrections on printed documents are still unreliable to read, and a new supplier with an unusual layout produces more flags in its first weeks. Both go through the review queue instead of being trusted blindly.
Our logistics software development and computer vision development pages show how document processing fits into wider operations systems.