Solution

Automating invoices and orders received by email, with data extraction and human review

Automating invoices and orders received by email means reading the mailbox, extracting the data from the documents, validating it against rules and against the ERP and posting it through the API, leaving only the exceptions for human review. We use language models for extraction, always with validation and logging. A pilot takes 6 to 10 weeks; indicative price €20,000–60,000, plus VAT.

Automating invoices and orders received by email is a good starting point for an organisation with a high volume of documents, because the return is easy to measure. Today, someone opens each email, downloads the attachment, reads the document and copies the data into the ERP. We build the flow that does that work: it reads the mailbox, extracts the data with language models, validates it against rules and against the ERP, posts it through the API and leaves the team only the cases that need a person.

The hidden cost of copying documents by hand

The direct cost is data entry time. Example: if one person handles forty invoices a day at four minutes each, that is more than two and a half hours a day just copying data. The hidden cost lies around it:

  • Transcription errors that only surface at reconciliation or in a conversation with the supplier.
  • Delays when the person who handles the mailbox is on holiday or off sick.
  • Duplicate invoices that go in twice because the supplier sent them again.
  • Late orders because the email went unopened on a busy day.
  • No audit trail: it is hard to know when a document arrived and who handled it.

To estimate your own case, use the calculator on the pricing page.

Signs this is your case

  • There are one or more mailboxes dedicated to invoices or orders.
  • The team copies into the ERP data that already comes in a PDF or a spreadsheet.
  • Suppliers or customers send documents in very different formats.
  • The same invoice has been posted twice, or one has been missed.
  • Matching invoice, order and delivery note is done by hand.
  • Volume is growing and the answer has been to hire more people for data entry.

What we build

An automated flow, with a review screen for the team. As a rule, it includes:

  • Reading the mailbox, for example through Microsoft Graph in Microsoft 365, or through IMAP on other mail servers.
  • Classification of each message and attachment: invoice, credit note, order, other.
  • Data extraction with language models, into a fixed schema of fields defined with you. On Portuguese invoices with a QR code, the data in the code is used for confirmation.
  • Validation rules before anything is written.
  • An exception review screen, with the original document next to the extracted data.
  • Writing to the ERP through the API, as a draft or a final document, as you decide.
  • A log of every document: when it arrived, what was extracted, which rules it passed or failed, who reviewed it and what was created in the ERP.

How it works, step by step

  1. Receipt. The flow reads new messages in the mailbox and stores the original email and attachments.
  2. Classification. Each attachment is identified. Anything that is neither an invoice nor an order is set aside, with the reason recorded.
  3. Extraction. For scanned documents, optical character recognition runs first. Then a language model fills in the fields of the schema: supplier or customer, tax number, document number and date, lines, quantities, prices, VAT and totals.
  4. Validation. Deterministic rules check what was extracted:
    • the tax number exists in your supplier or customer records;
    • the sum of the lines and VAT matches the total;
    • the document has not already been posted (same issuer and same number);
    • for purchase invoices, there is a matching order and, where applicable, a goods received note;
    • for customer orders, the items exist and the customer’s references have a match.
  5. Exceptions. Anything that fails a rule, or has fields with low confidence, goes to the review screen. The person corrects, approves or rejects it, and the decision is logged.
  6. Posting to the ERP. The validated document is created in the ERP through the API or the vendor’s integration service. If writing fails, the document stays on the list for reprocessing, with no risk of duplication.

What we define before we start

  • Systems and data: which mailboxes, which document types, which ERP and which fields are mandatory.
  • Where extraction runs: model provider, data region and the contractual terms the organisation finds acceptable.
  • Access profiles: who reviews exceptions, who approves, who consults the log.
  • Validation rules and tolerances: for example, what rounding difference between lines and total is acceptable.
  • Logging: what information is kept for each document and for how long.
  • Documentation: field schema, rules, and the review and reprocessing procedure.

This solution records documents you receive. Invoices you issue continue to be produced in the certified invoicing software you already use.

The coordinating commercial operations project describes an internal tool integrated with email, which keeps automated messages separate from situations that need human intervention. It is the same principle applied to another process.

Indicative timeline and price

Prices are indicative and VAT is added. More detail on the pricing page.

  • Process diagnostic: 2 weeks. Process map, current cost, proposed solution and a fixed price. €3,000–6,000, deducted from the project if you go ahead. It includes an analysis of a sample of your real documents.
  • Pilot in production: 6–10 weeks. A tool, automation or integration working with real users. €20,000–60,000. It usually starts with one document type and one mailbox.
  • Ongoing evolution: support and improvements. €2,000–6,000 a month. New document types, rule adjustments and monitoring of exceptions.

When we are not the right choice

  • When your ERP or an off-the-shelf document capture product already handles the process well. We recommend that route.
  • When suppliers already send invoices in a structured format and the ERP imports them without intervention.
  • When the volume is so low that automation would not pay for itself.
  • When 24/7 operations with contractual service levels are required.

Further reading

Our article (in Portuguese) on extracting data from invoices and emails with AI explains the technique in more detail, and the pages (also in Portuguese) on Primavera, PHC and SAP Business One describe how each ERP is written to. If orders also go through the CRM, see ERP–CRM integration. If suppliers should be able to upload invoices and check payment status themselves, see the supplier and customer portal.

Frequently asked questions

Is AI extraction of invoice data reliable?

Extraction by language models can make mistakes, especially with poorly legible documents or unusual layouts, so it should not be used on its own. That is why every extracted value goes through validation rules: the supplier's tax number, the sum of the lines, VAT, duplicates and matching against the order. Anything that fails a rule goes to human review, and nothing is posted to the ERP without passing those checks.

Does the system post invoices directly to the accounts?

That is up to you. A common option is to create the document in the ERP as a draft or pending approval, so that accounts can validate it before posting. Over time, documents from regular suppliers that pass every rule can go through without intervention, if the organisation so decides.

Does it work with scanned or photographed invoices?

Yes, with optical character recognition before extraction. Image quality affects the result: skewed, shadowed or poorly legible documents tend to go to review more often. When a Portuguese invoice carries a QR code, the main data read from the code is used to confirm the extracted values.

Where are documents processed and what data leaves the organisation?

That is decided before we start. We agree with your team where the processing runs, which model provider is acceptable, which region the data stays in and which contractual terms are required. Documents and the log are stored on infrastructure agreed with the organisation.

What about orders that customers send in different formats?

The language model reads PDFs, spreadsheets and the text of the email itself and converts them into a common format. Customer references are converted into your item codes through a cross-reference table, which the team completes whenever a new reference appears.

Tell us about the process you want to improve.

We reply by email with our reading of the problem and the next step that makes sense.

Discuss a project