AI and automation
How to automate invoices, orders and documents with AI
What simple rules can automate and what needs AI, the typical workflow, the checks, privacy and compliant archiving, and how to estimate the time saved.
In this guide7 sections
In a small or medium-sized Italian business, invoices, orders and documents can be automated in two different ways. Supplier e-invoices already arrive as orderly data, in XML format from SDI, the Italian e-invoicing system (Sistema di Interscambio): simple rules are enough to bring them into your business software, with no AI. Artificial intelligence is for everything else (delivery notes, orders by email or PDF, quotes, contracts, foreign invoices), inside a workflow that extracts the data, checks it, records it and passes doubtful cases to a person.
An e-invoice is already data: no AI needed here
If you receive an e-invoice, you already hold structured data, not a document to interpret. Since 1 January 2019, invoices between parties resident or established in Italy can only be electronic, whether they go to other businesses or to consumers, and they pass through SDI in XML format, a file where each piece of information sits in its own field. Since 1 January 2024 the obligation also covers everyone on the flat-rate tax scheme (regime forfettario). A few cases are left out, such as small agricultural producers, and healthcare services provided to private individuals cannot go through SDI.
The file holds the supplier, VAT number, invoice number, date, line items, VAT rates and totals. If the supplier fills them in, it also holds payment due dates, the IBAN and references to the order and the delivery note. The rules of the format are published by the Italian Revenue Agency (Agenzia delle Entrate): from 15 May 2026, version 1.9.1 of the technical specifications is in use. A program reads these fields with precise rules, with no guesswork. Using AI to “read” an XML invoice means paying more to be less accurate.
Even here, AI can help in two cases: when useful information is written freely in the description (“ref. your order of 3/9”), and when someone has to decide which account or cost centre a line should be recorded under. In both cases the AI suggests, and a rule or a person checks.
Where AI makes a real difference: unstructured documents
AI is useful when the information sits inside a PDF, a scan, a photo or the text of an email. These are the documents that someone reads and retypes today:
- delivery notes from suppliers (DDT in Italian), often on paper, photographed or scanned;
- customer orders that arrive by email, PDF or message, each in its own format;
- quotes and offers from suppliers that need comparing;
- contracts, with deadlines, automatic renewals and penalties to remember;
- invoices from foreign suppliers, which arrive as PDFs: for purchases from abroad you still have to send SDI a supplementary document (type TD17, TD18 or TD19), with data that someone copies by hand today;
- credit notes and adjustments to match to the right invoices;
- bank statements in PDF to reconcile with incoming and outgoing payments.
Two technologies do the work here. OCR (reading text from an image) turns a scan into text. A language model, or LLM (AI that understands written text), works out what that text means: which is the order number, which line is the product code, which date is the delivery date. Think of a 12-person business that sells spare parts and takes orders from garages that each write in their own way: the AI turns those orders into order lines ready in the business software, and the person on the sales counter checks them instead of typing them out.
The typical workflow, step by step
A good workflow has six steps, and only some of them need AI.
| Step | What happens | With standard rules | With AI |
|---|---|---|---|
| 1. Arrival | The document comes in from SDI, email, PEC (certified email) or a scanner | Sorting by sender and file type | Recognising the type of document when it is not obvious |
| 2. Extraction | The data you need is taken out | Reading the XML fields | Reading PDFs, scans and emails |
| 3. Checks | Comparison with orders, delivery notes and your records | Totals, VAT numbers, quantities, prices | Matching descriptions written in different ways |
| 4. Recording | The data goes into the business software | Automatic entry | A suggested account or cost centre |
| 5. Doubtful cases | A person decides | Thresholds and blocking rules | The doubt explained, with the documents alongside |
| 6. Archive | The document goes into compliant archiving | Sent to the compliant archiving system | Not needed |
Step 3 saves the most, because that is where time is lost today hunting for things. The standard check is the three-way match: the order, the delivery note and the invoice must say the same thing about quantities and prices. When they agree, the invoice goes through on its own. When they don’t, it reaches a person with the difference already highlighted. If the workflow also has to act across several systems, for example opening a case or writing to the supplier, we are talking about agents: we explain them in the guide on what AI agents really do.
How accurate AI is, and how to check it
AI can make mistakes, so the system has to be designed so that an error shows up and is stopped before it reaches the accounts. Typical errors are concrete: a 1 read as a 7, the delivery date swapped with the order date, a missing field filled in “on a hunch”. Accuracy depends a great deal on the quality of the documents: a PDF produced by business software is easier to read than a crooked photo.
The checks that work are simple:
- the numbers must add up: net amount plus VAT equals the total, and the lines add up to the net amount;
- the records must exist: a valid VAT number that is already on file, a product code that is in the price list;
- the comparison with order and delivery note: quantities and prices within the tolerances you set;
- a safety threshold: below a certain level of confidence, or above a certain amount, a person decides;
- exceptions always go to a person: a new supplier, a changed IBAN (a typical sign of attempted fraud), a price that is not on the price list;
- a log: every piece of data extracted and every decision is recorded, so you can reconstruct what happened.
In the first few weeks it pays to run the AI in parallel: it suggests, a person checks everything, and errors are counted by type. Only when the results are good do you let the simple cases through on their own.
Privacy and archiving: the rules to follow
Documents contain personal data, for example about sole traders, self-employed professionals or employees, so the GDPR applies. If an AI service provider processes this data on your behalf, you need a contract appointing it as data processor (Article 28 of the GDPR). Before choosing one, ask where the servers are, who can see the documents and whether your data is used to train the models. If you use AI at work, the AI Act also applies to you; it is explained in the guide to the AI Act for SMEs.
On archiving, the rules are precise:
- e-invoices must go into legally compliant archiving (conservazione a norma), both for whoever issues them and for whoever receives them: saving them on your PC is not enough;
- the deadlines: archiving must be completed within three months of the deadline for the income tax return of the year the documents refer to, and the Civil Code requires accounting records and invoices to be kept for ten years;
- the Italian Revenue Agency’s free service, if you sign up to it, archives the invoices that went through SDI in a compliant way for 15 years;
- viewing is not archiving: in the “Fatture e Corrispettivi” (Invoices and Receipts) portal, files can only be viewed until 31 December of the second year after the year they were received.
If you also want to keep delivery notes, contracts and other tax documents in digital form only, they too must go into a compliant archiving system. A well-built automation ends with the document sent to the archive, not with a file in a folder.
How much time you save, and how to estimate it
Estimate the savings with your own numbers, not with other people’s averages. You need four figures:
- how many documents arrive each month, by type;
- how many minutes each one takes today, measured over a week, including searching and phone calls;
- how many cases will still go to a person;
- how long it takes to check a document that has already been prepared.
The calculation is simple. An example: if 300 delivery notes arrive each month, each one takes 5 minutes today and after automation 1 minute is left for the check, you save 4 minutes on each of 300 documents, which is 20 hours a month. The calculator on the AI and automation page gives you a first rough figure from your own data.
Then there is the cost. A project like this has a set-up part (connecting inboxes and business software, preparing rules and checks) and a running part, that is the cost of the AI models for each document read, which is estimated beforehand on your real volumes. As for Z-32's costs: You know the price before we start: a written quote after the assessment, in approved phases.. In general the cost depends on how many types of document you handle, how messy they are and how many systems need connecting. In the initial assessment we work out exactly this, before proposing anything.
Where to start tomorrow
Start with a single type of document: the one that arrives most often and that nobody wants to retype.
- Choose the document: usually customer orders or delivery notes from suppliers.
- Collect real examples, including the worst ones: crooked scans, emails written in a hurry.
- Check what is already structured: if your business software imports the XML invoice files from SDI, that part is already solved without AI. If it doesn’t, it is worth finding out why: we cover this in the guide on how much business software costs.
- Write the rules for doubtful cases: what must always go through a person.
- Trial it in parallel for a month, measuring time and errors.
- Widen it afterwards, to the next type of document.
When data comes in clean and on time, it also becomes the numbers to look at every week. If you want to work out which document your business should start with, the 2-minute digital check-up is a good first step.
Sources
- Agenzia delle Entrate, «La fattura elettronica e i servizi gratuiti» (dicembre 2025)B2B and B2C obligation, exemptions, compliant archiving, viewing the files
- Agenzia delle Entrate, circolare n. 32/E del 5 dicembre 2023E-invoicing for everyone on the flat-rate scheme from 1 January 2024
- Agenzia delle Entrate, specifiche tecniche della fattura elettronica versione 1.9.1XML format usable from 15 May 2026, with fields for order, delivery note and payment
- Agenzia delle Entrate, guida alla compilazione delle fatture elettroniche e dell’esterometroDocument types TD17, TD18 and TD19 for purchases from abroad
- Agenzia delle Entrate, FAQ su registrazione e conservazione delle fattureThe free service archives invoices for 15 years
- Decreto MEF 17 giugno 2014, art. 3 (Gazzetta Ufficiale)Deadline for completing the archiving of electronic documents
- Codice civile, art. 2220 (Normattiva)Accounting records and invoices kept for ten years
- Regolamento (UE) 2016/679, GDPR (EUR-Lex)Article 28, the data processor