Invoice synchronization
The Aptean AP Invoice Automation connector supports creating purchase invoices in Business Central based on inbound invoice events received from AP Invoice Automation (APIA).
When an invoice is exported from AP Invoice Automation, the connector receives the payload and processes the invoice details to generate a corresponding purchase invoice in Business Central. The system creates the invoice as an unposted purchase invoice, allowing you to review and validate the data before posting.
During the import process, the connector validates the following information:
- Supplier details
- Invoice header information
- Invoice line items
- VAT amount
- Receipt references (if available)
The AP Invoice Automation Purchase Invoices page displays all purchase invoices imported from APIA inbound events. This page lists unposted purchase invoices created through the APIA integration, allowing you to review the imported invoices before posting them. You can open this page from the AP Invoice Automation Setup page.
The page displays important invoice details such as:
- Purchase invoice number
- Vendor number
- Vendor name
- Vendor invoice number
- Document date
- Posting date
- Due date
- Currency code
- Amount and VAT values
From this page, you can:
- Open the imported purchase invoice
- Review invoice details and validation status
- Correct any discrepancies if necessary
- Post the invoice into the system
This page helps you to monitor invoices imported from APIA and ensures that invoices are validated before posting.
Invoice validation
During inbound invoice processing, the system performs several validations to ensure that the invoice data received from APIA matches Business Central calculations.
VAT validation
The system compares the VAT amount received from APIA with the VAT amount calculated in Business Central. If the values do not match, the AP Invoice Automation Status field value is updated to Total VAT mismatch. When you attempt to post the invoice, the system displays a warning message indicating that the VAT amount differs from the expected value.
Receipt matching
If the inbound payload includes receipt information, the system retrieves the receipt lines using the Get Receipt Lines action in Business Central.
The connector compares the invoice lines with the receipt lines and validates the following:
- Invoice quantity against receipt quantity
- Unit price received from the payload
Then, the system applies the following rules:
- If the invoice quantity is greater than the receipt quantity, the system generates an error.
- If the invoice quantity is lower than the receipt quantity, the system uses the quantity from the payload.
Lot quantity validation
For items with lot tracking, the system validates the quantities associated with the lot numbers. If the invoice quantity does not match the lot quantities in the corresponding receipt lines, the AP Invoice Automation Status field value is updated to Lot quantity mismatch. The unit price from the payload is validated against the invoice line. The connector processes this payload and creates a purchase invoice record in Business Central, which is available on the AP Invoice Automation Purchase Invoices page for review and posting.