How to use AI to process business invoices

The intelligent processing of business documents involves the correct use of new AI technologies to automate the analysis, classification and archiving of contracts, purchase orders, CVs and, as in this project, invoices. The goal, however, is always to reduce staff workload (together with the associated risk of error), simplify processes and increase the productivity of the entire organization. A company in the chemical-pharmaceutical sector contacted us precisely to optimize the management of tens of thousands of invoices received every year. Here's how it went.

How to use AI to process business invoices

The customer's problem: improving the invoice management system

Our client was managing an extremely complex process for recording invoices.

Every year, in fact, it receives about 45,000 documents, coming from a multitude of suppliers and from as many as 69 different corporate companies, all potential senders.

These invoices must be addressed to one of the 19 internal Legal Entities, which represent the official recipients for the accounting record, but the number and heterogeneity of the sources made the process difficult to automate.

The old management system was based on sending invoices via email, an already unstructured tool in itself, and entrusted their analysis to third-party software.

The software tried to identify the Legal Entity to which each invoice belonged, by reading the details in the attached PDF files. Once the association was identified, the invoice was uploaded to SAP and then linked to the relevant supplier by consulting the system database.

However, the process did not guarantee absolute reliability: the association between the invoice and the Legal Entity was successful only in 75-80% of the cases.

This meant that a significant percentage, between 20 and 25% of invoices, required direct intervention by staff to be properly recorded.

The problem, therefore, was twofold:

  1. The technology in use was unable to operate efficiently within such a poorly standardized environment, based on e-mail;
  2. The process was not of sufficient quality to ensure smooth management of the volume of invoices received each year by the company.

The result was slowdowns, greater margins of error, unnecessary overload for administrative staff and the risk of compromising the timeliness and correctness of payments to suppliers and internal companies.

We therefore thought of a solution to solve the inefficiencies of the system in use, thinking about which technologies are available today to automate document management and which of these could best meet the customer's needs.

How to automate the processing of business documents?

In many companies, document processing is a fragmented activity.

Information travels on unstructured channels such as emails, documents are received in different formats and their management (from reading to archiving, to recording in internal systems) is often entrusted to manual or semi-automatic operations, which require constant supervision by staff.

An exemplary case is that of our customer.

The variety of senders, the multiplicity of Legal Entities as possible recipients, the receipt of invoices as attachments in e-mail and the lack of standard formats to manage this amount of information inevitably lead to errors and slowdowns in activities that can (and should) be carried out without worries.

Even when solutions are adopted that can automate the analysis of documents, there is often a level of low reliability.

So how can we properly automate document processing and make the process more fluid, traceable and sustainable over time?

Our answer is the adoption of technologies based on artificial intelligence.

OCR (Optical Character Recognition), for example, allows you to convert printed or handwritten texts into digital data. IDP (Intelligent Document Processing), on the other hand, uses AI and machine learning functions to understand the content of documents, extract essential data, classify them and route them to the correct positions.

Natural Language Processing systems allow you to analyze large volumes of text, while generative artificial intelligence allows you to interpret, summarize or create content starting from unstructured inputs (our natural language prompts).

However, for companies that have adopted Microsoft technology, there are even more attractive alternatives.

Azure OpenAI Service brings the power of GPT models to the Microsoft cloud, offering advanced artificial intelligence capabilities to securely understand, generate and transform content.

With Azure OpenAI, it is possible to develop solutions capable of reading complex texts and understanding their meaning, so as to make the information present more usable.

It is therefore the main tool used in our solution to optimize the processing process and the informational value of business documents.

Finally, Microsoft Syntex uses integrated artificial intelligence to automate the understanding and classification of information. It analyzes documents in SharePoint, automatically extracts their metadata, classifies them according to predefined models and makes them more accessible in searches within the digital workplace.

This is the technology we have used to meet our customer's requests.

Let's see more about how in the next sections.

Our solution: leveraging AI integrated with the Microsoft environment to automate invoice management

The solution we have designed is an intelligent automation system for managing invoices received via email, with which it is possible to simplify and speed up the sorting, recognition and registration of documents in the company's ERP system.

The heart of the solution is the integration between artificial intelligence and the Microsoft environment, which has allowed us to automate every step of the process.

As in the old processing process, all invoices are now received in a single mailbox, in order to centralize the point of entry. However, the AI now proceeds with the analysis of emails and attached invoices, automatically extracting the sender and recipient, which are used to identify the reference Legal Entity.

If this association is successful, the email is routed correctly, with a distinction between normal invoices and invoices between companies in the same group (inter-company).

Invoices are associated with the recipient company and are automatically sent to the external software, the system that uploads them into SAP. At this point, a personal search is carried out to complete the association between the individual invoice and the relevant supplier.

If, on the other hand, the AI fails to determine the Legal Entity, the system activates a fallback mechanism based on Microsoft Syntex, which attempts a new extraction of the information.

We specify that this choice derives from a careful assessment of the costs and performance of the two services at the base of our solution: Syntex, while using a model optimized for metadata extraction (more effective than a generic LLM like OpenAI in this specific context), is 5 to 10 times more expensive per single interaction.

For this reason, it is used only in the second instance, in support of the main AI.

If the second attempt is successful, the process resumes normally; otherwise, the email is moved to a folder specially created for unrecognized mail, where an analysis of the content is activated with the aim of completing the association.

The results obtained

After the release, together with the customer, we monitored the performance of the new invoice management system. The goal was to understand if the solution adopted was the right one, and the results were not long in coming.

After a short time, the new process registered about 88% success in associating individual invoices with the related Legal Entities. But we didn't stop there.

We have studied two updates, which have made available:

  • The configuration of a direct mapping between a specific sender address and a Legal Entity, so as to bypass the entire association process.
  • A second configuration to reverse the order of processing, since certain invoices are better read by Syntex than Azure's AI.

What have we achieved?

Around 95% success, compared to 80% registered initially by the customer.

Get in touch with the team

Modern Apps

The Modern Apps team responds swiftly to IT needs where software development is the core component, including solutions that integrate artificial intelligence. The technical staff is trained specifically in delivering software projects based on Microsoft technology stacks and has expertise in managing both agile and long-term projects.