03 From the document received to the record in your ERP, with every field checked.
We install a document-processing pipeline in your environment that receives documents from your channels, turns them into structured data and leaves them ready for your management software.
Models step in only where interpretation is needed: reading the page and extracting the fields. Intake, checks and writing are deterministic code, which is tested and audited; approval rests with a person on your team.
The processing pipeline, stage by stage
-
01 Intake and preservation of the original
Documents arrive through an email inbox, a shared folder, your company's WhatsApp (through the WhatsApp Business Platform and always with your own account) or an upload from the browser. Before any model reads it, each document is stored exactly as it arrived, with its channel, sender and time of arrival: that original is never altered and serves as the reference in the event of any dispute.
-
02 Reading and layout
OCR turns the image into text and layout analysis rebuilds blocks, tables and reading order. Skewed scans are deskewed and tables split across pages are reassembled.
-
03 Classification and extraction against a schema
The document type is identified and its fields are extracted into an object validated against the JSON Schema for that type: header, lines and amounts. Each field carries its confidence score and the page and region it came from. Output that does not conform to the schema is logged as an error, in plain view.
-
04 Deterministic validation
After the model, rules in code: the lines add up to the taxable base; the taxable base plus taxes gives the total; the NIF or NIE has a valid check character; the dates are consistent; and the customer, the supplier and the items exist in your ERP's master data. A field that breaks a rule is flagged, even if the model reported it as certain.
-
05 Confidence threshold and approval queue
Each document type has a per-field threshold, calibrated with real documents from your company: set too high, the queue takes on all the work; set too low, it lets wrong data through as if it were certain. In the queue, each document appears alongside its original, with uncertain fields and those that break a rule highlighted on the page. Every correction is recorded and used to recalibrate the threshold.
-
06 Writing to the target system
Only what has been approved is written, and it is written by code, never by the model: through the ERP's API where one exists and, failing that, through an import file or the database. The system accesses your ERP with its own user account, holding only the permissions it needs to create what falls to it, and each record links to its source document.
Models and tools at each stage
The pipeline is a fixed workflow, and each stage has its own model and a narrowly defined task. This is what we use today. The choice is reviewed every month, and a new model joins the pipeline only after passing a test set of real, already validated documents from your company.
- OCR and layout: Document AI or Textract when the document can be processed in the cloud; Mistral OCR when data sovereignty matters; Granite Docling and open vision models, such as Qwen-VL, when everything has to stay on your server.
- Classification and extraction: models from the Mistral or Claude families with structured output, or Granite, ALIA/Salamandra and EuroLLM installed on your server. Prompts and schema are versioned together, per document type.
- Input and output filters: Llama Prompt Guard screens the text of each document before it reaches the model to detect hidden instructions. Granite Guardian checks that each extracted value is grounded in the page.
Specifications by document type
Customer orders
They arrive in the body of an email, as an attached PDF or as a photo or list over WhatsApp. The customer is identified by the sender and the NIF, and their references are mapped to your item codes through a cross-reference table that grows with every approved correction. The result is a draft sales order; if a price in the document differs from your price list, the line is flagged.
Supplier invoices
The full tax header (issuer, number, dates, taxable base per VAT rate, withholdings and total) and the lines are extracted. Duplicates are detected by supplier and number and, when your ERP holds the purchase order and the delivery note, quantities and prices are matched across the three documents.
Delivery notes
Quantities received are compared line by line with the purchase order, with partial deliveries and outstanding quantities in view. The signed delivery note, even when it arrives as a photo, is filed with the stock movement it supports.
Reports and summaries
The weekly report and the status of a project are built from fixed queries to the ERP, timesheets or the CRM: code calculates the figures, the model writes the text and each figure links to its query. The summary of a meeting starts from its transcript, produced with self-hosted Whisper, and records decisions, owners and deadlines. All of them arrive as a draft for the person who signs them off.
Suppliers' price lists and catalogues
Each supplier uses its own format and changes it without notice. That is why loading is a comparison between the current price list and the new one, before the item master is touched.
- Input formats: PDF, Excel and CSV; and BMEcat with ETIM classification when the supplier works with these standards, which are read directly, without a model.
- Normalisation: sales and packaging units, gross price and cascading discounts, and effective date, converted to your ERP's structure.
- Matching against your items: by supplier reference and by EAN; new and discontinued references are listed separately.
- Change report: the variation per line and per product family, sorted by impact, and the lines whose selling price falls below the new cost.
- Approved load: purchasing approves the report, the price list goes in with its effective date and the previous one is archived.
Results and how they are measured
Each indicator is compared with the baseline from the diagnostic and appears in the monthly report.
- Time per document: from arrival to registration, by type and by channel.
- Approved without correction: the share of documents confirmed as they arrived and the most frequently corrected fields, by supplier or customer.
- Errors that reach the ERP: prices, quantities and amounts corrected after posting.
- Queue status: pending documents and the age of the oldest one.
- Processed versus expected: by channel and by supplier; a drop points to a channel that has stopped delivering or a format that has changed.
- Price lists up to date: the days between a price list arriving and being loaded, and the lines sold below cost.
- Cost per completed document: spending on models and services divided by the documents registered.
Shall we bring your company up to date?
We start with a 30-minute call to understand your case and explain what the diagnostic consists of and what it costs.
Request the diagnostic