> ## Documentation Index
> Fetch the complete documentation index at: https://docs.coverbase.com/llms.txt
> Use this file to discover all available pages before exploring further.

# How matching works

> Exactly how Payables checks a supplier invoice against its PO and goods receipts: how the supplier and PO are found, how invoice lines are mapped to PO lines, every check and tolerance, what each exception reason means and who it goes to, how AI reads emailed and PDF invoices and how that reading is checked, duplicates, credit notes, corrected invoices, when matching runs again, and worked examples from the test corpus.

For AI agents: a documentation index is available at [https://docs.coverbase.com/llms.txt](https://docs.coverbase.com/llms.txt). This page is also available in markdown by appending .md to the URL.

> [!NOTE]
>
> This guide is part of the [User Guides](https://docs.coverbase.com/user-guides/overview.md) collection. It explains what happens to an invoice before anyone looks at it. For what to do with the result, see [Working exceptions](https://docs.coverbase.com/user-guides/payables-exceptions.md). For the tolerances themselves, see [Setting up Payables](https://docs.coverbase.com/user-guides/payables-setup.md#matching).

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](#duplicates-credit-notes-and-corrected-invoices) 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](#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:

| Order | Method | Shown as | Verified |
| - | - | - | - |
| 1 | A reviewer mapped this line on this invoice | **mapped by reviewer** | Yes |
| 2 | The supplier quoted the PO line number, and the part numbers do not contradict it | **matched by line** | Yes |
| 3 | The manufacturer part number matches exactly one PO line, ignoring punctuation and case | **matched by part** | Yes |
| 4 | A reviewer accepted the same description from this supplier on an earlier invoice | **mapped by reviewer** | Yes |
| 5 | A PO line's part number (4 characters or more) appears inside the invoice line's description, on exactly one PO line | **Matched by description, 100% similar** | No |
| 6 | The supplier quoted a PO line number but the part numbers differ | **matched by line** | No. The **Part number** check names the difference. |
| 7 | The descriptions share enough words | **Matched by description, N% similar** | No |
| 8 | Only one PO line is left, its price is within tolerance and its quantity is not exceeded | **Matched by description** | No |
| | Nothing fits | **No PO line found** | Fails |

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](https://mintcdn.com/coverbase/05b6jNSp_zOf8kTZ/images/user-guides/payables/internal/05-case-32-line-review-ai-assist.png?fit=max\&auto=format\&n=05b6jNSp_zOf8kTZ\&q=85\&s=4de29251bb2a40775809c625b7615147)

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](https://docs.coverbase.com/user-guides/payables-exceptions.md#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.

| Check | Passes when | On failure |
| - | - | - |
| **PO number** | The invoice's PO is on record and open. | **PO not found**, **No PO number on the invoice** or **PO is closed** |
| **Supplier** | The PO was issued to the supplier who sent the invoice. | **Billed against the wrong PO** |
| **Currency** | The invoice and PO are in the same currency. There is no conversion, and prices in different currencies are never compared. | **Currency differs from PO** |
| **Billed to the PO's entity** | Where both name one, the legal entity the invoice is addressed to is the entity that issued the PO, ignoring case, punctuation and suffixes. | **Invoice data incomplete** |
| **Invoice data complete** | The invoice has a number, at least one line, a quantity above zero and a unit price on every line, a currency the invoice itself states, and an invoice date no more than a day after it arrived. The case lists what is missing, such as "Missing: quantities." | **Invoice data incomplete** |
| **Invoice read with confidence** | For an invoice read by AI, no field that matching uses was read with low confidence. | **Invoice reading to check** |
| **Not a duplicate** | No earlier invoice from the supplier looks like the same billing. | **Possible duplicate** |
| **Lines mapped** | Every invoice line maps to a PO line. A line matched by description only is a warning. | **Part differs from PO** |
| **Part number** | Where both carry one, the invoice line's part number equals the PO line's. | **Part differs from PO** |
| **Unit price** | The invoice unit price is within the percentage of the PO price, or the difference across the whole line (difference times the quantity billed) is no more than the amount. | **Price differs from PO** |
| **Quote price** | Where the PO line carries a quoted price, the invoice price is within the same tolerance of it. A difference is a warning only. | Never opens a case |
| **Line total** | Where the line states a total, it equals quantity times unit price, to the cent. | **Invoice data incomplete** |
| **Quantity ordered** | Everything billed on the PO line so far, this invoice included, is no more than the quantity ordered plus the quantity tolerance. With partial invoicing off, the invoice bills the full quantity. It also fails when the invoice bills in a unit that cannot be converted to the PO's. | **Billed more than ordered** |
| **Quantity received** | 3-way only. Everything billed on the PO line so far is no more than the quantity received plus the quantity tolerance. | **Billed more than received** when part of the line was received, **No goods receipt** when none was |
| **Goods receipt** | 3-way only. The PO has at least one goods receipt. | **No goods receipt** |
| **Freight** | Invoice freight, including freight or surcharge lines the PO does not carry, exceeds the PO's freight allowance (zero when the PO has none) by no more than the freight tolerance. | **Tax or freight differs** |
| **Tax** | Where the PO carries a tax rate, invoice tax is within the tax tolerance of the line total times that rate. Without a rate, the check does not apply. | **Tax or freight differs** |
| **Invoice total** | The invoice total is within the total tolerance of its lines plus tax plus freight. | **Invoice data incomplete** |

**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:

| Result | When | Invoice shows |
| - | - | - |
| **Matches the PO** | Every check passed and every line is verified. No case opens. With **Accept clean matches without review** on, the invoice is accepted and logged as a policy decision. | **Matched** |
| **Likely a match. Confirm the suggested lines.** | Every check passed, but a line was matched by description or by Coverbase AI. Opens a **Line needs review** case. | **In review** |
| **Ask the supplier for a corrected invoice** | Any reason the supplier fixes by reissuing: wrong PO, PO not found, billed more than ordered, part, currency, tax or freight, incomplete data (including the wrong billing entity). | **Exception** |
| **Ask operations to record the receipt** | The only problems are a missing or short goods receipt. | **Waiting for receipt** |
| **Needs a reviewer** | Anything else, such as a price difference, a closed PO, no PO number, a possible duplicate, or a second invoice line on one PO line when your rules allow one. An **Invoice reading to check** always needs a reviewer first, so nobody asks the supplier to fix a value that may only have been misread. | **Exception** |
| **Wait for the PO** | The PO named on the invoice has not arrived, and the grace period has not run out. No case. | **Waiting for PO** |

**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

| Reason | What it means | Default owner | What the supplier sees |
| - | - | - | - |
| **No goods receipt** | Nothing billed has been recorded as received, or the PO has no goods receipt. | Operations | "We have not yet recorded delivery of these goods. No action is needed from you." |
| **Billed more than received** | Part of the line was received, and the invoices bill more than that part. | Operations | "We have not yet recorded delivery of these goods. No action is needed from you." |
| **Price differs from PO** | A unit price is outside your tolerance. | Procurement | "The unit price on this invoice differs from the price on the purchase order." |
| **Billed more than ordered** | The invoices bill more than was ordered on a line, or bill in a unit that cannot be converted to the PO's. | Supplier | "This invoice bills more than the purchase order allows for at least one line." |
| **Billed against the wrong PO** | The PO belongs to another supplier. | Supplier | "This invoice references a purchase order issued to a different supplier." |
| **PO not found** | The invoice cites a PO number that did not arrive within the grace period. | AP | "We could not find the purchase order this invoice references." |
| **No PO number on the invoice** | The invoice cites no PO at all. | AP | "The invoice is missing information needed to process it." |
| **PO is closed** | The invoice bills a PO your procurement system closed. | AP | "This invoice is being reviewed." |
| **Part differs from PO** | A part number differs, or an invoice line matches no PO line. | Supplier | "At least one invoice line does not match a part on the purchase order." |
| **Currency differs from PO** | The invoice is in another currency. | Supplier | "This invoice is in a different currency from the purchase order." |
| **Tax or freight differs** | Tax is off the PO's rate, or freight exceeds the allowance. | Supplier | "Tax or freight on this invoice does not match what the purchase order allows." |
| **Invoice data incomplete** | A required field is missing, a line or the invoice does not add up, or the invoice is addressed to a different legal entity from the PO. | AP | "This invoice is missing details or its totals do not add up." |
| **Invoice reading to check** | AI read a field that matching uses with low confidence. | AP | "This invoice is being reviewed." |
| **Line needs review** | A line was matched by description or by Coverbase AI, or a PO line is billed on two invoice lines. | AP | "We are confirming which purchase order lines this invoice bills. No action is needed from you." |
| **Possible duplicate** | Your ledger booked the same invoice twice, or an earlier invoice looks like the same billing. | AP | "Invoice ... was received twice. Only one copy will be processed." for a double booking, else "This invoice appears to duplicate one already received." |

Owners are the defaults from your [routing rules](https://docs.coverbase.com/user-guides/payables-setup.md#who-owns-each-exception). 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](https://docs.coverbase.com/user-guides/payables-invoices-and-statements.md#statements) and [Disputes of a metric](https://docs.coverbase.com/user-guides/payables-performance.md#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](https://mintcdn.com/coverbase/05b6jNSp_zOf8kTZ/images/user-guides/payables/internal/04-case-31-missing-receipt-operations.png?fit=max\&auto=format\&n=05b6jNSp_zOf8kTZ\&q=85\&s=7b8f2afe47a88d39aa85889a9855eb74)

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:

| What arrived | What happens |
| - | - |
| A copy by email, EDI, API or portal, then the ledger booked the same invoice | The booked copy is the invoice. The other is marked **Duplicate** and linked to it. No case. |
| The ledger booked the invoice, then a copy arrived by email or another channel | The new copy is marked **Duplicate** and linked. No case. |
| Two copies, neither booked by the ledger | The later one is marked **Duplicate**. No case. |
| The ledger booked the same invoice twice | The second is marked **Duplicate** and a **Possible duplicate** case opens for AP, because that is a real double billing. |

![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](https://mintcdn.com/coverbase/05b6jNSp_zOf8kTZ/images/user-guides/payables/internal/06-case-33-duplicate.png?fit=max\&auto=format\&n=05b6jNSp_zOf8kTZ\&q=85\&s=061312c076a3f8a73ad98a45012e7730)

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](https://mintcdn.com/coverbase/05b6jNSp_zOf8kTZ/images/user-guides/payables/internal/11-invoice-drawer-duplicate.png?fit=max\&auto=format\&n=05b6jNSp_zOf8kTZ\&q=85\&s=cc0d3ccaf14930c06de6af308ca09b2e)

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:

| What arrived | Check detail |
| - | - |
| The same invoice number as an earlier invoice from the supplier, for a different amount | "An invoice with this number was already received for a different amount." |
| The same amount and date as an earlier invoice from the supplier, under a different number | "Another invoice from this supplier has the same amount and date under a different number." |

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

| Trigger | What reruns |
| - | - |
| A PO arrives that a waiting invoice names | That invoice. |
| A PO is revised | Every unsettled invoice on it. |
| A goods receipt is recorded | Every unsettled invoice on its PO. |
| A corrected invoice arrives | The new version. |
| You click **Run the checks again** on a case | That invoice. |
| Coverbase AI explains a mismatch | That invoice, with the suggestion folded in. |

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

> [accordion] Exact 2-way match for a service PO
>
> The organization runs with **Require a goods receipt** off, because a service has no goods receipt.
>
> | | PO PO-4500031120 | Invoice TFS-88120 |
> | - | - | - |
> | Line | Janitorial service, Building 2, November 2026 | Janitorial services Bldg 2 Nov 2026, quotes PO line 1 |
> | Quantity | 1 MO | 1 MO |
> | Unit price | 4,850.00 | 4,850.00 |
> | Total | | 4,850.00 |
>
> **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.

> [accordion] Exact 3-way match
>
> | PO PO-4500012345 line | Ordered | Received (GR-70001) | Invoice NW-20411 |
> | - | - | - | - |
> | 1, HCS-M10-40-ZP hex cap screw | 500 EA at 0.42 | 500 | 500 at 0.42 = 210.00 |
> | 2, FW-M10-ZP flat washer | 500 EA at 0.06 | 500 | 500 at 0.06 = 30.00 |
> | 3, NLN-M10-ZP lock nut | 500 EA at 0.11 | 500 | 500 at 0.11 = 55.00 |
>
> 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

> [accordion] Unit price above the PO price
>
> | | PO PO-4500012345 | Receipt GR-70001 | Invoice NW-20480 |
> | - | - | - | - |
> | HCS-M10-40-ZP hex cap screw | 500 EA at 0.42 | 500 | 500 at 0.47 = 235.00 |
>
> **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.

> [accordion] Billed more than received
>
> | | PO PO-4500052301 | Receipt GR-70140 | Invoice CR-33102 |
> | - | - | - | - |
> | FBH-2D-UNI full body harness | 100 EA at 64.00 | 60 | 100 at 64.00 = 6,400.00 |
>
> **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**.

> [accordion] PO number written three ways
>
> One PO, PO-4500012345, fully received, billed by three invoices of one line each.
>
> | Invoice | PO number as written | Bills |
> | - | - | - |
> | NW-20501 | `PO# 4500 012345` | Line 1, 500 at 0.42 |
> | NW-20502 | `0004500012345` | Line 2, 500 at 0.06 |
> | NW-20503 | `P.O. No. 4500-012345` | Line 3, 500 at 0.11 |
>
> **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`.

> [accordion] Billed by the box, ordered by the each
>
> | | PO PO-4500052480 | Receipt GR-70340 | Invoice CR-33240 |
> | - | - | - | - |
> | SG-CLR-AF safety glasses | 240 EA at 2.10 | 240 | 20 `BX12` at 25.20 = 504.00 |
>
> **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.

> [accordion] Invoice billed to the wrong legal entity
>
> | | PO PO-4500061950 | Receipt GR-70240 | Invoice SH-90211 |
> | - | - | - | - |
> | PU-G-0750 hydraulic power unit | 1 EA at 6,890.00 | 1 | 1 at 6,890.00 |
> | Legal entity | The buyer's US company (Inc.) | | The buyer's Canadian company (Ltd.) |
>
> **What Coverbase does.** **Exception**. **Billed to the PO's entity** fails, showing the entity expected and the entity invoiced. An **Invoice data incomplete** case opens for AP, recommending **Ask the supplier for a corrected invoice**.
>
> **Why.** The price, quantity and receipt all agree, but the Canadian company cannot book an invoice for a PO the US company issued. The supplier reissues it to the entity on the PO.

### Duplicates and credits

> [accordion] Same invoice number written differently
>
> 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.
>
> | | First copy | Second copy |
> | - | - | - |
> | Channel | Booked by your ledger | Sent later through the intake API |
> | Invoice number | `HPL-0660413` | `HPL660413` |
> | Total | 2,620.00 | 2,620.00 |
>
> **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.

> [accordion] Credit note reversing an invoice
>
> PO PO-4500062010 orders 12 EA of PG-25-5000 pressure gauges at 46.00, all received. The gauges were returned.
>
> | | Invoice SH-90300 | Credit note SH-90300 |
> | - | - | - |
> | Quantity | 12 at 46.00 | -12 at 46.00 |
> | Total | 552.00 | -552.00 |
>
> **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

> [accordion] One invoice across two POs
>
> | Invoice BL-552300 line | Cites | PO line | Received |
> | - | - | - | - |
> | 1, EMT-34-10 conduit, 200 at 7.90 = 1,580.00 | PO-4500044600 | 200 EA at 7.90 | 200 |
> | 2, QO120 breaker, 60 at 11.40 = 684.00 | PO-4500044611 | 60 EA at 11.40 | 60 |
>
> 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.

> [accordion] Invoice arrives before the PO and the receipt
>
> 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.
>
> | When | What arrives | Invoice shows |
> | - | - | - |
> | Day 1 | Your ledger books the invoice | **Waiting for PO**, no case |
> | Day 2 | The PO arrives: 3 EA at 742.00 EUR | **Waiting for receipt**, **No goods receipt** case for Operations |
> | Day 3 | Receipt GR-71000 for 3 | **Matched**, case resolved as **Receipt recorded** |
>
> **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

> [accordion] German invoice with European number format
>
> PO 4500100510, in EUR, fully received.
>
> | PO line | Ordered | Invoice 2026-1240 as printed |
> | - | - | - |
> | GM-71-40-2 gear motor | 2 EA at 1186.50 | 2 Stk at `1.186,50` = `2.373,00` |
> | KUP-28-ROT jaw coupling | 4 EA at 48.75 | 4 Stk at `48,75` = `195,00` |
>
> 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`.

> [accordion] Statement sent instead of an invoice
>
> 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.

> [accordion] Low confidence reading that agrees with the PO
>
> 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.

> [accordion] Instructions hidden in the invoice text
>
> 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

| Problem | What to check |
| - | - |
| A line shows **Matched by description, 100% similar** but the invoice is not **Matched** | Description matches always need a person. Confirm the line and accept, or get the supplier to quote the PO line number or part number. |
| An invoice showed **Waiting for PO**, then opened **PO not found** | No PO with that number arrived within the grace period (72 hours by default). Compare the invoice's PO number with your procurement system, ignoring labels, punctuation and padding zeros. If the PO arrives later, the invoice links to it and the checks run again. |
| A price within pennies opened a case | The amount tolerance applies to the difference across the whole line, not per unit. A few cents on a line of thousands of units is more than 0.50. Check both tolerances on the rules page. |
| An invoice for a partial delivery opened **Billed more than received** | 3-way matching compares everything billed with everything received. The case closes on its own when the rest is received. |
| A second invoice on the same PO opened **Billed more than ordered** | Quantities are cumulative across invoices on the PO. Check what earlier invoices billed, shown as "billed earlier" under the line. |
| **Billed more than ordered** on a line whose quantity looks right | The invoice bills in a unit such as `CS` or `BX` with no count, which cannot be converted to the PO's unit. Ask the supplier to bill in the PO's unit, or to use a code that states the count, such as `BX12`. |
| An emailed invoice opened **Invoice data incomplete** with "Missing: currency." | The document showed no currency code, so the PO's currency was used and flagged. Check it against the PDF. |
| An emailed invoice opened **Invoice reading to check** | The AI was unsure of a field matching uses. Compare the flagged fields under **Source record** with the PDF. |
| An emailed message created no invoice | It was a statement, a remittance, a quote or a message with no invoice, or its invoice number is not printed in it. It shows **Stopped retrying** on the **Sources** tab with the reason. |
| An emailed invoice has the wrong supplier | The AI read no supplier name, so the sender's address was used. Set the supplier's ID on the vendor, or ask the supplier to put their legal name on the invoice. |
| An invoice in euros against a dollar PO | Coverbase does not convert, and the lines table says "No exchange rate is applied, so prices in different currencies are not compared." Ask the supplier to reissue in the PO currency, or amend the PO. |

## Related

> [card] [Working exceptions](https://docs.coverbase.com/user-guides/payables-exceptions.md)
>
> What to do with each case.

> [card] [Setting up Payables](https://docs.coverbase.com/user-guides/payables-setup.md)
>
> Tolerances, routing and the email intake address.

> [card] [Invoices and statements](https://docs.coverbase.com/user-guides/payables-invoices-and-statements.md)
>
> The invoice drawer, versions and duplicates.

> [card] [Performance and scorecards](https://docs.coverbase.com/user-guides/payables-performance.md)
>
> How first-pass match is counted.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.