The article below relates to Procure to Pay (P2P) for the following application and/or module(s):
AP Automation
1. Objective
Within AP Automation, invoice lines must be linked to receipt lines or order lines so that matching can be performed. This is done manually by the accounts payable administration; in the case of XML invoices, this is done automatically (detail mapping).
This article describes:
- which order and receipt lines are selected by default when an order is loaded onto an invoice;
- how selected lines are linked to invoice lines.
2. Access and permissions
Access to AP Automation and the invoice screens requires the invoice:can_use_invoice permission. An overview of all permissions can be found in Permission management - permissions.
3. Functionality overview
3.1 Which lines are selected by default?
When an order is loaded onto an invoice in AP Automation, it is determined for each order or receipt line whether it is selected by default. Only selected lines are matched and posted to the ERP system. This determination takes place in two steps.
Step 1: selection per line
By default, all order and receipt lines are selected, unless one of the following situations applies:
- Purchase order lookups determine the selection. In the Order Data ERP configuration, Purchase order lookup type is set to Select lines or Order numbers and select lines, and the invoice contains purchase order lookups. In that case, only the lines whose lookup matches a lookup on the invoice are selected. All other lines are deselected. This situation takes precedence over the situations below.
- There is nothing left to invoice. A line is deselected when the quantity to invoice is 0 or the amount to invoice is 0. As a result, lines with an amount of € 0.00 are never selected automatically, even when the quantity has not yet been invoiced.
- The line is not yet valid. A line with a valid-from date in the future, for example in the case of a recurring order, is deselected.
Situations 1 and 3 apply to order data from the Order Data integration. The rule for a quantity or amount of 0 (situation 2) is also applied to the real-time ERP integrations.
Step 2: selection per invoice
After step 1, the invoice itself can still deselect lines:
- Detail mapping: if the invoice contains imported invoice lines (for example, an XML invoice), all lines are deselected first. The lines that correspond through detail mapping are then selected.
- Auto select logistic lines disabled: if this setting is disabled in the workflow for the invoice, all lines and additional charges are deselected.
- Supplier: if only part of the order lines belongs to the supplier on the invoice, only those lines remain selected. If all lines or none of the lines belong to that supplier, nothing changes.
At invoice level, a line that was deselected in step 1 is never selected again.
3.2 How are lines linked?
Receipt lines are linked based on criteria configured for ISP-Invoice. Multiple criteria can be specified for linking, with different priorities. First, it is checked whether linking is possible based on criterion 1; if not, criterion 2 is considered, and so on.
An example:
- Criterion 1: matching order number and order line number;
- Criterion 2: matching order number and item number.
If there is a unique match between one invoice line and one receipt line based on one of the criteria, these lines are linked to each other and the quantity and amount from the invoice are copied.
If there is no unique match, but multiple receipt lines meet one of the criteria, it is checked whether a combination can be found in which the quantity on the invoice line is equal to the total quantity of multiple receipt lines. If so, all these order lines are assigned to the invoice line. The reverse does not apply: if the total quantities on the invoice lines correspond to one receipt line, no assignment is made.
4. Selecting lines manually
Lines can always be selected or deselected manually, even when the default selection is different. Whether a line with an amount of € 0.00 can be selected and posted depends on the validation configuration of the environment.
Not every ERP system supports posting logistic lines with an amount of € 0.00. Before selecting lines with € 0.00, it must therefore be checked whether the connected ERP system accepts these lines.
5. Summary
- Only selected order and receipt lines are matched and posted.
- By default, all lines are selected, except in the case of purchase order lookups, a quantity or amount to invoice of 0, and lines that are not yet valid.
- The invoice can then deselect lines through detail mapping, the workflow setting for logistic lines and the supplier.
- Lines with an amount of € 0.00 are never selected automatically, but can be selected manually if the validation configuration and the ERP system allow this.
- Selected lines are linked to invoice lines based on criteria with a fixed order of priority.