End to end AP automation with Invoice Capture and Invoice automation -D365FO


posted by : Hariharasudan Kandaswamy

Author References : Giel

 I was a bit late to the game here, but the trigger for writing this is that Invoice Capture for Dynamics 365 Finance has been made Generally available after going through a preview program.

This Power Platform based solution allows for digital accounts payable invoices in PDF or image format to undergo OCR (Optical Character Recognition), thus retrieving the meta data required to populate the invoice entity in Dynamics 365 Finance. The recognition is based on an AI Builder model.

From this, the Invoice Automation capabilities of Dynamics 365 Finance can be used to automate the invoice matching and posting process. This way a touchless AP invoice process can be achieved.

This is a space that has been dominated by third party ISV solutions, and I was curious to what level of automation and exception handling the standard first party solution could go.

Although there is quite a bit of documentation on these two solutions I did not find anything that combined them in one process.

In this article I am going to configure and show a process where a PDF invoice is received by email, processed by Invoice Capture and Invoice Automation.


Installation

The installation process is described here: Install the Invoice capture solution - Finance | Dynamics 365 | Microsoft Learn. Please note that there is a specific order in which you need to perform the installation steps.

The Invoice Capture solution is active as a trial. The solution itself not free. For pricing details please contact your Microsoft partner.


Configure Invoice Capture

After the installation, the solution must be configured. The solution can be opened from the Microsoft 365 app overview under the Business apps section: https://www.microsoft365.com/apps.

The steps to configure the solution are described here: Configure the Invoice capture solution - Finance | Dynamics 365 | Microsoft Learn.

For this article I want to highlight a few configuration topics:

Channels

Channels are the methods by which an invoice is imported into the Invoice Capture solution. There are quite a few options that allow for the solution to really be tailored to the processes you see in an AP department. For this blog I am creating a channel that imports an email message containing a PDF invoice. My invoices are in a shared mailbox dedicated to receiving invoices by email from vendors.

When a channel is created a Power Automate flow is created along with it that pulls the emails from the specified folder and uploads them into the Invoice capture. This flow can be customized, again displaying the flexibility of the solution. The default flow looks like this:

From my experience AP departments receive a lot of mail that are not invoices, so typically someone needs to sift through these emails and attachments to distinguish the actual invoices from the clutter. Obviously this can be automated by altering the flow to filter out emails with the text invoice in the message subject, body or attachment name (or something similar), but that is beyond the scope of this blog. Similar filters can be setup to get rid of attachments with supporting documents such general terms and conditions, purchase order copies etc.

Configuration groups

Configuration groups are used to determine what information must be captured from the invoice. I suggest to only capture the minimum amount of fields required. Capturing too many fields will slow down recognition and more importantly cause more work during manual review.

The Manage visible field setting contains all available fields. I turned on Vendor tax number as in several countries this can be used to uniquely identify the vendor.

Configuration groups can be linked to the Legal entity, and can also be linked to specific vendors.

This allows for creating separate processes for vendors where the invoices should be line level recognized, header level only recognized or cost invoice recognized.

In my sample I am using Header-only recognition.

Mapping rules

When recognizing invoice information the following key fields are needed to let the invoice land in Dynamics 365 Finance:

  • Legal entity                      
  • Vendor account             
  • Item (depending on invoice type)
  • Expense type (depending on invoice type)

Legal entity and Vendor account are synced from Dynamics 365 Finance, but in addition to this additional rules can be setup. I did not setup any rules in this test.

AI Builder model

The solution comes with a prebuilt AI model named Invoice processing modelInvoice processing prebuilt AI model | Microsoft Learn.

Currently this model cannot be altered, but in the future it will be possible to create your own custom model based on the standard. This would allow you to train the AI functionality to specific invoice layouts.


Configure Invoice Automation

Now that Invoice Capture has been configured, it is time to configure Invoice Automation in Dynamics 365 Finance. When an invoice is imported in the system, a PO invoice must be matched with the PO before posting. In order to automate as much manual work as possible I am using the invoice automation features to automatically create the invoice from imported information, match them against the Product receipt, and handle any follow-up work and invoice posting using workflow.

These features are documented here: Automated vendor invoicing processes overview - Finance | Dynamics 365 | Microsoft Learn.

We need to configure the Invoice workflow that handles the automation and setup the relevant Accounts Payable parameters for automatic matching and processing.

Import invoice

Invoices for which only header level information is available need invoice lines created on import.

Vendor invoice automation tab in Accounts Payable parameters:

  • Automatically create invoice lines: Yes, since I only recognize header level invoice information the invoice lines should be auto created.
  • Choose default quantity for automatic invoice lines creation: Ordered quantity, because this will nicely show if any lines have not been fully received yet. In case of a partial invoice the invoice lines can be altered to reflect the actual situation.

Vendor Invoice workflow

In the Accounts Payable workflows, I create a new Vendor invoice workflow version for routing the invoice in case of errors and automatic posting. My workflow looks like this:

This is a simplified scenario where the workflow checks if the invoice matches so it gets posted automatically. If not, the invoice is routed to the purchasing department.

More information on creating workflow versions can be found here: Create workflows overview - Finance & Operations | Dynamics 365 | Microsoft Learn.

Automatic matching

After the import the invoice can be automatically matched. It is possible to undertake multiple matching attempts to allow for a delay in product receipt processing. This is commonplace when the invoice arrives before the actual goods do. To automate the matching I setup the following in the Vendor invoice automation tab in Accounts Payable parameters:

  • Automatically submit imported invoices to workflow: Yes, to trigger automation through workflow on invoice import.
  • Check Match product receipt status before workflow submission: No, because I want to use workflow to route invoices to Purchasing in case there is no match.
  • Automatically match product receipts to invoice lines: Yes, to automate the matching as much as possible.

More detail around these and some settings I did not use are documented here: Setup options for vendor invoice automation (Preview) - Finance | Dynamics 365 | Microsoft Learn.

Please note that while I configured the system to automate as many steps using workflow, this is not the only method of operation to manage the AP invoice handling process. It is also possible to have invoices imported into Dynamics 365 Finance, and keep invoices that do not match in the Pending invoices list page for manual verification. After that, the invoice can be submitted to workflow for posting. The right way of working really depends on invoice volumes, and the number of people working on AP invoices.


Show time!

When I send an email with my PDF invoice it is extracted from the email and imported in Invoice Capture. There it is automatically processed. The result looks like this:

There were some fields that did not recognize correctly the first time. The system should learn from corrections that were made. After these corrections I transfer the invoice into Dynamics 365 Finance.

Here, I open the Pending Vendor invoice list page. The invoice was imported, and from there is automatically matched, and then submitted into workflow. Because of the automated steps this actually takes quite a while. The reason for this is that the steps are automated as Background processes using the Process automation framework.

In this framework some of these tasks can only be configured to repeat every hour or day, so this might cause some waiting time. But in a “fire and forget” scenario this should not really be an issue. More info can be found here: Process automation - Finance & Operations | Dynamics 365 | Microsoft Learn.

Please note that Workflow is still triggered using batch jobs, so this does not use the Process automation framework.

In the Pending vendor invoices list page you can see the current automation status changes when the automations take place, and eventually the invoice is submitted to workflow and posted.

So in a “happy flow” scenario there is not much to show, but that is kind of the point. 😊

In case of exceptions that of course changes. How about:

  • An invoice that does not match the goods receipt
  • An invoice that has price differences
  • Approval scenarios around financial dimension owners, project managers, position hierarchy, approval limits, etc.
  • An invoice that is in workflow but the assigned to does not respond (escalation)

The good news is that all these variances are to a certain extend supported in the standard functionality.


Conclusion

I was curious about the standard AP automation capabilities compared to ISV’s I am familiar with. My impression is that the standard actually goes a long way, and that it certainly should be evaluated. Of course ISV’s often have much broader functionality that also goes beyond the scope I discussed in this article.

From a technical perspective I see this as another example where the combination of Power Platform and Dynamics 365 leads to great solutions in the ERP space, and I am eager to see more.

Comments

Popular posts from this blog

Advanced & Auto Bank Reconciliation in Dynamics 365 Finance

Disable editing of specific financial dimensions on form -Microsoft Dynamics Finance and operations(D365FO)