Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
This article explains the data entities that are available for end-to-end automation of vendor invoices, including invoices with attachments.
Organizations that want to streamline their accounts payable (AP) processes often identify invoice processing as one of the top process areas that should be more efficient. In many cases, these organizations offload the processing of paper invoices to a third-party optical character recognition (OCR) service provider. They then receive machine-readable invoice metadata together with a scanned image of each invoice. To help with automation, a "last mile" solution is then built to enable consumption of these artifacts in the invoicing system. Now this "last mile" automation is enabled out of the box, through an invoice automation solution.
Solution context
The invoice automation solution enables a standard interface that can accept invoice metadata for the invoice header and invoice lines, and also attachments that are applicable to the invoice. Any external system that can generate artifacts that comply with this interface can send the feed for automatic processing of invoices and attachments.
The following illustration shows a sample integration scenario where Contoso partners with an OCR service provider for vendor invoice processing. Contoso's vendors send invoices to the service provider by email. Through OCR processing, the service provider generates invoice metadata (header and/or lines) and a scanned image of the invoice. An integration layer then transforms these artifacts so that they can be consumed.
Several variations of the preceding scenario are possible if invoice integration is required. Data migration is another use case where this interface can be used to create invoices and attachments.
Solution components
The solution footprint consists of the following components:
- Data entities for the invoice header, invoice lines, and invoice attachments
- Exception processing for invoices
- A side-by-side attachment viewer in invoices
The rest of this article provides detailed descriptions of these solution components.
Data entities
A data package is the unit of work that you send to create invoice headers, invoice lines, and invoice attachments. The following data entities represent the artifacts that make up the data package:
- Vendor invoice header
- Vendor invoice line
- Vendor invoice document attachment
The Vendor invoice document attachment entity is a new data entity introduced as part of this feature. The Vendor invoice header entity is modified to support attachments. The Vendor invoice line entity isn't modified for this feature.
For detailed information about data packages, see Data management overview. For information about how to create data packages by using the data management workspace, see Process and consume data packages in Dynamics 365 finance and operations apps solution.
To quickly generate test data that includes invoices and attachments, follow these steps:
Sign in to your instance.
Go to Accounts payables > Invoices > Pending vendor invoices.
Create invoices that have lines and attachments.
Note
The attachments must be header attachments. Currently, the Vendor invoice document attachment entity doesn't support line attachments.
Open the Data management workspace.
Create an export job that includes the Vendor invoice header, Vendor invoice line, and Vendor invoice document attachment entities.
Export the data.
Download the exported data as a package. You can now use the package to import data into target instances for testing purposes.
Determining the legal entity for an invoice
When you import invoices through data packages, you can associate each invoice with the correct legal entity in two ways:
- The import job that processes the invoice imports it into the same company where you scheduled the job in the Data management workspace. In other words, the company of the job determines the company that the invoice belongs to.
- When you send the data package that contains invoices to Finance, the caller (that is, the integration application that runs outside of Finance) can explicitly include the company ID in the HTTP request. In this case, the company context where the processing job runs in Finance is overridden, and the invoices are imported into the company that the request specifies.
Note
This behavior is standard data management behavior. It's explained here, in the context of invoices, just for the sake of completeness.
Exception processing
When vendor invoices come into finance and operations through integration, the Accounts payable team needs an easy way to handle exceptions or failed invoices. They also need a way to create pending invoices from failed invoices. This exception processing for vendor invoices is now part of finance and operations.
Vendor invoices that failed to import list page
You can access the new list page for invoice exceptions at Accounts payable > Invoices > Import failures > Vendor invoices that failed to import. This page shows all the vendor invoice header records from the staging table of the Vendor invoice header data entity. You can view the same records from the Data management workspace. You can also perform the same actions that the exception handling feature provides from the Data management workspace. The exception handling feature is optimized for a functional user, which makes it easier to use.
This list page includes the following fields that come in via the feed:
Company – The company that the invoice belongs to
Error message – The error message that the data management framework issues to explain why the invoice couldn't be created
Number – The invoice number
Invoice account
Name – The vendor’s name
Vendor account
Purchase order – The purchase order (PO) number for the invoice
Posting date
Invoice date
Invoice description
Currency
Log
Line reference – The identifier that comes from the external system
Note
The line reference isn't the invoice ID.
This list page also has a preview pane that you can use in the following ways:
- View the whole error message, so that you don't have to expand the Error message column in the grid.
The list page supports the following actions:
- Edit – Open the exception record in edit mode, so that you can fix the issues.
- Options – Access the standard options that are available on list pages. Use the Add to workspace option to pin the exceptions list page to your workspace as a list or tile.
Vendor invoices that failed to import details page
When you start edit mode, the Vendor invoices that failed to import details page opens for the invoice that has problems. If there are problems with an invoice that has an attachment, the attachment doesn't display. You must reattach the attachment to the invoice.
The Vendor invoices that failed to import details page lets you create a pending invoice. After you fix the problems on an invoice as part of processing an exception, select the Create pending invoice button to create the pending invoice. The pending invoice is created in the background.
Shared service vs. organization-based exception processing
The exceptions list page supports the standard security constructs that the Data management workspace supports for the processing of staging records. You can secure the invoice import job in the following ways:
- By user role
- By user
- By legal entity
If you configure security for the invoice import job, the exceptions list page honors those settings. Users can see only the invoice exception records that this setup allows them to see.
For example, Contoso decides to process invoice exceptions by legal entity. Therefore, security is configured on the invoice import job so that a user in legal entity A can see only invoice exceptions in legal entity A, whereas a user in legal entity B can see only invoice exceptions in legal entity B. This setup enables segregation of duties for the management of invoice exceptions.
Contoso could also decide not to enforce any security, so that the same users can process invoice exceptions for all legal entities. This setup enables a shared services scenario for the management of invoice exceptions.
Side-by-side attachment viewer
To help you easily view the attachments for vendor invoices, the following pages that are used in the invoicing process now provide an attachment viewer:
- Exception handling
- Pending vendor invoices page (also available in the invoice review process)
- Invoice journal inquiry page (for posted invoices)
Here is the main functionality that the attachment viewer provides:
- View all attachment types that Document management supports (files, images, URLs, and notes).
- View multi-page TIFF files.
- Perform the following actions on image files:
- Highlight parts of the image.
- Block parts of the image.
- Add annotations to the image.
- Zoom in and out on the image.
- Pan the image.
- Undo and redo actions.
- Fit the image to size.
Note
These actions are available only for image files (JPEG, TIFF, PNG, and so on). Any changes that you make to an image by using these actions are saved to the image file. Currently, the attachment viewer doesn't include versioning or auditing capabilities.
Default attachment
If a vendor invoice has more than one attachment, you can set one of the documents as the default attachment on the Attachments page. The Is default attachment option is a new option that was added as part of this feature. This option is also exposed in the Vendor invoice document attachment data entity. Therefore, the default attachment can be set through integrations.
You can set only one document as the default attachment. After you set a document as the default attachment, it automatically appears in the attachment viewer when the invoice opens. If you don't set any document as the default attachment, the viewer doesn't automatically show any attachment when the invoice opens.
Show or hide invoice attachments
A new button on the Exception processing, Pending invoice, and Invoice journal inquiry pages lets you show or hide the attachment viewer.
Security
Role-based security controls the following actions in the attachment viewer:
- Highlighting
- Block
- Annotation
Pending vendor invoices page
The following privileges provide read-only access or read/write access to the attachment viewer for the highlighting, block, and annotation actions:
- Maintain vendor invoice image – This privilege provides read/write access.
- View vendor invoice image – This privilege provides read-only access.
The following duties provide read-only access or read/write access to the attachment viewer for those actions:
- Maintain vendor invoices – The Maintain vendor invoice image privilege is assigned to this duty.
- Inquire into vendor invoice status – The View vendor invoice image privilege is assigned to this duty.
The following roles provide read-only access or read/write access to the attachment viewer for those actions:
- Accounts payable clerk and Accounts payable manager – The Maintain vendor invoices duty is assigned to these roles.
- Accounts payable clerk, Accounts payable manager, Accounts payable centralized payments clerk, and Accounts payable payments clerk – The Inquire into vendor invoice status duty is assigned to these roles.
Vendor invoice attachment
The following privileges provide read-only access or read/write access to the attachment viewer for the highlighting, block, and annotation actions.
Note
By default, the roles mentioned in this section provide read-only access to the invoice images in the attachment viewer. If a role needs write access to the images, grant write access to that role by using the privilege and duty described in this section.
- Maintain vendor invoice header entity image – This privilege provides read/write access to the invoice images in the attachment viewer.
- View vendor invoice header entity image – This privilege provides read-only view to the invoice image in the attachment viewer.
The following duties provide read-only access to the attachment viewer for those actions:
- Maintain vendor invoices – The Maintain vendor invoice header entity image privilege is assigned to this duty.
The following roles provide read-only access to the attachment viewer for those actions:
- Accounts payable clerk and Accounts payable manager – The Maintain vendor invoices duty is assigned to these roles.
By default, if the user role provides edit rights on any page, the user also has edit rights on the attachments viewer for the highlighting, block, and annotation actions. However, if there are scenarios where a specific role should have edit rights on the page but not on the attachment viewer, use the appropriate privileges from the preceding list to satisfy the use case.