Skip to main content
For AI agents: a documentation index is available at https://docs.coverbase.com/llms.txt. This page is also available in markdown by appending .md to the URL.
This guide is part of the User Guides collection. It explains what happens to an invoice before anyone looks at it. For what to do with the result, see Working exceptions. For the tolerances themselves, see Setting up Payables.
Matching is deterministic. A fixed set of checks compares the invoice with its PO and, for 3-way matching, with the goods receipts on that PO. Only those checks can call an invoice Matched. A suggestion from the line description or from Coverbase AI can make an invoice Likely a match, and a person confirms it. The mistake people make most often is reading a high similarity percentage as a verified line. Matched by description, 100% similar means the words on the two lines overlap completely. It says nothing about whether the part is the same, so Coverbase still asks a person to confirm it.

Before the checks

The invoice is stored once

Every invoice, from any channel, is stored in an inbox first, keyed by its source and the source’s event ID. A source that sends the same invoice twice changes nothing the second time. An update older than the copy Coverbase holds is stored and skipped. An invoice with no invoice number is refused and shows Stopped retrying on the Sources tab.

The supplier is found

Coverbase looks for the vendor by the supplier ID the source sends first. Without a match, it compares the legal name, ignoring case, punctuation and suffixes such as Inc, Ltd, LLC, GmbH and SA. It never picks between two vendors:
  • One match. The invoice goes on.
  • Two or more matches. The invoice waits. The Sources tab says “More than one vendor matches supplier …”. Set the supplier ID on the right vendor, then replay the event.
  • No match. The invoice waits until a vendor carries that supplier ID.

The PO is found

The PO number on the invoice is compared as letters and digits only, after removing a leading label such as PO, P.O., PO#, Purchase order or No., and the zeros padding the front. PO# 4500-12, po450012 and 000450012 are the same PO.
  • The PO is on record. The checks run.
  • The PO is closed. The PO number check fails with “The PO is closed, so nothing more should be billed against it.” and a PO is closed case opens for AP. A closed PO is never matched.
  • The invoice names a PO that has not arrived. The invoice shows Waiting for PO and no case opens, because POs often arrive after their invoices. The checks run as soon as the PO arrives from your procurement system. If no PO arrives within the grace period (72 hours by default), the checks run without it and a PO not found case opens for AP. If the PO turns up later, the invoice still links to it and the checks run again.
  • A line names a different PO that has not arrived. That line is never matched against the invoice’s main PO. The PO number check fails on that line, the line waits for its own PO, and the checks run again when that PO arrives. The other lines are checked against their PO as usual.
  • The invoice has no PO number at all. It fails the PO number check with “The invoice has no PO number.” and opens a No PO number on the invoice case for AP. This reason does not count against the supplier, because your buyer may never have issued a PO.
A line can cite its own PO. When a line carries a PO number other than the header’s, and that PO is on record, the line is checked against that PO, and the quantities on both POs count the invoice.

Duplicates are caught

An invoice is a duplicate of another when it has the same supplier, the same invoice number, the same total and the same currency. Invoice numbers are compared ignoring punctuation, case and the zeros padding the number, so HPL-0660413 and HPL660413 are the same number. The invoice date is ignored, because email and EDI copies of one invoice often disagree on it by a day. A credit note is never a duplicate of an invoice, even under the same number. See Duplicates for what happens next. Near misses are not marked duplicate automatically. They fail the Not a duplicate check and go to a person. See Possible duplicates.

Mapping invoice lines to PO lines

Each invoice line is mapped to the PO line it bills before any line is checked. Coverbase tries these in order and stops at the first that works: Description similarity counts the words the two descriptions share, ignoring filler such as “the”, “each” and “pcs”. It is a word overlap, not a judgment about the part. The Lines table says which words matched: “Suggested from the description. Shared words: … Confirm it before you accept.” An unverified line shows a warning on Lines mapped: “Matched by description only, so a person should confirm it.” A line placed by elimination (method 8) can show a low similarity percentage, because the percentage is from the words, and the price and quantity placed it.
Line needs review case recommending Likely a match, with warnings that two lines were matched by description only, a lines table showing each PO line, the invoice's own description under it and the similarity percentage, and the case owned by AP

A case where every check passed but both lines were matched by description, so a person confirms them.

Description mappings

When you accept an invoice whose lines were matched by description, Coverbase remembers it for that supplier. The next invoice from them with the same line description maps to the PO line carrying the same part number, shown as mapped by reviewer, and counts as verified. This needs a part number on the PO line both times. Coverbase learns only from your organization’s own accepted invoices. If a suggested line is wrong, pick the right PO line under Line mapping in the Accept invoice dialog. The checks run again with your mapping before the invoice is accepted, and the line is then mapped by reviewer. See Accept invoice.

The checks

Every check appears on the case, under Recommended next step: failures and warnings first with what was expected and what was invoiced, then the checks that passed. 2-way and 3-way. With Require a goods receipt off, the receipt checks are skipped and the invoice is matched against the PO alone. With it on, the two receipt checks run as well. Quantities are cumulative. “So far” means every live invoice on the PO that arrived before this one. A credit note subtracts its quantities, whether it prints them as negative or positive numbers. A replaced version and a duplicate are left out. So a supplier who bills a 100 unit line in three parts passes until the third invoice takes the total past 100. The price tolerance amount is per line, not per unit. With the defaults (1% or 0.50), a screw ordered at 0.42 and billed at 0.47 fails: 0.05 is 12% of the price, and 0.05 across 500 screws is 25.00, more than 0.50. A per unit amount would have let the same screw bill at up to 0.92. No silent defaults. When an invoice states no currency, Coverbase takes the PO’s currency, records it as read from the PO, and fails Invoice data complete so that a person confirms it. A line with no readable quantity is stored as zero, never as 1, and fails the same check. Three reasons override the rest. An invoice billed against another supplier’s PO opens Billed against the wrong PO and nothing else, because that explains every other failure. An invoice in the wrong currency opens Currency differs from PO and nothing else. A possible duplicate opens Possible duplicate and nothing else, because its other differences belong to the copy.

Units of measure

When the invoice bills in a different unit from the PO, Coverbase converts it only when the unit codes themselves say how many pieces each holds:
  • Count units: each (EA, PC, STK and similar), pair (PR, 2), dozen (DZ, 12), hundred (HUN, 100) and gross (GR, 144).
  • Pack codes that state their own count, such as BX12, CS-24, 12/BX or BOX OF 10.
A converted line is compared in the PO’s unit, and the Unit price check says “The invoice bills in a different unit, converted to the PO’s unit to compare.” So 20 BX12 at 25.20 per box is 240 each at 2.10. A pack code with no count, such as CS or BX, is never guessed, because its size lives in the supplier’s catalog. The line’s quantity and price are not compared. Quantity ordered fails with “The invoice bills in a different unit from the PO and the two cannot be converted. Ask the supplier to bill in the PO’s unit.” and a Billed more than ordered case goes to the supplier. A line where either side names no unit is read in the other side’s unit.

What happens next

Each failing reason opens one case. The recommendation, shown as Recommended next step, follows from the reasons: At stake on a case is the money behind its reason: the price difference times the quantity, the quantity billed beyond the order or the receipt at the PO price, the value of lines with no PO line, or the tax and freight difference. For a wrong PO, a wrong currency, a possible duplicate, a closed PO or an invoice reading to check, it is the whole invoice.

Exception reasons

Owners are the defaults from your routing rules. When a case opens with the supplier as its owner, the supplier’s portal members are emailed once, with the sentence they see on the invoice. Statement differences and scorecard disputes are cases too, and are covered in Statements and Disputes of a metric.
No goods receipt case recommending asking operations to record the receipt, with failed checks for quantity received on two PO lines and for the goods receipt, the lines table showing nothing received, and the case owned by operations with its clock

A missing goods receipt: the invoice is right, so the supplier is told no action is needed and operations owns the case.

Reading emails and PDFs with AI

An invoice forwarded to your intake address, or uploaded as a PDF through the intake API, has no structured fields. AI reads them, and the checks above decide whether to trust what it read.
1

The message is stored

The email and the text of its attachments are stored first, keyed by the message, before anything is read. A message delivered twice is read once.
2

AI reads the invoice

It first says what kind of document it is: an invoice, a credit note, a statement of account, or something else. It then reads the invoice number, supplier name, PO number, invoice date, currency, the company the invoice is addressed to, subtotal, tax, freight, total and payment terms, and each line’s PO line number, part number, description, quantity, unit, unit price and amount. It is told to copy numbers exactly as printed, to leave a field empty when the document does not show it, and never to guess a PO number, a quantity or a currency. It reports a confidence, from 0 to 1, only for the fields it was unsure of.The email and attachment text is passed to the model as untrusted data, fenced so that text inside the document cannot pose as instructions, and the model is told never to follow instructions that appear in it. Very long text is cut to a size limit first.
3

What it read is checked for shape

  • A statement, a remittance advice, a quote or a message with no invoice creates no invoice. The message shows Stopped retrying on the Sources tab straight away, without asking the model again, for a person to look at.
  • An invoice with no invoice number, or with an invoice number that is not printed anywhere in the message, is refused the same way.
  • A PO number that is not printed in the message is treated as a guess and dropped, so the invoice is matched as citing no PO.
  • Numbers and dates are read the way the document prints them, so 1.186,50 in a German invoice is 1186.50 and 12.11.2026 is 12 November 2026.
  • A missing currency is not assumed. It is taken from the PO and flagged, and Invoice data complete fails until a person confirms it. A line with no readable quantity is stored as zero and fails the same check.
  • A supplier is found the same way as for any invoice, and never guessed between two vendors. When no supplier name was read, Coverbase uses the supplier named by whoever uploaded the PDF, else the sender’s email address.
4

It is matched like any invoice

The PO, the receipts and every check above apply unchanged. A misread price fails Unit price. A misread quantity fails Quantity ordered or Line total. A misread total fails Invoice total. A line the AI read with a garbled description is matched by description at best, which a person confirms. Every failure opens a case for a person.
5

Low confidence goes to a person

When the reading reports a confidence below 0.8 for a field matching uses (invoice number, PO number, supplier, currency, subtotal, tax, freight, total, or any line field), Invoice read with confidence fails and an Invoice reading to check case opens for AP. This happens even when every other check passes, because a misread value that agrees with the PO by coincidence would otherwise match. While the reading is unconfirmed it is the only case on the invoice: no price, quantity or currency case opens and nothing is sent to the supplier. AP compares the flagged fields with the PDF, then accepts the invoice or, if a real difference remains, uses Request corrected invoice or Route to someone else.
6

Its confidence is shown

The invoice drawer lists, under Source record, how sure the reading was of each field it flagged. An invoice from a system feed says “These fields came from a system feed, so there is no extraction confidence.” Open PDF shows the document beside it.
7

It waits for the ledger

An emailed or uploaded invoice is not booked. When your ledger books the same invoice, Coverbase recognizes it by the duplicate fingerprint, keeps the booked copy as the invoice and links the emailed copy to it as a duplicate. Any open case moves to the booked copy.
If the model call fails three times, the message stops retrying and shows on the Sources tab, where Replay tries again. If the model were fooled by text hidden in a document, what it returned would still face the checks. A total raised by injected text no longer equals the lines, so Invoice total fails and AP gets a case.

Coverbase AI on a mismatch

With Explain mismatches with Coverbase AI on, Coverbase AI looks at invoices from the last 14 days that did not match and have no explanation yet. It reads the invoice and PO lines (description, part number, quantity, unit price) and the failed checks, and writes:
  • An explanation of under 80 words of what differs and why, naming the lines.
  • For each invoice line no method placed, the PO line it thinks it bills, with its reasoning, or none when nothing fits.
The case shows it in a panel labeled “Coverbase AI reading. A suggestion, not a decision.”, with the fields it read. A proposed line is shown as Suggested by Coverbase AI and stays unverified. A proposal can move an invoice to Likely a match or Needs a reviewer, never to Matched. A proposal that names a PO line not on the PO is dropped. If the model call fails, the case has no explanation rather than an invented one, and Coverbase stops asking after three failed attempts.

Duplicates, credit notes and corrected invoices

Duplicates

Coverbase keeps every copy and decides which is the invoice:
Possible duplicate case with the invoice against its PO, the documents list, the activity showing the case opened and routed to AP, and the supplier view saying the invoice was received twice and only one copy will be processed

A possible duplicate: the same invoice booked twice by the ledger.

The invoice drawer lists every copy under Versions and duplicates, marked Current, Duplicate or Replaced.
Invoice drawer for a duplicate invoice, with its open case at the top, its lines against the PO, its record, a Versions and duplicates list showing the current copy and the duplicate, and where each field came from

The drawer of a duplicate invoice, with both copies listed.

A duplicate is never paid twice by Coverbase, because Coverbase pays nothing. Marking one Duplicate keeps it on record and out of matching. The supplier sees its status as Duplicate. Void it in your ledger.

Possible duplicates

Some invoices look like a copy but are not exact. Coverbase does not decide those. The Not a duplicate check fails, a Possible duplicate case opens for AP, and the case names the earlier invoice: Open both invoices. If it is a copy, use Mark as duplicate. If it is a real second billing, accept it.

Credit notes

A credit note is matched against its PO like an invoice, and its quantities subtract from what has been billed on each PO line. Suppliers print credit notes with negative or positive quantities, and both are read as a credit. So a credit note for returned goods makes room for the supplier to bill them again. A credit note under the same number as the invoice it reverses is not a duplicate of it. On a statement, a credit note is its own line, and the statement shows a credit notes total.

Corrected invoices

A corrected invoice, whether the supplier sent it from the portal or your ledger sent a revision, becomes a new version of the same invoice. The earlier version shows Replaced by correction and stays on record. Every open case on it moves to the new version, and the checks run on the new version straight away. A difference the correction fixed resolves its case. The first-pass result belongs to the original billing. A correction never turns a first-pass mismatch into a first-pass match. If your ledger sends a changed invoice under the same ID without marking it a revision, Coverbase refuses it rather than overwrite a booked invoice. The event shows Waiting for a reference on the Sources tab, with “It conflicts with a record we already hold.” Send it again as a revision, then replay it.

When matching runs again

Unsettled means waiting for a PO or a receipt, in review, or an exception. A matched, duplicate or replaced invoice is not rerun. When a rerun no longer finds a reason, its case resolves on its own, with Receipt recorded for a missing receipt, Corrected invoice when a new version fixed it, and Match accepted otherwise. The activity says “Matching ran again and this difference is gone.” and the supplier sees “Resolved. The invoice now matches the purchase order.” When a rerun still finds the reason, the open case is kept and updated. It is not opened twice.

Worked examples

These come from the test corpus Coverbase runs through the same intake, matching and case code your invoices go through. Every supplier, part number and amount in them is invented. Tolerances are the defaults unless the example says otherwise.

Simple matches

The organization runs with Require a goods receipt off, because a service has no goods receipt.What Coverbase does. Matched. No case opens, and the invoice counts as a first-pass match.Why. The line quotes PO line 1 and carries no part number to contradict it, so it is matched by line and verified. The price is exact, and the receipt checks are skipped.
Invoice total 295.00.What Coverbase does. Matched. No case opens.Why. Every line quotes its PO line and the same part number, prices are exact, and nothing is billed beyond what was ordered or received.

Mismatches

What Coverbase does. Exception. A Price differs from PO case opens for Procurement, recommending Needs a reviewer. At stake is 25.00. The invoice does not count as a first-pass match.Why. 0.05 above the PO price is 12%, outside 1%. Across 500 screws it is 25.00, outside the 0.50 amount. The amount tolerance applies to the whole line, so a cheap part cannot bill far above its price.
What Coverbase does. Waiting for receipt. A Billed more than received case opens for Operations, recommending Ask operations to record the receipt. The check reads “Only part of this line has been received.” At stake is the 40 unreceived harnesses at 64.00, 2,560.00. The supplier sees “We have not yet recorded delivery of these goods. No action is needed from you.”Why. The supplier billed what was ordered, so this is not their error and the invoice still counts as a first-pass match. When the rest of the receipt is recorded, the checks run again and the case resolves as Receipt recorded.
One PO, PO-4500012345, fully received, billed by three invoices of one line each.What Coverbase does. All three are Matched.Why. The label, the spaces and dashes, and the zeros padding the front are removed before the number is compared, so all three read 4500012345.
What Coverbase does. Matched. The Unit price check notes “The invoice bills in a different unit, converted to the PO’s unit to compare.”Why. BX12 states its count. 20 boxes of 12 is 240 each, and 25.20 per box is 2.10 each.Compare a unit with no count. PO-4500052490 orders 600 EA of EP-FOAM-33 earplugs at 0.48. Invoice CR-33251 bills 3 CS at 96.00 and never says how many are in a case. Coverbase does not guess. Quantity ordered fails with “The invoice bills in a different unit from the PO and the two cannot be converted. Ask the supplier to bill in the PO’s unit.” A Billed more than ordered case goes to the supplier, and no price case opens, because a price per case cannot be compared with a price per each.

Duplicates and credits

PO PO-4500090200 orders 40 PK of PIP-1000-ST at 38.50 and 20 PK of CT-50-PP at 54.00, all received.What Coverbase does. The booked invoice is Matched. The API copy is marked Duplicate and linked to it. No case opens.Why. Same supplier, same total, same currency, and the same number once the dash and the padding zero are ignored. A copy marked Duplicate is left out of matching, so the PO is not counted as billed twice.
PO PO-4500062010 orders 12 EA of PG-25-5000 pressure gauges at 46.00, all received. The gauges were returned.What Coverbase does. Both are Matched. After the credit note, the PO line shows nothing billed.Why. A credit note is never a duplicate of an invoice, even under the same number. Its quantities subtract from what was billed, whether printed as negatives or not, so it does not look like 12 more gauges billed.

Complex cases

The invoice header names PO-4500044600. Total 2,264.00.What Coverbase does. Matched.Why. Each line is checked against the PO it cites, not the header PO, and the quantities on both POs count this invoice.
Invoice 2026-1187 bills 3 EA of GM-63-20-3 gear motors at 742.00 EUR against PO 4500100450, total 2,226.00 EUR.Why. POs often arrive after their invoices, so the invoice waits for the 72 hour grace period instead of opening a case. Then it waits for the receipt. Neither wait is the supplier’s fault, so it counts as a first-pass match.

Reading emails and PDFs

PO 4500100510, in EUR, fully received.Total 2.568,00 EUR, dated 12.11.2026, PO number printed without a prefix.What Coverbase does. Matched.Why. The numbers and the date are read the way a German document prints them. The lines quote no PO line, so they are matched by part. Stk is a count unit, the same as EA.
A supplier emails its November statement of account to your intake address: four rows of invoices and a payment, and an amount due of 1,752.00.What Coverbase does. No invoice is created. The message shows Stopped retrying on the Sources tab at once, with the reason under Technical detail: “The message holds a statement, not an invoice, so no invoice was created.” The model is not asked again.Why. The reading says what kind of document it read, and only an invoice or a credit note becomes an invoice. A person decides what to do with the statement.
A smudged scan of invoice HPL-661020 against PO-4500090300 (50 BX of NTR-GLV-M at 9.80, 60 BX of WIPE-KIM-280 at 6.25, 10 EA of ETH-70-4L at 31.00, all received). The reading agrees with the PO on every value, total 1,175.00. It reports a confidence of 0.55 for the quantity on line 2 and 0.6 for the total.What Coverbase does. Exception. Invoice read with confidence fails and an Invoice reading to check case opens for AP, recommending Needs a reviewer. At stake is the whole invoice, 1,175.00. The supplier sees “This invoice is being reviewed.”Why. Both fields are below 0.8. Every other check passed, but a misread that happens to agree with the PO would otherwise match. AP compares the two fields with the PDF.
The same invoice HPL-661020 by email, but the PDF’s text layer carries hidden text addressed to the model. It asks for the total to be set to 11,750.00, the PO number to PO-4500099999, and the payment terms changed to immediate payment to another account.What Coverbase does. The reading is faithful: total 1,175.00, PO-4500090300, Net 30. The invoice is Matched. Nothing the hidden text asked for happens.Why. Document text is passed as fenced, untrusted data, and the model is told never to follow instructions inside it. If it had obeyed, the 11,750.00 total would not equal the 1,175.00 of lines, Invoice total would fail, and AP would get an Invoice data incomplete case.
The corpus covers 53 scenarios across simple matches, mismatches, duplicates, complex cases and AI reading, and every one reaches the outcome an AP analyst would want.

Troubleshooting

Working exceptions

What to do with each case.

Setting up Payables

Tolerances, routing and the email intake address.

Invoices and statements

The invoice drawer, versions and duplicates.

Performance and scorecards

How first-pass match is counted.