Use e-documents in the purchases process
You can use configured electronic documents (e-documents) with the purchase documents.
The following purchase documents can be used with e-documents functionality:
- Purchase invoices
- Purchase orders (from version 24.0)
- Purchase credit memos
- General journals
Note
Note:
From Business Central version 24.0, it's possible to connect Purchase Orders with the received E-Documents.
E-documents in purchases
The receipt of purchase e-documents in Dynamics 365 Business Central can be done as a batch job or manually.
How to set up vendors to work with different purchase documents
Follow these steps to configure vendors to work properly with incoming electronic invoices:
Select the icon, enter Vendors, and then select the related link.
Choose the vendor you want to configure.
In the Receiving FastTab, find the Receive E-Document To field to specify the default purchase document to be generated from the received e-document.
Note
Note:
In the Receive E-Document To field, users can either select a Purchase Invoice or Purchase Order based on what they would like to have created from the received e-invoice. This selection does not affect the creation of corrective documents; in both scenarios, the system will generate a Credit Memo.Note
Note:
If the user chooses the Purchase Order option in the Receive E-Document To field, the system will try to update one of the existing purchase orders, but if the purchase order for a vendor in the received E-Document doesn't exist, the Business Central will create a new Purchase Order, using the same approach as creating the new Purchase Invoices explained in this page later.Choose one of the options you want to use for the selected vendor.
Close the page.
To work with purchase invoices
Run the batch job
Note
Note:
This batch job is for automated collection of your incoming invoices. It can work only in a country or region where the functionality exists.
Every time a Job Queue is selected to run, if the external service has incoming invoices that were sent from your vendor, the system collects and imports those invoices. To complete the process, follow these steps:
After the batch job has finished running, the newly imported invoices are listed on the E-Documents page, together with their basic detail information.
To view more details, open a specific e-document.
If there were no errors or issues in the e-document, the Record field maps the document number of the purchase invoice if this is configured on the Vendor Card page (that the system automatically created). Select the link to open the document.
Note
Note:
This system-created document isn't the posted document.To go directly to the purchase document, select the Record field. After you open the Purchase Invoice page, check the document. If everything is correct, post the document.
When you post the purchase document, the Record field on the E-Document is updated from Invoice to Purchase Invoice, and the number of the posted purchase document is available. You can select the number to open the posted purchase invoice.
Details about logs are the same as they are in the sales process for e-documents.
Because errors in the sales process are mostly related to the availability of the service, the incoming document can contain multiple reasons. The most common reason for an error is that the system can't recognize the lines on the e-document that you got from your vendor. Therefore, it can't enter lines in your purchase invoice.
There are two common errors:
- If you want to use this specific line from your vendor invoice that was directly posted to the general ledger (G/L) account, you must have correctly configured the Mapping Text value. To bypass this error if you want to use G/L accounts, select the Map Text to Account to create a specific mapping of the Mapping Text value with the Debit Acc. No. value that you want to use.
- If you want to track the inventory and use lines from your vendor invoice to fill in the items on your document lines, you must have correctly configured the Item Reference No. value. To bypass this error, map the external item with your item numbers by using the item reference list. To learn more, see Use Item References.
After you fix the errors and warnings, you can manually specify when the system should create a purchase invoice based on your setup by selecting Create Document.
Manually import invoices
To manually import external e-documents, follow these steps:
- Select the icon, enter E-Document Service, and then select the related link.
- On the E-Document Service page, select the active service.
- Select Receive, and upload the e-document file that you got from the vendor.
- If an error message occurs, open the e-document to fix the issues.
- When you've finished fixing the issues, in the Import Manually group, select Create Document.
- After the document is created in Business Central, using a batch job doesn't change the way you view it.
E-documents with purchase orders
To link purchase orders with the received e-documents
If your Vendor has configured the Receive E-Document To field to work with Purchase Orders, once an electronic document is created in Business Central (manually or from external end point), Business Central will do the following:
If the Purchase Order for this particular vendor exists and there's a purchase order number in the receive E-Document file, Business Central will automatically link this E-Document with the mentioned Purchase Order, and the Document Status of this E-Document will be In Progress, and the E-Document Status in the Service Status subpage will be Order linked. This link will be visible in the Document field on this specific E-Document. If you need to change the Purchase Order linked automatically, you can do it using the Update Purchase Order Link action and choose manually one of the existing purchase orders for this vendor. You can do it only before matching the lines between E-Document and Purchase Order.
If the Purchase Order for this particular vendor exists but there's no purchase order number in the received E-Document file, Business Central will offer the possibility to choose one of the existing purchase orders when and if you uploaded this document manually. This opens the Purchase Orders list with orders only for the vendor from whom you received the E-Document. You need to select the Purchase Order you want and then select OK. If you failed to select the correct Purchase Order, or obtained the E-Document automatically from an external endpoint using the Job Queue, a new E-Document will not be linked to any purchase document. The Document Status will show Error, and the E-Document Status in the Service Status subpage will also show Imported document processing error. To finish linking with the Purchase Order, choose the Update Purchase Order Link action and choose one of the existing purchase orders for this vendor.
If the Purchase Order for this particular vendor doesn’t exist when a new E-Document is created, Business Central will create a new Purchase Order, using the same model of creation that already exists for new Purchase Invoices. The Document Status of this E-Document will be Processed, and the E-Document Status in the Service Status subpage will be Imported document created. This link will be visible in the Document field on this specific E-Document.
Matching lines from received e-document with purchase order
You can match your received electronic documents with purchase orders’ lines from two different places: from the E-Document page or from the Purchase Order page. The easiest way to locate the already linked Purchase Orders is to use the Linked Purchase Orders tile as a part of E-Document Activities. All non-linked documents can be found using the tile Waiting Purchase E-Invoices where you have a list of E-Documents that you need to review.
Note
Note:
The E-Document Activities with these two tiles can be found in the following Role Centers: Business Manager Evaluation, Business Manager, Accountant, Inventory Manager, and Shipping and Receiving.
Note
Note:
If the VAT percentage differs between the incoming document and the company's VAT percentage, matching documents can't be used in a multi-country environment.
Matching lines from purchase order
You can match the lines from the Purchase Orders list or from one of the opened Purchase Orders. To begin this, use the following steps:
Select the Linked Purchase Orders tile on your Role Center if there's any number.
Choose one of the two options for matching:
- If you want to match the lines from the Purchase Orders list, select the Purchase Order line that you want to match and choose the Map E-Document Lines action.
- If you want to first open the Purchase Order, open the document and then choose the Map E-Document Lines action.
Because both options have the same process, you'll open the Purchase Order Matching page with the following content:
In the header you can find the following information, which can help you to map the lines easier:
Field name Description Vendor Name Specifies the vendor’s name of the electronic document. E-Document No. Specifies the linked electronic document number. E-Document Date Specifies the linked electronic document date. E-Document Amount Specifies the linked e-document total amount including VAT. In the lines, you can find the lines imported from the E-Document file on the left side and the lines from the existing Purchase Order on the right.
All lines on both sides have item numbers and descriptions, together with the Direct Unit Cost and Line Discount %.
On the Imported Lines side, you can also locate the Quantity field as a total quantity from e-invoice and the Matched Quantity field specifying the quantity that already matched to the purchase order lines.
On the Purchase Orders Lines side, you can also find the Available Quantity as the quantity that can be matched to this line (received, but not invoiced quantity) and Qty. to Invoice, specifying the quantity that is already matched to this line.
To match lines, select the lines on both sides that you want to match and choose the Match Manually action. The matched lines will be marked in green.
It's possible to match one to one, but it's also possible to match many to one or one to many, selecting more lines on one or another side before choosing the Match Manually action.
You can also choose the Match Automatically action to automatically match all lines with the same Type, No., Unit Price, Discount, and Unit of Measure.
If you make a mistake, you can choose the Remove Match action to remove the matched lines on the purchase order side or choose the Reset Matching action to reset all that match.
If your E-Document has many lines, you can choose the Show Pending Lines action during the matching process to remove all the e-document lines if they're already completely matched. If you need to see all the lines, you can always choose the Show All Lines action.
Once you finish the matching, you need to choose the Apply To Purchase Order action.
After you apply the matching to the Purchase Order, Business Central will update the following fields:
- Vendor Invoice No. and Document Date on the document header will be updated with values from the electronic document that you'd received and linked.
- Qty. to Invoice in lines will be updated with the values from the Qty. to Invoice column from the Purchase Order Matching page based on the match you did.
- Now you can post the document by choosing the Post action.
- Once you post the document, the Document field on the E-Document page will change the value and it will relate to the Posted Purchase Invoice.
- Close the page.
Important
Important:
By default, you can match only the lines that have the same total amount in both documents. That means Direct Unit Cost together with the applied Line Discount % must be the same, because in one document you can have an amount without discount and in another with discount.
If you want to add some tolerance and allow the difference between lines in E-invoice and Purchase Order, follow these steps:
- Select the icon, enter Purchases & Payables Setup, and then select the related link.
- You want to allow tolerance in the E-Document Matching Difference % field, specifying the maximum allowed percentage of cost difference when matching an incoming E-Document line with the Purchase Order line.
- This setup will apply to all the matching lines, but again considering tolerance for the total amount, as for Direct Unit Cost together with applied Line Discount %.
- Close the page.
Matching lines from e-document
You can match the lines on the E-Document page. To begin, use the following steps:
- Select the icon, enter E-Documents, and then select the related link.
- Select the E-Document that you want to match.
- Choose the Match Purchase Order action to open the Purchase Order Matching page.
- Repeat the same steps that you used when you started matching from purchase orders.
E-document matching assistance copilot
Note
Note:
Currently, E-Document Matching Assistance copilot is in the production-ready preview stage, and is available globally except in Canada. It works in English only.
Note
Note:
Copilot is the AI-powered assistant that helps people across your organization unlock their creativity and automate tedious tasks. The E-Document Matching Assistance copilot helps users to easily match their received electronic invoices with existing purchase order lines, using LLM model for matching lines between two different documents.
To activate the copilot
In case you didn't activate the E-Document Matching Assistance copilot, you need to do it manually. To enable the E-Document Matching Assistance copilot, follow these steps:
- Select the icon, enter Copilot & AI Capabilities, and then select the related link.
- In the list of capabilities, choose E-Document Matching Assistance and change the status to Active.
Once the copilot is activated, you can begin using it.
Use the e-document matching assistance copilot
If the copilot is activated, existing actions Map E-Document Lines on purchased orders and Match Purchase Order on the E-Document page will get different icons, symbolizing AI capability. You can run these actions (the same as in previous examples from the list of purchase orders) from one of the Purchase Orders, or from E-Document. All steps for running are the same, but when you run this action, the result will be different, and you need to follow these steps:
Choose the Map E-Document Lines or Match Purchase Order action for already linked documents.
Notice that the E-Document Match Order Lines with Copilot prompt is working and the Purchase Order Matching page is in the background. That means the same process is happening but with the automatic support of Copilot, which runs the matching process instead of you.
After a few seconds, the E-Document Match Order Lines with Copilot will suggest lines for matching with some additional details:
In the prompt header, you can find the following information:
Field name Description Auto-matched Specifies the number of matches proposed automatically. This is based on a string comparison and if there's 80% or more description overlap, the system will match these descriptions automatically without using GPT capabilities. Copilot matched Specifies the number of matches proposed by copilot using both string and semantical comparison. E-Document No. Specifies the linked e-document number. Invoice Total Amount Excl. VAT Specifies the total invoice amount excluding VAT. Matched Total Amount Incl. VAT Specifies the matched amount including VAT. If all lines are matched, you'll see the green text in the upper right corner: All lines (100%) are matched. Review match proposals.
In the Matched proposal lines, you can find the following information:
Field name Description E-Document Line No. Specifies the e-document line number (coming from the original e-document file). E-Document Line Description Specifies the e-document line description (coming from the original e-document file). Matched Quantity Specifies the quantity that will be applied to the purchase order line. Proposal Specifies the action proposed by AI, and these suggested actions are related to matching the purchase order lines. All fully suggested and matched lines are marked with green colour. If there's any issue, i.e., different price, but in the allowed price range, this line will be marked as yellow, and if there's any similarity between the description fields but price difference is bigger than allowed, this line will be marked as red.
If you aren't satisfied with some suggestions, you can delete them using the Delete Line action.
If you want to see proposal matchings, you can select the link in the Proposal column to open the E-Document Match Details page.
On the E-Document Match Details page you can compare details from the E-Document and Purchase Order, to be sure about the suggested matching before confirming it.
After reviewing, close the page.
If you aren't satisfied with most of the suggestions, or if you don't want to use the E-Document Match Order Lines with Copilot feature, select Discard it and you can continue with the manual matching as explained previously.
If you want to keep suggestions, choose the Keep it button and the system will save all suggestions made by Copilot.
Business Central will close the Copilot prompt and lines on the Purchase Order Matching page will be marked as green because they're already matched.
Now you can continue to work as you're doing manual matching; that means you can remove matches, match manually, or reset matching. If you don't want to make changes, just choose the Apply To Purchase Order action and continue working with the Purchase Order.
Note
Note:
You can choose the Match with Copilot action on the Purchase Order Matching page again, but in this case, you'll be asked if you want to overwrite the existing matches, as all lines have been matched already.
Note
Note:
Price/cost analysis and the available quantity check is part of the preprocessing activity.
Overview of e-document statuses
To get a better overview of all e-documents in the company, you can select the Accountant role center where e-document statuses exist. There, you can find e-document activities that have the following statuses:
Incoming e-documents:
- Processed
- In Progress
- Error
See also
Set up e-documents
Use e-document in the sales process
Extending e-documents functionality
Financial Management
Invoice sales
Record purchases with purchase invoices and orders
Work with Business Central