How does the invoice data matching work?
Reduce the need for manual mapping by following this guide.
As explained in the article How to manage invoices, Galley's invoice manager allows customers to ingest invoices from different sources.
To guarantee data consistency between the original invoice and the one inside Galley, every newly ingested invoice goes through a matching process, regardless of its source.
Once the invoice is ingested, the matching process has the following logic:

To minimize manual work and ensure a smooth experience, customers need to set up the following required information before uploading and matching their invoices:
- Location
- Vendor
- Invoice Items
Location
The first step is to navigate to the Locations page and ensure all Locations have a unique External ID filled out. Galley will use this ID to match the Location on the original invoice.

Ensuring all locations receiving invoices have a unique External ID filled out in the External ID field is important. This information can also be used to integrate Locations from external systems by adding the matching External ID to those systems.
Vendor
Once the Location is matched, Galley will use the Vendor ID on the original invoice - if it has one - to search for the corresponding vendor by comparing it to Galley's Vendor External ID.

If there is no match between Vendor External IDs, the Invoice Manager attempts to match the original invoice's Vendor Name to any Galley Vendor Name.
The Vendor Name will only match automatically if the system encounters a 100% match. Otherwise, Galley will generate suggestions based on the closest match, and the user must match manually. Make sure your Vendor Names inside Galley match the name on Invoices. Once a vendor's name on an invoice has been manually matched to a Galley vendor, Galley will save that match so it will automatically occur for future invoices.
To make the vendor matching process more resilient, users should navigate to the Vendor's page and ensure the Vendor's External ID is set.
Invoice Items
After the Location and Vendor are matched, Invoice Manager attempts to match the invoice items to vendor items in Galley. This is how it works:
Summary
-
We try SKU first (it’s the most precise identifier).
-
We then confirm the Cost Unit (e.g., “case”, “lb”, “each”) to avoid mismatching package sizes.
-
If SKU isn’t present or isn’t unique, we use the Name (and any Aliases you’ve set up).
-
When you manually select a match, Galley remembers that decision for next time.
Why we prioritize SKU ➜ Unit ➜ Name (and how Aliases help)
-
SKU acts like a product “fingerprint.” When present and correct, it minimizes errors and manual work.
-
Cost Unit ensures we match the right package/size (a “case” is not the same as a “lb” or “each”).
-
Name is a helpful fallback, but names can vary between invoices and systems. Aliases let you store common alternative names (“Cherry Toms” → “Cherry Tomatoes”), improving Name-based matching.
Examples
Scenario 1 — SKU matches a single Vendor Item and Cost Unit matches → Matching found
Example: Invoice: “Tomatoes — SKU 12345 — 10 lb”; Vendor Item: same SKU + 10 lb.
✅ Auto-match.
Scenario 2 — SKU matches a single Vendor Item but Cost Unit does not match → Manual matching
Example: Invoice: “Tomatoes — SKU 12345 — 1 case”; Vendor Item: “Tomatoes — SKU 12345 — 10 lb.”
⚠️ Why manual? The SKU points to the product family, but the package size is different. Selecting manually prevents wrong costs/quantities (e.g., pricing per case vs per pound).
Scenario 3 — Previous manual match exists for SKU + Cost Unit → Use it
Example: You previously matched SKU 12345 (5 lb).
✅ Galley remembers and applies the same match automatically.
🧠 Reasoning: We trust your past decision for the same SKU+Unit combination to reduce repeat work.
Scenario 4 — SKU matches multiple Vendor Items; Cost Unit narrows to one → Matching found
Example: SKU 5555 exists for “case” and for “lb”; invoice says “lb.”
✅ Auto-match to the “lb” item.
Scenario 5 — SKU matches multiple Vendor Items; Cost Unit and Name/Alias don’t resolve → Manual matching
Example: Several items share the same SKU; neither unit nor name/alias uniquely identifies one item.
⚠️ Why manual? There’s no single best choice. If we guessed, we might attach the invoice to the wrong item, corrupting costs and reporting. Your selection confirms the correct product.
Scenario 6.1 — SKU matches multiple Vendor Items; Cost Unit doesn’t help; Name matches exactly one → Matching found
Example: Several items share SKU 9999 with the same unit, but only one has name “Roma Tomatoes.”
✅ Auto-match.
Scenario 6.2 — SKU matches multiple Vendor Items; Cost Unit doesn’t help; Name doesn’t match but Alias found → Matching found
Example: Invoice name “Cherry Toms” matches an Alias for “Cherry Tomatoes.”
✅ Auto-match via Alias.
Scenario 7 — No Vendor Item matches the SKU → Manual matching with a system suggestion by Name + Cost Unit
Example: Invoice: “Diced Tomatoes — SKU 22222 — 10 lb”; no Vendor Item has SKU 22222. Galley suggests “Diced Tomatoes — 10 lb” by name/unit.
⚠️ Why manual? The invoice’s SKU is unknown to your catalog. We suggest a likely item, but you confirm to avoid creating wrong links or trusting a bad vendor SKU.
Scenario 8 — No SKU on invoice; Name matches a single Vendor Item and Cost Unit matches → Matching found
Example: “Cucumbers — 1 case” matches exactly one Vendor Item with “1 case.”
✅ Auto-match.
Scenario 9 — No SKU; Name matches a single Vendor Item but Cost Unit doesn’t match → Manual matching
Example: Invoice: “Cucumbers — 1 case”; Vendor Item: “Cucumbers — 10 lb.”
⚠️ Why manual? The Name identifies the product family, but the size/pack differs. Your selection prevents unit-based pricing errors.
Scenario 10 — No SKU; previous manual match exists for Name + Cost Unit → Use it
Example: You previously matched “Dill Pickles — 2 gal.”
✅ Galley remembers and applies that automatically.
🧠 Reasoning: We reuse your verified choice for that exact Name+Unit to save time.
Scenario 11 — No SKU; Name matches multiple Vendor Items; Cost Unit narrows to one → Matching found
Example: Two “Parmesan Cheese” items (1 lb and 5 lb); invoice says “5 lb.”
✅ Auto-match.
Scenario 12 — No SKU; Name matches multiple Vendor Items; Cost Unit doesn’t narrow → Manual matching
Example: Multiple “Parmesan Cheese” items share the same unit; nothing else distinguishes them.
⚠️ Why manual? Name and Unit aren’t enough to pick safely. Human confirmation avoids linking to the wrong cost or spec.
Scenario 13 — No SKU; previous manual match exists for Name + Cost Unit (among multiples) → Use it
Example: You previously resolved a tie for “Parmesan Cheese — 5 lb.”
✅ Galley remembers and applies your choice.
🧠 Reasoning: Your past selection is the most reliable signal when metadata alone can’t decide.
Scenario 14 — No SKU; Name doesn’t match any Vendor Item; Alias exists → Matching found
Example: Invoice: “Basil Pesto”; Vendor Item: “Pesto Genovese” with Alias “Basil Pesto.”
✅ Auto-match via Alias.
Scenario 15 — No SKU; Name doesn’t match and no Alias → Manual matching
Example: Unrecognized item name and no Alias set.
⚠️ Why manual? There’s no reliable reference to map automatically. Your selection ensures the correct item; adding an Alias will speed up future matches.
Similarly to vendors, if a vendor item is manually matched to an invoice item, Galley will save the match so it will automatically occur for future invoices.