How Receipt Matching and Automatic Coding Work
When someone submits a receipt, Agave pairs it with the card transaction that paid for it and fills in what it can. The reviewer opens an expense that's already populated, instead of a blank form next to a photo.
This guide is for admins and reviewers. Use it when an expense didn't match and you want to know why, or when a pre-filled value isn't what you expected.
This guide covers:
- What Agave reads off a receipt
- Which transactions are eligible to be matched
- How a receipt is paired with a transaction
- When Agave matches on its own, and when it asks AI
- What a match fills in on the expense
- What to check when nothing matches
For the fields themselves and how to fill them, see Coding an Expense.
How Agave reads a receipt
When a receipt image arrives, Agave pulls five header fields off it:
| Field | What it is |
|---|---|
| Total amount | The total charged on the receipt |
| Subtotal | The amount before tax |
| Tax | The total tax |
| Vendor name | The merchant name printed on the receipt |
| Date | The transaction date |
Agave leaves a field empty when it can't read it confidently. It doesn't guess. A crumpled pump receipt that only shows a total produces exactly that: a total, and four empty fields.
Matching runs on the total and the date, so a receipt missing both can't be matched automatically.
Which transactions are eligible
Before comparing anything, Agave narrows the pool. A transaction is eligible only when all four are true:
- It has posted. Pending transactions are never matched.
- It isn't archived.
- It has an amount.
- It isn't already matched. A transaction matches at most one expense, across every configuration on your team.
When a bank replaces a pending transaction with a posted one, Agave keeps only the posted record, so the same charge doesn't show up twice.
Your account can also carry an Automatic transaction cutoff date. Transactions authorized before that date are hidden from Expense Management entirely, so they never reach matching. It's usually set during onboarding so years of old card activity don't flood the Transactions page. Leave it blank to show everything.
If a transaction is missing from the Transactions page, check it in this order: has it posted, is it archived, is it attached to another expense, and is it older than your cutoff date.
How a receipt is paired with a transaction
The card's assigned user is the link
Agave connects a receipt to a transaction through the card. A card takes part in matching only when one of these is true:
- It has an Assigned User. Its charges match receipts that person submitted.
- Match Txns to Any User? is checked. Its charges match any receipt on the team.
A card that's neither never participates. Its charges sit on the Transactions page until someone links them by hand.
Both columns are on the Credit Cards page. Match Txns to Any User? is for cards nobody owns on their own, like a shared shop card. Agave runs assigned cards and shared cards as two separate passes, so you can use both:
The candidate filter
For each receipt, Agave keeps only the transactions that pass all three tests:
| Test | Rule |
|---|---|
| Amount | Matches the receipt total exactly, to the cent |
| Date | Falls within 3 days of the receipt date |
| User | The card is assigned to the person who submitted the receipt |
Cards with no assigned user pass the user test instead of failing it. That's what lets a shared card work.
Receipts that arrive by email skip the user test and match against any transaction on the team, because an emailed receipt doesn't carry a submitter.
Agave uses the date it read off the receipt. If it found no date, it falls back to the day the receipt was uploaded.
When Agave matches on its own, and when it asks AI
Agave matches in two tiers.
Tier 1: automatic
Agave narrows the candidates to transactions on the same calendar day as the receipt. If exactly one is left and it passes three more tests, Agave matches it without involving AI:
- The amount matches exactly, to the cent
- The card is assigned to the submitter (a shared card doesn't count here)
- The merchant name on the transaction is at least 80% similar to the vendor name on the receipt
That last test stops a $40 lunch from matching a $40 hardware run on the same day.
Pump receipts are the exception. A pump receipt often prints no merchant at all, so a missing vendor name tells Agave nothing. When Agave recognizes a pump receipt and found no vendor, it allows the automatic match anyway.
Tier 2: AI
Everything else goes to AI: several same-day candidates, no same-day candidate, or a single candidate that failed one of the three tests. Agave gives the AI the receipt details and the candidate list and asks it to pick one or return nothing.
The AI is told to be conservative and to weigh both kinds of mistake. A wrong match creates cleanup work. A missed obvious match creates manual work.
It expects merchant names to differ between a receipt and a bank statement, so Loves#778 and Loves Travel Stop count as the same merchant. It also allows for small amount differences from tips, tax adjustments, and rounding.
Fuel is stricter on purpose
When the receipt is a pump receipt, or either side names a gas station or truck stop, the AI can only match a candidate whose amount and date both match exactly.
Fuel repeats. The same driver fills up at the same truck stop for a similar amount every few days, so a near miss is more likely a different fill-up than the same one. Agave would rather leave a fuel receipt unmatched than attach it to the wrong fill-up.
If a fuel receipt sits unmatched and you can see the charge on the Transactions page, this rule is usually why. Link it by hand.
What a match fills in
A match does more than attach the transaction. Agave uses it to fill fields that are empty, or that your account trusts the transaction for over the receipt.
Three settings under Settings > Account decide which source wins:
| Field | Setting | Options |
|---|---|---|
| Vendor | Vendor Source | Receipt vendor or Credit card default |
| Date | Expense Date Source | Read date from receipt or Get date from transaction |
| Amount | Expense Amount Source | Read amount from receipt or Get amount from transaction |
Two rules apply to all three:
- They only apply while the expense is a draft. Once an expense has been sent for review, a later match won't overwrite coding a person has already seen.
- They only fill what's empty, where the field allows it. The card's default vendor is applied only when the expense has no vendor yet.
Agave also fills the ERP card account and ERP employee from the matched card whenever those fields are empty. There's no setting for this, and existing values are left alone.
Pump receipts keep their own date. Even with Get date from transaction selected, an automatic match won't overwrite the date on a pump receipt. Only a person picking the transaction by hand replaces it.
Hovering the information icon next to a pre-filled field shows where its value came from:
Authorized date versus posted date
Matching compares the receipt date to the transaction's authorized date, which is when the card was actually used. Once matched, the expense carries the posted date, which is when the charge settled.
The two are often a day or two apart. That's part of why the candidate filter allows a 3 day window.
How coding is filled in after a match
A match fills in header values. It doesn't choose your cost coding.
That comes from three places, and none of them learn from past corrections:
- Coding profiles, which carry saved default values you can apply to an expense
- A user's default coding profile, applied automatically when that person submits a receipt
- The card's default vendor, applied on match when Vendor Source is set to Credit card default
See How Coding Profiles and Policies Work.
When an expense doesn't match
An expense with no match gets a history entry reading No matching transactions found and stays in draft for someone to handle. Linking the transaction by hand is always available, and it's the normal fix. Work back through the filters to find out why:
The charge hasn't posted yet.
- Wait for it to post. Pending transactions are never matched.
The amount is off by a few cents or a tip.
- Link the transaction by hand. Automatic matching needs the exact amount.
The dates are more than 3 days apart.
- Check that the receipt date was read correctly, then fix it or link by hand.
The card has no Assigned User.
- On the Credit Cards page, set an Assigned User or check Match Txns to Any User?.
The card is assigned to someone else.
- The submitter and the cardholder have to be the same person, unless the card is shared.
The transaction is attached to another expense.
- Usually a duplicate receipt. Find the other expense before unlinking anything.
The charge is older than your cutoff date.
- It won't appear in Expense Management at all.
It's a fuel receipt with a near miss.
- Fuel needs an exact amount and date. Link it by hand.
Related guides
- Coding an Expense: every field on an expense and where its value comes from
- How Coding Profiles and Policies Work: saved coding defaults, and who can reach them
- Expenses Without a Receipt: card charges no receipt is ever going to match
- Uploading Transactions from CSV: bringing in charges from cards with no live feed
- Account Settings: the source settings that decide vendor, date, and amount