Invoice reconciliation against your ERP
Import the invoices your ERP already knows. Every extracted invoice is looked up, scored field by field, and only the ones that disagree reach a person.
Reconciliation starts from your side of the books. You import the open or posted supplier invoices from your ERP once (or on a feed); LedgerSync infers which columns are the invoice number, supplier, amounts, date and currency; and from then on every extracted invoice is matched automatically. A clean match clears itself. A mismatch shows you exactly which field differs.
Importing ERP records
- Formats: CSV, XLSX (first sheet or a named one), XML (repeated child elements such as
<records><record>), JSON, a public http(s) URL to any of those, or an object in your S3 bucket. - Limits (defaults): 15 MiB per file and 5,000 rows per import; each row keeps up to 80 attributes.
- Keep your column names.
VendName,Invoice No.,GrossAmt,Belegnummer,Rechnungsbetrag,Warenwert,Steuer,Curr— the import folds each header to lowercase letters and digits and looks it up in the same label lexicon the extractor uses. Columns it can’t name are classified from their values (a 3-letter code is a currency, a date pattern is a date, money next to “tax”, “net” or “gross” is tax, subtotal or total). - Extra columns become attributes and are still compared when the invoice carries the same field — an ILN or a driver name, for example.
- Ongoing feeds: an SFTP inbound folder polled every 5–1440 minutes (default 15) for new invoice files, and PostgreSQL / MySQL connectors that sync up to 10,000 rows from a table or query on demand. Connector credentials are stored encrypted (AES-256-GCM).
A saved column mapping always wins over inference. If a match looks wrong because a slot bound to the wrong header, fix it once under ERP Records → If a match looks wrong and re-run matching.
Finding the candidate record
Each ERP row is stamped with four normalised keys on import: invoice number (upper-case alphanumerics), supplier (code, or name with whitespace collapsed), total (2 decimals) and invoice day (UTC). The extracted invoice gets the same keys, and the lookup is an OR of:
- the same invoice number;
- the same supplier and the same total;
- the same supplier;
- the same total on the same day.
The search is limited to the newest 500 rows of the catalog (configurable). If nothing hits, the engine samples 50 recent rows, re-infers the column mapping, re-stamps the keys and tries again — which is what rescues an export whose headers were bound wrongly. Only when the invoice itself lacks both an invoice number and a supplier does it fall back to scoring the newest 400 records; an invoice with strong identifiers and no hit stays Not matched on purpose, rather than being paired with a low-scoring stranger.
Scoring, field by field
Seven header fields are compared. Each scores 1 or 0 — there is no fuzzy credit on identifiers — and the composite is the plain average of the fields present on both sides, so a field your export doesn’t have never counts against a record.
| Field | How it is compared |
|---|---|
| Invoice number | Compared as upper-case alphanumerics. A 1–4 letter series prefix on one side is tolerated when the shared part is at least 6 characters: VT-90214872 equals 90214872. |
| Supplier | Every supplier code and name on each side is compared with every one on the other; the best pair counts. |
| Total amount | Equal after rounding both sides to 2 decimals — 1100 equals 1100.00. |
| Invoice date | Same calendar day (UTC), whatever the printed format. |
| Currency | 3-letter code, case-insensitive; a missing currency is treated as USD. |
| Subtotal | Also accepted when the gap between the two subtotals equals the printed discount (pre- vs post-discount net). |
| Tax amount | Equal after rounding to 2 decimals. |
Line items
When both the invoice and the ERP row carry line items, lines are paired by item code, or — when a code is missing — by description similarity of at least 0.75. Quantity, unit price and line total must agree within 0.5% or 0.02. A line missing on either side scores 0, and the line-item score is blended into the composite as one extra field. Here is a real result for a two-line invoice where the ERP row has 12 pairs of trousers instead of 10:
{
"score": 0.667,
"discrepancies": [
{ "field": "lineItem.quantity", "extracted": 10, "erp": 12, "lineItemDiscrepancyType": "QUANTITY_MISMATCH",
"itemCode": "HM1607815", "itemDescription": "Horizon Slim Suit Pants Navy" },
{ "field": "lineItem.totalPrice", "extracted": 260, "erp": 312, "lineItemDiscrepancyType": "TOTAL_MISMATCH",
"itemCode": "HM1607815", "itemDescription": "Horizon Slim Suit Pants Navy" }
]
}Custom attributes (any ERP column outside the seven slots that also appears on the invoice) are compared the same way and reported, but they do not move the composite score.
Fully, partially, or not matched
| Status | When |
|---|---|
| Not matched | No candidate was found, or the best composite score is below 0.55. |
| Fully matched | Every field that could be compared agreed, and the invoice’s own arithmetic checks out. |
| Partially matched | A candidate was found but at least one compared field, line item or arithmetic check disagrees — this is the review queue. |
Every result stores the composite score, a 0/1 score per field, and a discrepancy list with the extracted value next to the ERP value, so a reviewer sees what differs without opening the PDF. Opening it is one click away when they want to.
Reviewing exceptions
- Approve or reject a partial match with a note (up to 1,000 characters). Bulk actions on up to 100 documents require a reason.
- Match again re-scores a document against the current catalog without re-reading the file; Refresh from file re-runs extraction first.
- Every review is audit-logged with the user, time, IP and outcome, and the result records who reviewed it and when.
- Workflows can run after each reconciliation — require an approval from a given role, or auto-approve — and tickets (with priority, assignee, due date and comments) can be opened against a document for anything that needs a second opinion.
- Viewers can read lists and detail but cannot upload, import or approve.
The order that matters
Ready to see it on your own invoices?