PO Matching
4 minute read
When Enable PO Matching is turned on, AP Automation automatically matches purchase invoice lines to purchase orders or posted receipts as soon as the invoice is created from an Incoming Document or E-Document. No manual action is required to start matching. To configure this feature, see PO Matching setup.
How lines are matched
The effective matching mode for the invoice’s vendor – Purchase Order or Vendor Shipment – determines which lines are considered as match candidates:
In Purchase Order mode, the invoice is matched against the lines of the order referenced in Vendor Order No.
In Vendor Shipment mode, the invoice is matched against the lines of posted receipts that share the invoice’s Vendor Shipment No., which are then traced back to their originating order lines.
For each invoice line, AP Automation first looks for an exact item, G/L account, or resource number match on a candidate order line with the same unit of measure, unit cost, and line discount, then confirms that enough quantity is still available to invoice – the quantity received but not yet invoiced for items, or the remaining order quantity for other line types. If no exact number match is found, the line description is compared against the candidate order lines and the closest match above the similarity threshold is used instead. When Direct Match Shpt. No. & Amt. is enabled, AP Automation skips the unit of measure, cost, and discount checks and instead accepts the order line whose expected amount is closest to the invoice line amount, within the configured rounding tolerance.
When a match is found, AP Automation pulls the matching receipt line onto the invoice using the same logic as Business Central’s standard Get Receipt Lines function, including its dimensions, and marks the invoice line as Fully Matched. The corresponding order line is also marked Fully Matched once its full invoiceable quantity has been accounted for.
Line and document status
A matched invoice line inherits the approval Status of the purchase order line it was matched to. This means an invoice line stays Pending Approval if its order line hasn’t been released yet, and moves to Released once the order line has been. If any line on the invoice is Rejected, the whole invoice is set to Rejected.
These fields are visible on the purchase invoice lines: Fully Matched, Order No., Order Line No., Receipt No., Receipt Line No., Qty. Rcd. Not Invoiced, and Vendor Shipment No. Vendor Shipment No. can only be edited until the line has been fully matched.
Automatic release when fully matched
When every line on a purchase invoice is Fully Matched and Released, and the invoice itself is still Open, AP Automation automatically releases the invoice so it’s ready for posting without manual approval. If an approval workflow is enabled for the document, this instead clears the restrictions that would otherwise force the document through approval.
Unmatched lines and charge items
If a line can’t be matched – for example, there’s no remaining quantity to invoice, or the description doesn’t resemble any order line closely enough – its Fully Matched flag stays off and the line is held for manual review. If the line has no Vendor Shipment No. and a Vendor Item Charge Setup is enabled for the vendor, the line is instead created as a Charge (Item) line using the configured default charge item, rather than being left unmatched.
Posting a purchase order in Vendor Shipment mode
When a vendor’s effective matching mode is Vendor Shipment, Business Central won’t let you post a receipt or invoice from the purchase order unless the order header’s Vendor Shipment No. field has a value. Once the order is fully received, AP Automation clears the order’s Vendor Shipment No. so it’s ready to capture the reference for the next delivery.
Warning before posting unmatched lines
If a purchase invoice that references a purchase order still has lines with no posted receipt when you try to post it, AP Automation shows a confirmation asking whether you want to continue. Choosing not to continue cancels the posting so the lines can be reviewed first.