5 minute read

A PEC envelope sealing itself on a wooden desk — the invoice that sends itself

Every company in Italy needs a PEC mailbox by law. You can both receive and send invoices via PEC. Since today it's become much easier thanks to fatture-pec. Already ready to be used in an agentic way.

Receiving invoices via PEC is quite simple. It’s the main system. Sending them, on the other hand, is a more complex process. This is why many solutions fall into either using the system offered directly by the revenue agency, or entrusting a billing software with electronic invoicing.

You probably know how it works: once you’ve chosen a billing system, it assigns you a unique code, which becomes the method to declare in all the invoices you’ll receive, so that they all end up inside that system. On top of that, the system takes care of creating the invoices in XML format and sending them through the SdI system.

The classic problem is that invoicing is detached from the rest. A software of its own, to update on its own, to query on its own. A system that doesn’t talk to the CRM, to the accounting system, to the data you already have. And it’s up to the company’s staff to copy the data, move it from one system to another, and make sure it stays in sync.

Standalone invoicing is the problem

Every company that invoices knows this: there’s the CRM, there’s the billing system, there’s the accounting software, there’s the bookkeeping software. And between each one there’s always a copy, a check, and time spent making sure these data points exist and are correct. A huge amount of time.

It’s not a tool problem. It’s a discontinuity problem. Invoicing isn’t a process: it’s an island. And every island has a bridge that someone has to cross by hand.

PEC is the channel you already have

The SdI also accepts invoices via PEC. A less-traveled path than the classic one. If you already have a billing system that gives you a unique code, and it works for you, that’s fine — use it. But if invoicing remains a standalone function, hard to integrate with the other processes, it might be worth considering the PEC, since it’s a channel you already own. You already have the data. You just need a way to bring it together.

The story: we wanted invoicing inside

This was our situation. Every time we looked at the invoicing options, the result was the same: a system by itself. To update by itself, to query by itself, to connect somehow. Usually without APIs or an effective interface. Detached from our smart CRM. Detached from our software that handles accounting and management control. Detached from the flow that was already running.

We wanted invoicing inside: inside our system, simple, fast. Capable of interacting with our CRM, of using the data we already had, inside the flow that already worked.

That’s why we built fattura-pec. It intersects with our data, it can be used in an agentic way. It’s not an alternative to a billing system. It’s a system to avoid discontinuity.

You say “make me the invoice.” The rest, it does.

Say “make me the invoice,” and the agent does this:

Reads the starting data. Takes the client card from the CRM (or the source you indicated). Extracts name, VAT number, fiscal code, address and PEC or unique code. If a data point is missing, it asks. It doesn’t guess.

Builds the FatturaPA file. Maps the data into the XML format the SdI requires. The file is identical to the one any invoicing software would produce — the difference is that it’s generated by fattura-pec.

Validates it. Before every send. The file passes through a validation gate: structure, business rules, data consistency. If it’s not valid, the agent doesn’t send it. It corrects and re-validates.

Sends it via PEC. Having both the ability to read emails and to send them, the agent sends it to the correct SdI address. The first invoice goes to sdi01@pec.fatturapa.it; subsequent ones go to the dedicated address the SdI communicates. The agent learns that address and remembers it.

Reconciles. When the notification arrives in PEC, the agent reads it, associates it with the invoice, and updates the status: issued → received by SdI → delivered to recipient. If a rejection arrives, it reads the error code, corrects, and if within 5 days resends it with the same sequential number.

All of this without you filling in a form. Without you opening an invoicing software. Without you copying a data point from one sheet to another.

The state updates on its own

The point isn’t “send the invoice.” It’s that every invoice has a state, and the state updates on its own.

When the agent sends the invoice, the client card in the CRM updates: number, date, amount, status. When the delivery receipt arrives: delivered, with date and time. If a rejection arrives: rejected, with the reason.

There’s no sheet to update. There’s no email to check. The state is the result of a process that reads the PEC, parses the file, and writes the data in the right place.

This applies to the accounting software too: invoices are already structured — dates, amounts, VAT, status — ready for import. The accountant doesn’t start from scratch.

All of this runs locally

The entire flow — reading data, building the file, validation, PEC send, reconciliation — runs on ILAI.

This isn’t a technical detail. It’s the difference between a system that tells you “the invoice was sent” and a system that knows — because the data was read, written, and reconciled by a process that runs inside your boundaries.

Invoicing isn’t a form to fill in. It’s not a software to update by itself. It’s a state that updates on its own, inside the flow you already have. As we saw in the post on the intelligent CRM, the company’s state isn’t a database to feed: it’s the result of a system that works.

ILAI, as always, is that colleague you can say to: “Make me the invoice for X EUR for client Y. Find the data in our CRM. When it’s ready, let me check it. Then create the courtesy copy and send the invoice to the SdI via PEC.”

While you’re at it, can you also do the cash flow forecast for next month, starting from the bank data? Because when everything is connected, it becomes part of a flow, and you have the ability to go faster, and know exactly what’s happening inside your company.

Tags: ,

Categories:

Updated: