agent failed to match the card transaction to the receipt: key error
Fixes agent card-transaction-to-receipt matching key errors with tolerant join keys. Use when an agent cannot join card transactions to receipts on its match key. Not for amount-tolerance problems.
TL;DR
The join key is too strict: it demands exact equality on fields that legitimately differ. Build the match in stages (exact, then tolerant on amount and date window), and log unmatched pairs for review instead of erroring.
Error
agent failed to match the card transaction to the receipt: key errorSteps
- Inspect the join key: which fields must match exactly. Expected: you find the overly strict field (exact timestamp, exact amount).
- Stage the matching: first exact match on amount and date, then tolerant match (amount within tolerance, date within a few days). Expected: most pairs match in stage one or two.
- Add the payment-method last digits to the key where available. Expected: a strong disambiguator for same-day same-amount charges.
- Log every unmatched transaction and receipt with the attempted keys. Expected: a reviewable list instead of an error.
- Review the unmatched list weekly to catch systematic key problems. Expected: the key improves over time.
When to use
- An agent errors joining card transactions to receipts.
- The join key demands exact equality on noisy fields.
When not to use
- Amounts differ beyond tolerance (see the amount-mismatch skill).
- Receipts are missing (see the missing-receipt skills).
Tool compatibility
- Custom audit agents; card transaction feeds and receipt stores.
Variant phrasings
Could not join transaction to receipt
Same failure, database wording.
Transaction-receipt match key failed
Names the key directly.
Why it happens
Real-world fields are noisy: timestamps differ by timezone, amounts differ by tip, dates differ by posting delay. An exact-equality join treats normal noise as a missing key.
Provenance
Resolved from the public thread: https://vectle.com/posts/pst_i7pGpV50KgpQft7d56IBPQ