Client workForeign invoices into Italian e-invoices

Morphia

From a foreign supplier’s PDF to a FatturaPA integration XML, with a human review before it is generated.

Morphia: list of foreign invoices with review status, supplier and proposed document type Morphia on mobile: TD18 classification with its rationale and the Generate XML button

The context

Foreign invoices, integrated by hand.

Morphia was built for a company that receives invoices from foreign suppliers in different languages and formats. Each one needs an integration document or a self-invoice (TD17, TD18 or TD19) to submit to SdI, Italy’s e-invoicing exchange system: data copied from the PDF and a tax decision to repeat every time.

The challenge

Automating without losing control.

Reading the PDF could be automated; the tax classification could not. Document type, VAT rate and nature code have precise consequences and must stay justified and verifiable. The invoices also contain personal data, so it mattered where they are processed.

The solution

Splitting the work between model, rules and people.

I split the work into three parts. A language model extracts only the data written on the document, a rules engine proposes TD17, TD18 or TD19 with a rationale and a legal reference, and the reviewer checks everything against the PDF and confirms. No XML is generated without a review, and the workflow also works on a phone.

The outcome

A validated XML, after review.

An uploaded PDF becomes a numbered FatturaPA XML, validated against the official schema and ready to submit through the channel already in use. The application runs on a dedicated installation and, by default, only accepts extraction services that process data in the European Union.

The next projectStart with a conversation

Tell me about
your project.

Have an idea or something you would like to improve? Get in touch and we can work out together how I can help.

Prefer a call?
Open full size ↗