AP Automation using AI Builder in the Power Platform

Since the AI Builder for Power Platform is no longer in preview, I thought I would share this example where I use the Category Classification and Form Processing capabilities to provide users with a seamless AP Automation solution using a mobile device.

Mobile AP Automation Use Case

This is the use case: the user, let’s call her Inga, is an agricultural consultant mostly working remote within the farming community using here phone device. She occasionally receives vendor invoices that she needs to scan and submit to the central Dynamics 365 Finance system. Instead of logging in to the system, Inga would like to

  1. Take a picture of the invoice.
  2. Have the app analyse and interpret the invoice.
  3. Let the app determine the right account for the invoice (lines) based on the description.
  4. Submit the invoice to the invoice register in Dynamics 365 Finance with the image attached.

In this first part of the series, we will look at how we create and train the AI Builder model for analysing the invoice. In the coming weeks, these blog posts will follow:

  1. How to create and train the text categorisation AI Builder model.
  2. How to leverage AI Builder models in the Power Apps app.
  3. Using Power Automate to submit the invoice to Dynamics 365 Finance.

Creating and Training the Form Processing AI Builder Model

AI Builder models are accessed through the Power Apps admin centre. Like any other Power Platform artefact, an AI Builder model belongs to an environment.

On the Build tab of the site menu, you have access to the available AI Builder types. From here, you can create your first model. In our example, we are using the Form Processing type to create the invoice processing model.

The first step in the model configuration process is to determine the data fields you would like to extract from the invoices. As you can see from the above screenshot, we are using some pretty normal invoice data fields such as vendor, invoice number and invoice date.

Next step is to select and upload existing images of invoices you would like to use to train the model. Obviously, the more images you upload, the better trained the model will become. It is possible to add more images later and retrain the model to improve accuracy.

Based on the data fields you created in the first step, you can now go through each image and tag the content in the image. This helps the model understand where the data field is placed. Again, variety in the data will help the model become more flexible.

In my example, the invoice only has one invoice line. Ideally, you should use multi-line invoices to help the model learn that invoice lines belong to a table.

As you can see in the below screenshot, the last step in the process is to start the training of the model. Depending on the data set used, this may take a few minutes.

Once the model has been trained, it is ready to be published as shown below. A model is not available to be used in a Power Apps app until it has been published.

By clicking on the Quick test button you can upload a test invoice to check that the model works before publishing it. The following screenshot shows how the quick test has found the data fields correctly in the invoice I used for the test.

The AI Builder model is now ready to be used in the app.

In the next blog post we will take a look at how we can use an AI Builder model to analyse the description on the invoice and automatically find the correct general ledger account.

Published by Henrik Marx Larsen

This blog is my personal contribution to the Microsoft Dynamics 365 for Operations and Finance (D365F&O) community debate. Having worked with Axapta / Dynamics AX / D365F&O for 20 years , I think I may have some interesting insights and views to share. However, I tend to always look forward so I will mostly be writing about current subjects. I have a vain hope that my musings may inspire some of you and provoke some new thoughts in the interest of our community. My day job is to work as a Senior Technical Specialist at Microsoft and help take D365F&O capabilities to new and existing customers. Please note, the views expressed in this blog are mine alone and do not necessarily reflect the views of my employer, Microsoft.

6 thoughts on “AP Automation using AI Builder in the Power Platform

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: