Lesson 4: Catch duplicate invoices and reconcile the bank with AI

Published by

on

The Pragmatic CFO: practical finance for the AI era

TL;DR AI is good at the tedious half of payables control: scanning every invoice for near-duplicates, splits and odd amounts, and lining up a bank reconciliation. It should not do the other half, deciding what is real and moving money, and it will plug a difference if you let it. In this lesson you find seven planted flags in 147 invoices and reconcile a bank account to the cent, with the human checkpoints built in.

What you’ll practice

  • Writing fuzzy duplicate-matching rules an AI can apply to every invoice, not just exact matches.
  • Spotting split invoices and payment-fraud signals, and knowing which checks only a person can do.
  • Reconciling book to bank with every item explained, no plugs, and the journal entries listed.

Time: about 30 minutes. You need the free sample workbook (Excel) and any AI assistant that can read an uploaded spreadsheet. Larkspur Supply Co. is made up, and so are its vendors, invoices and bank balances, so the file is safe to upload anywhere.

Why this is worth an AI’s time

Duplicate and fraudulent payments look like an invoice number typed without its prefix, a vendor name in capitals, or three invoices just under an approval limit. A person reviewing 147 invoices on a Friday misses those. A well-instructed AI checks every pair.

The stakes are real. The FBI’s Internet Crime Complaint Center reported 24,768 business email compromise complaints in 2025, with reported losses of $3,046,598,558, the second-largest loss category in its report after investment fraud. The report describes business email compromise as a scam “targeting businesses or individuals working with suppliers,” carried out by compromising email and other accounts to make unauthorized transfers. In our view, a “please update our bank details” email is the classic opening move, which is why AP is where these controls live.

Part A: Scan the invoices

Sheet 3_AP_Invoices has 147 September invoices totaling $1,985,827.31. Columns: Invoice ID, Vendor, Vendor invoice #, Invoice date, Amount, Location, Approver, and “Bank details changed this month.” The approval limit is $10,000: invoices above it need a higher sign-off.

Step 1: Duplicates, exact and fuzzy

Exact matching catches one duplicate here; the other two hide behind formatting. So the prompt spells out normalization first. Our rules, reusable on your own data:

  • Normalize the vendor: lower case, trim spaces, drop punctuation and suffixes like “Inc” or “LLC”.
  • Normalize the invoice number: strip prefixes like “INV-“, leading zeros, spaces and dashes.
  • Flag a pair when the normalized vendor and number match, or when vendor and amount match within 30 days.
JOB: You are an AP control analyst reviewing September 2026 invoices for duplicates before the payment run.
DATA: Sheet 3_AP_Invoices in the attached workbook, 147 rows. Columns: Invoice ID, Vendor, Vendor invoice #, Invoice date, Amount (USD), Location, Approver, Bank details changed this month.
RULES: Normalize Vendor (lower case, trim, remove punctuation and words like Inc, LLC, Co) and Vendor invoice # (remove prefixes such as INV-, leading zeros, spaces and dashes). Flag any pair where normalized vendor and normalized invoice number match; or normalized vendor and amount match exactly within 30 days. Compare every invoice with every other invoice, not a sample. Do not decide which invoice is the valid one, and do not recommend paying or holding anything.
OUTPUT: A table: original Invoice ID, suspected duplicate Invoice ID, vendor, both invoice numbers as written, amount, days apart, which rule matched.
PROOF: State the row count and total amount you read (should be 147 and $1,985,827.31). State how many pairs you compared. Show the normalized vendor and number for each flagged row.

Step 2: Splits and payment-fraud signals

The second scan looks for patterns, not pairs. A split is one purchase broken into pieces that each fall under the approval limit. A payment-fraud signal matches how business email compromise works: changed bank details, a round amount, a size out of line with the vendor’s history, or an invoice number outside the vendor’s series.

JOB: You are an AP control analyst looking for approval-limit splits and payment-fraud signals.
DATA: Sheet 3_AP_Invoices, same file. Approval limit is $10,000 per invoice.
RULES: (1) Split test: same vendor, two or more invoices each between $9,000 and $10,000, dated within 3 days of each other, whose total exceeds $10,000. A single invoice just under the limit is not a split on its own. (2) Fraud-signal test: any invoice where Bank details changed this month = Yes; any amount that is a round multiple of $1,000; any invoice more than 1.5 times that vendor's largest other September invoice; any invoice number that does not follow the vendor's other numbers. Report facts only; do not conclude fraud.
OUTPUT: Two tables. Splits: vendor, Invoice IDs, dates, amounts, combined total, approver. Fraud signals: Invoice ID, vendor, amount, each signal that fired, number of signals, and the vendor's largest other September invoice, sorted by number of signals, most first.
PROOF: For the split test, list every invoice between $9,000 and $10,000 and say why each one is or is not part of a split. For each fraud signal, show the comparison numbers.

Notice the PROOF line in the split test. It makes the AI show you the single invoices just under the limit that it rejected, so you can see it applied the rule rather than eyeballed it. The signal count matters too: one weak signal on its own is a question, while several stacked on one invoice is a flag.

Step 3: Decide what happens next, as a person

The AI has produced a list. It has not stopped a payment, and it should not be able to. Take each flag to its owner: duplicates to the AP lead, the split to the approver’s manager, and the bank change to whoever controls the vendor master, for a call-back.

Part B: Reconcile the bank

Sheets 3b_Bank_Statement and 3c_Book_Cash show the operating account at September 30: bank $1,256,156.70, books (GL 1010) $1,284,650.37. The job is to explain every cent of the $28,493.67 gap.

The sheets hold selected items only, so the prompt says so.

JOB: You are a staff accountant preparing the September 30, 2026 bank reconciliation for the operating account.
DATA: Sheet 3b_Bank_Statement (bank side) and sheet 3c_Book_Cash (book side, GL 1010). Both list selected items only; every other item has already been matched. USD, to the cent.
RULES: Match items by check number and description. Classify each unmatched or mismatched item as: outstanding check, deposit in transit, bank item not yet booked, or book error. A check that appears on both sides with different amounts is an error to investigate, never a timing item. Do not create a plug, a "rounding" line or an "unreconciled difference" line. If it does not reconcile, say so and stop.
OUTPUT: Standard two-sided reconciliation: balance per bank, plus deposits in transit, less outstanding checks, adjusted bank balance; balance per books, plus or minus bank items and book errors, adjusted book balance. Then a list of journal entries the books need, with accounts, debit, credit and a one-line memo.
PROOF: Show that adjusted bank equals adjusted book to the cent. Show that the items explain the starting gap of $28,493.67. Say which side each item adjusts and why.

What a good answer looks like

Show the answer key

Part A: the seven flags

Invoice IDVendorAmountWhy it is flagged
AP-70140Ironclad Hardware23,857.07Exact duplicate of AP-70012: same vendor, invoice INV-1079 and amount, 6 days later
AP-70141Juniper Office Supply23,761.76Likely duplicate of AP-70047: invoice entered as 1184 instead of INV-1184, 2 days later
AP-70142NORTHSTAR ABRASIVES18,877.25Likely duplicate of AP-70088: vendor name in capitals, same invoice INV-1307 and amount, 9 days later
AP-70144Granite Tool Works9,850.00Possible split under the $10,000 limit: consecutive invoices INV-7710 to INV-7712 on Sep 22 and 23, combined $29,625.00, same approver
AP-70145Granite Tool Works9,875.00
AP-70146Granite Tool Works9,900.00
AP-70143Harborline Logistics48,000.00Bank details changed this month; round amount; about twice the vendor’s largest other September invoice ($23,326.55); invoice number INV-9921 is outside the vendor’s usual INV-1xxx series

The three duplicates total $66,496.08. All seven flagged invoices total $144,121.08.

Not flags: three other invoices sit between $9,000 and $10,000 (AP-70072, AP-70129, AP-70135), each from a different vendor with no companion invoice. A good answer lists them in its PROOF and rejects them.

Also expect in the signal table: the size test fires on AP-70010, Foothill Electric Supply, $23,115.14 (the vendor’s other September invoices top out at $10,062.65). One signal, no bank change, normal invoice number: check the purchase order, but it is not a flag. The number test also fires on the Granite trio and AP-70141, already flagged. Only AP-70143 has four signals.

Part B: bank reconciliation, September 30, 2026

Bank sideAmount
Balance per bank1,256,156.70
Add: deposit in transit (lockbox batch 0930)46,210.55
Less: outstanding check 20481(12,480.00)
Less: outstanding check 20483(3,915.40)
Less: outstanding check 20486(1,240.00)
Adjusted bank balance1,284,731.85
Book sideAmount
Balance per books (GL 1010)1,284,650.37
Less: bank service charge not booked(185.00)
Add: interest earned not booked212.48
Add: check 20470 booked at 4,682.00, cleared at 4,628.00 (transposition)54.00
Adjusted book balance1,284,731.85

Outstanding checks total $17,635.40. Proof of the gap: 17,635.40 minus 46,210.55 minus 185.00 plus 212.48 plus 54.00 equals minus 28,493.67, which is bank minus book.

Journal entries the books need

EntryDebitCreditAmount
September bank service chargeBank fees expenseCash, GL 1010185.00
September interest earnedCash, GL 1010Interest income212.48
Correct check 20470, Keystone Hydraulics, booked 4,682.00, cleared 4,628.00Cash, GL 1010Accounts payable, Keystone Hydraulics54.00

On the third entry, confirm against the check image and invoice before posting. If the invoice was $4,682.00, Larkspur still owes Keystone $54.00, hence the credit to payables.

No entries for the outstanding checks or the deposit in transit: they are timing and will clear in October.

Where AI goes wrong on this task

Our view of the usual failure points:

  • Exact matching only. Without normalization rules, an AI finds AP-70140 and stops; the other two duplicates hide behind formatting.
  • Flagging every invoice under the limit. A loose “just under $10,000” rule pulls in single invoices that are perfectly normal. A split is a pattern across invoices, not one amount.
  • Plugging the difference. Asked to “reconcile,” a model may add a balancing line to make the two sides agree. The prompt bans it outright; a reconciliation with a plug is not a reconciliation.
  • Treating the transposition as timing. Check 20470 cleared, so the $54.00 is a book error that needs an entry.
  • Recommending action on a payment. “Hold AP-70143 and contact the vendor using the details in the email” is exactly backwards. The AI reports facts; a person verifies and decides.

What stays with a person

Two things, and they are not negotiable in our view.

First, a vendor bank change is verified by calling the vendor on a phone number already on file from before the change: never a number, link or contact in the email or the invoice that asked for the change. Harborline’s $48,000 invoice does not get paid until that call is done and documented.

Second, the AI never releases, holds or approves a payment, and never edits the vendor master. A person voids the duplicates, asks about the Granite split, signs the reconciliation and posts the entries. For how we think about AP agents more broadly, including where approval should sit, see our guide to AI in accounts payable and expenses.

Check yourself

Why does exact matching find only one of the three duplicates?

AP-70141 has the invoice number as 1184 instead of INV-1184, and AP-70142 has the vendor name in capitals. Only normalized matching catches them.

AP-70072 is $9,471.93, just under the limit. Is it a split?

No. It has no companion invoice from the same vendor in the window. Just under a limit is a reason to look, not a finding.

Name the four signals on AP-70143.

Bank details changed this month; a round $48,000.00; about twice the vendor’s largest other September invoice of $23,326.55; and an invoice number outside the vendor’s usual series.

Why is check 20470 not an outstanding check?

It cleared the bank on September 21. It appears on both sides at different amounts, so the difference is a book error of $54.00 that needs a correcting entry.

Which reconciling items need journal entries?

The bank fee ($185.00), the interest ($212.48) and the $54.00 correction to check 20470. Outstanding checks and the deposit in transit do not.

Your turn: try it on your own numbers

Run the two scan prompts on last month’s AP register, with your own approval limit and date windows, then the reconciliation prompt on one bank account. Vendor names and invoice amounts are internal data, and bank account details are never something to upload: check the data zones in Lesson 1 before you start, and strip account numbers from any export.

Next: Lesson 5: Build a 13-week cash forecast and stress it with AI

Sources

New here? Start here to find the best guide for your job, or use the free finance templates, the CFO metrics library and the CFO moves tracker.