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

# Three-way match

> How Seloria checks a supplier invoice against the purchase order and the goods receipt before anyone approves it

Before an invoice can be approved, Seloria compares it against the two records that should back it up: the **purchase order** (what you agreed to buy, and at what price) and the **goods receipt** (what actually arrived). That comparison is the three-way match, and it runs automatically the moment an invoice is submitted.

## The milestone decides how it's checked

Not every charge can be matched the same way — an advance payment has no delivery behind it. So the check is chosen by the **type of milestone** being billed, not by the order:

| Milestone type                      | How it's checked                                                                                                    |
| ----------------------------------- | ------------------------------------------------------------------------------------------------------------------- |
| **Delivery** / **Partial delivery** | Full three-way, line by line: unit price against the order, quantity against what was accepted on the goods receipt |
| **Advance**                         | Two-way: only that the milestone's cap isn't exceeded. No receipt, no price check                                   |
| **Service period**                  | Two-way, and the period must be confirmed                                                                           |
| **Retention**                       | Held: billable only once the order has closed or the milestone has been released                                    |

One rule applies to every type: the total billed against a milestone, across all its invoices, cannot exceed that milestone's share of the order.

## The three outcomes

* **Matched** — every check passed.
* **Partial** — the only thing outstanding is a goods receipt. The invoice isn't wrong; it just can't be fully verified yet. Record the receipt and re-run the match.
* **Exception** — at least one check failed. The match panel names the line and shows expected versus actual, with the difference.

## What Seloria flags

| Signal                     | Meaning                                                                                                                 |
| -------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
| **Price variance**         | The unit price billed is outside tolerance compared with the order                                                      |
| **Over receipt**           | You're being billed for more than was received and accepted                                                             |
| **Over milestone**         | The invoices against this milestone add up to more than its share of the order                                          |
| **Period not confirmed**   | A service period is being billed before it was confirmed                                                                |
| **Retention not released** | Retention is being billed before the order closed or the milestone was released                                         |
| **Non-PO charge**          | A line on the invoice has no matching line on the order — it needs a human to look at it                                |
| **No receipt yet**         | A delivery line has no goods receipt against it. This is the one signal that produces *partial* rather than *exception* |

## Tolerances

Three settings control how strict the match is:

| Setting             | Default | What it does                                                      |
| ------------------- | ------- | ----------------------------------------------------------------- |
| Price tolerance     | **2%**  | How far a unit price may drift from the order before it's flagged |
| Block over-receipt  | **On**  | Whether billing more than was received counts as an exception     |
| Milestone tolerance | **0%**  | How far the accumulated total may exceed a milestone's share      |

<Note>
  These tolerances are stored per organization and are not yet editable from Settings. If you need different values for your organization, contact support.
</Note>

## Resolving an exception

You have three ways out, and which one is right depends on what the flag is telling you:

1. **Fix the record.** If the goods receipt hadn't been entered yet, record it and use **Re-run match**. Most partials and over-receipt flags disappear this way.
2. **Correct the invoice.** If the supplier billed the wrong quantity or the lines were mis-entered, edit it and re-run the match.
3. **Approve with an override.** If the difference is legitimate — an agreed price change, a freight charge that was never on the order — the approver can approve anyway, but must write down why.

That override is the point of the whole mechanism: nothing is silently waved through. The reason, the approver's name and the timestamp are written to the audit history, so the decision can be explained months later.

## What happens after approval

Approval doesn't move money. It marks the invoice as cleared for payment with its full record attached — order, receipt, match result, and any override reason. When payment is made outside Seloria, the approval authority marks the invoice as **paid**.
