In my previous post, I showed how to use AI Builder to extract structured data from documents in image or PDF format. One of the main advantages of structuring data, as mentioned, is the ability to use it to train predictive models. That’s exactly what we’ll explore in this article: using invoice data to train a classification model that can predict which accounting entries should be recorded for each document. This is the foundation for an intelligent accounting automation system.
Training the AI Builder model

The first step in training the accounting classification model is to define the type of model we want. Since we’re dealing with structured data and predictive outcomes, we’ll use a classification model. The output will always be the most likely class.
To train the model, the training data must be stored in a Dataverse table — this is a requirement of AI Builder. It’s usually not difficult to find data for this kind of task. Accounting extracts from frequently used accounts will work well.
For our demo, we used three classes:
- Rent and leasing
- Specialized services
- Communications
These types of expenses are common and associated with external services, making them ideal for training a predictive model — there’s a good amount of available data, and the model can be highly useful in automation scenarios.
We created a column of type Choices in the Dataverse table, allowing the user to select one of the classes:

This is the output variable (label) the model will try to predict. The input variables (features) are:
- Invoice date
- Description of each item
- Vendor tax ID
- Total invoice amount
Other variables like VAT rate and amount could also be useful, but to reduce correlation and simplify the model training, we kept only the most relevant ones.
All of this is done through AI Builder’s no-code, user-friendly interface. Even though the interface is simple, it’s important to choose the right model type, features, and understand how to evaluate model performance. We must check results for both training and test data to avoid overfitting.
Operationalizing the predictive model
As shown in the previous article, deploying the model in the Power Platform is easy. (It would be interesting to know whether AI Builder models can be used outside the platform — as far as I know, they can’t.)
Inside the platform, we can trigger the model through Power Automate and integrate it into business processes. This opens up a lot of flexibility and intelligent automation opportunities.
We can also synchronize the Dataverse table with the model so that new records automatically trigger predictions. This makes the solution highly integrated and low maintenance.
In our demo, we created a Power Apps app that lets users run the model in real time and review the results. While this approach isn’t ideal for high-volume data, it allows faster interaction and lets users quickly correct classification errors.
In our case, the Power Automate flow is triggered by a user action in the app:

As shown above, the app sends the invoice data to Power Automate, which processes it and returns the predicted result. This step comes right after data structuring.
In the app’s interface, users can view each document and click a button to run the model:

On the right, the app displays the invoice PDF. When the user clicks the blue button, the parameters are sent to Power Automate, and the predicted classification is returned:

If the classification is correct, debit and credit rules can be applied automatically. The user can then validate (or correct) the result and click “Post Entry”.
This is another simple solution with big impact. Looking forward to your feedback!




