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
- Take a picture of the invoice.
- Have the app analyse and interpret the invoice.
- Let the app determine the right account for the invoice (lines) based on the description.
- 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:
- How to create and train the text categorisation AI Builder model.
- How to leverage AI Builder models in the Power Apps app.
- 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.