Match Payer Names to Customers With Claude

Can Claude match payer names to customers?
In bank_lines.csv, 50 payments have a payer name and an amount and no reference. We gave Claude four rules for that, and its script agreed with our key on 46 of 50 lines.
What files does it need?
| File | What it holds |
|---|---|
bank_lines.csv (50 lines) | Payer and amount. No reference on any line |
customers.csv (20 customers) | The legal name. Five pairs of customers share most of their name, such as Alder Grove Dental and Alder Grove Dental Supply |
aliases.csv (8 names) | Payer names already confirmed for a customer |
open_invoices.csv (60 invoices) | Three per customer, each with its own amount |
What plan does Claude give first?
I work in accounts receivable. Some bank lines arrive with no reference, only the payer name and the amount. I need to know which customer paid and which open invoice it pays. I have four files: - bank_lines.csv: payments from the bank (line_id, date, amount, payer) - customers.csv: our customers (customer_id, legal_name) - aliases.csv: payer names we have already confirmed for a customer (customer_id, alias) - open_invoices.csv: invoices still unpaid (invoice_no, customer_id, customer, invoice_date, open_amount, currency) My rules: 1. Compare the payer name with the customer's legal name. Ignore capital letters, punctuation and legal endings such as Inc, LLC, Ltd, Co, Company and a leading THE. 2. A payer name that is listed for a customer in aliases.csv counts as that customer. 3. A name match is not enough on its own. A line is matched only when the amount also equals the open amount of one invoice of that customer. 4. If you are not sure, the line goes to a person. Do not write code yet. Break the job into numbered steps. For each step say what it checks, and what the tool does with a line it cannot decide. Then list anything in my rules that is unclear.
Claude answered with six steps: check the files, clean the names, find the customer, check the amount against that customer's invoices, stop one invoice being claimed twice, and write the results.
It read the 50 lines by hand and predicted 35 matched and 15 for a person, with 4 of those 15 depending on its first question. That question was about the word list in rule 1: Limited, Corp and Corporation are not on it.
Three payers end in Limited or Corporation, and a fourth fails because its customer's own name ends in Corp. Two of its other questions: if a name fits one customer but the amount belongs to a similar name, should the line go to a person with a hint?
And if no name fits but the amount equals one invoice, should the invoice be suggested? Claude chose a person and a hint in the reason text. Prompt 2 told Claude to use its plan, and we did not answer the word list question, so it used only the endings we listed.
How many bank lines did Claude match?
Good. Use that plan. Write one Python script, standard library only, that reads the four files and writes matches.csv with these columns: line_id, status, customer_id, invoice_no, reason. - status is one of: matched, needs_review - customer_id and invoice_no are empty when the status is needs_review - reason: one short sentence a collector can read Never change my input files. Run it, then show me the count of lines per status and every line that is needs_review.
Claude Sonnet 5.5 (claude-sonnet-5-5) ran both prompts as two turns on 5 Nov 2026. The key is what we decided each line should get, written from the four rules before the run.
The script is 171 lines of standard library Python. It matched 35 lines and sent 15 to a person. Against our key 46 of 50 were right, and no line was applied to the wrong customer or invoice. A second session with the same prompts gave the same 35 and 15 on these 50 lines.
| Line | Payer | Amount | Script result | Note |
|---|---|---|---|---|
| B015 | ALDER GROVE DENTAL | 483.99 | matched C01 | The name fits one customer exactly and is the start of a second customer's name. The amount is an invoice of the first |
| B028 | TERN HARBOR FREIGHT | 7084.57 | matched C03 | The name fits Tern Harbor Freight Co exactly, and 7,084.57 is its open invoice INV-31045 |
| B004 | MARLOW POINT CABINETS | 3306.35 | needs review | The name fits Marlow Point Cabinets Inc, but 3,306.35 is an invoice of Marlow Point Cabinetry LLC |
| B030 | MARLOW POINT CABINETS INC | 5454.38 | needs review | Exact legal name, but no invoice of that customer has this amount |
| B010 | BRANNOCK OPTICAL LIMITED | 4435.23 | needs review | The ending is LIMITED and the customer says Ltd. Our key says match |
| B035 | IVYBRIDGE COLD STORAGE CORPORATION | 836.08 | needs review | The ending is CORPORATION and the customer says Corp. Our key says match |
| B009 | ACH CREDIT 5521 | 8786.82 | needs review | No name. The amount equals one open invoice, and the script still sent it to a person |
| B002 | QUARREL HILL HARDWARE | 5990.68 | matched C14 | The ending is dropped |
Under rule 3 a line is matched only when the amount also equals the open amount of one invoice of that customer.
It stopped the three lookalikes whose amount belonged to the sibling customer and sent them to a person. The other two, B015 and B028, had a name that was exact for one customer and an amount that fit it, so the script matched them.
The four misses are B010, B031, B034 and B035. We wrote "legal endings such as Inc, LLC, Ltd, Co, Company". Claude read that as the full list, in both sessions.
How is the answer key built?
We built the lines in groups: 20 with a different legal ending, 15 with the exact name, 5 with an alias, 5 lookalikes and 5 generic payers.
The key says match or review for each line. We wrote the check as a script that reads the output against the key. The names, aliases and amounts are invented, and the key is our own reading of the four rules.
What changes when you change the rule?
We told Claude to add Limited, Corp and Corporation to the endings. One rule line changed, the endings list, and the output file got a new name.
All 50 lines then matched the key, and the same four lines were the only ones that moved. We then ran 19 one-line files through both versions.
| What we sent | Before the change | After |
|---|---|---|
ALDER GROVE DENTAL with the amount of the Supply customer | Sent to a person | Sent to a person |
ALDER GROVE DENTAL SUPPLY with its own amount | Matched to the Supply customer | Matched |
BRANNOCK OPTICAL LIMITED | Sent to a person | Matched |
IVYBRIDGE COLD STORAGE CORPORATION | Sent to a person | Matched |
HOLLIS & SONS PLUMBING for a customer named Hollis and Sons | Sent to a person | Sent to a person |
LOWTHER BAKERY ACH, bank text after the name | Sent to a person | Sent to a person |
BRANNOCK OPT, name cut short | Sent to a person | Sent to a person |
| An alias, with the amount of a different customer | Sent to a person | Sent to a person |
In these 19 cases every line the script did not match went to a person.
Claude pointed out one risk these cases do not test: with the endings ignored, ALDER GROVE DENTAL SUPPLY LLC and a customer called Alder Grove Dental Supply Inc look the same, and the script would match the line with no review.
On a payment typed as "1,000.00" the two sessions also differed: one matched it and one sent it to a person.
What does a controller still review?
- Does an ampersand mean "and"?
HOLLIS & SONS PLUMBINGwent to a person before and after the change. Does bank text such as ACH after the name belong to the name?LOWTHER BAKERY ACHwent to a person too. - If the ending differs from the customer's own (LLC against Inc), is that a match or a person's call?
- Should a line show the other customer's invoice as a hint? Ours does, and the hint never changes the status.
Questions about matching payer names
What do you need to match payer names to customers with Claude?
How well did Claude match payer names?
Which Claude model did we test?
Book a demo
Use the message box to tell us your ERP and the process you want to start with.