Two supplier invoices can refer to the same transaction without looking identical in the system. The supplier name may be written differently, the invoice number may contain an extra character, or the amount may vary slightly.
For example, one invoice has the supplier name Kaveri Logistics Pvt Ltd with invoice number INV-26513. Another has Kaveri Logistics Private with invoice number INV/26513.
A normal exact match does not identify these as the same invoice because the text is different.
This is something worth checking when working with accounts payable data. Even when duplicate validation exists in the financial system, differences in source data can make reconciliation and exception reviews more difficult.
I wanted to compare two approaches using Python. The first checks exact supplier names and invoice numbers. The second uses fuzzy matching to identify records that are similar but not identical.
The test uses synthetic supplier invoice data, structured like an extract from Workday Financial Management. All matching happens in Python, not inside Workday.
Preparing the invoice data
I generate 800 supplier invoices across 16 suppliers. Each record has a supplier name, invoice number, amount and invoice date.
Then I select 25 invoices and create additional copies with small changes. Some supplier names have different abbreviations, some invoice numbers contain different separators, and a few amounts and dates change slightly.
For example, Pvt Ltd becomes Private Limited, or INV-26513 becomes INV/26513. Some copied amounts increase by 0.3%, and invoice dates can move by up to seven days.
The final dataset contains 825 records, including 25 deliberately created duplicate pairs.
Since I know which records are copied, I can compare the matching results against the 25 expected pairs.
I first use exact matching on the supplier name and invoice number. Both fields must match exactly.
This identifies only 3 of the 25 duplicate pairs.
The remaining pairs have enough differences in the text to prevent an exact match.
Using fuzzy matching instead
For the second approach, I clean the supplier names and invoice numbers before comparing them.
The supplier names are converted to lowercase, punctuation is removed, and some common company-name variations are standardized. For invoice numbers, the code removes nonnumeric characters.
I use Python’s SequenceMatcher from the difflib library to calculate text similarity.
The matching logic then checks four conditions:
| Field | Matching condition |
|---|---|
| Supplier name | At least 85% similarity |
| Invoice number | At least 80% similarity |
| Invoice amount | Difference within 1% |
| Invoice date | Difference within 10 days |
For example, two invoices with nearly identical supplier names, similar invoice numbers, matching amounts and close invoice dates become candidates for review.
This is not a trained machine learning model. It is a combination of text normalization, similarity scoring and business rules.
To reduce unnecessary comparisons, the notebook sorts invoices by amount and compares a limited number of nearby records.
That makes the calculation manageable for this small dataset, although the candidate selection needs improvement for larger invoice registers.
What changes in the results?

The first chart compares the number of duplicates identified by the two methods.
Exact matching finds three pairs. Fuzzy matching finds all 25 planted pairs.
The second chart shows the associated invoice values.
| Measure | Result |
|---|---|
| Planted duplicate pairs | 25 |
| Exact matching | 3 |
| Fuzzy matching | 25 |
| Additional pairs flagged | 0 |
| Total planted duplicate value | ₹38.39 lakh |
| Value identified by exact matching | ₹6.06 lakh |
| Value identified by fuzzy matching | ₹38.39 lakh |
This is a significant difference for the generated dataset.
Exact matching identifies only about 16% of the planted duplicate value, while fuzzy matching identifies the full ₹38.39 lakh.
That amount represents the value of the copied invoice records. It is not an actual financial loss or a confirmed duplicate payment.
The third chart helps explain why fuzzy matching works better in this case.
It compares supplier-name similarity with invoice-number similarity for candidate pairs whose amounts are within 1%.
The planted duplicate records appear near the top-right corner because their supplier names and invoice numbers remain similar after the changes.
Other candidate pairs have lower similarity scores and do not satisfy the matching conditions.
The dashboard also lists examples that exact matching misses.
One supplier appears as Cauvery Tech Pvt Ltd in one record and Cauvery Tech Pvt Ltd. in another. Another invoice uses INV-83530 in one record and INV/83530 in the other.
These are small formatting differences, but they change the result when the comparison uses exact text.
Where the matching logic can fail
The 25 out of 25 result looks good, but the synthetic data is relatively controlled.
I deliberately create duplicate records using a known set of changes. Real supplier invoice data may contain more difficult cases.
One issue is invoice number normalization.
The current code removes every nonnumeric character. That makes INV-1023 and INV/1023 match, which is useful here.
But it also makes INV-1023 and INV-1023-A look identical after normalization.
Those could be separate invoices.
Another issue is recurring transactions. A supplier may send the same amount every month, with similar invoice references and dates. Fuzzy matching could incorrectly flag those records as duplicates.
The candidate selection also has a limitation. The notebook compares only the next 14 records after sorting by amount. If many invoices have similar values, a genuine duplicate can fall outside that comparison window.
These are the areas that need more testing before using the logic on actual accounts payable data.
The fact that no extra pairs are flagged in this experiment does not guarantee the same result with real invoices.
Connecting this to Workday Financials
Workday Financial Management already provides duplicate supplier invoice validation and a Find Possible Duplicates action.
This Python experiment is not a replacement for those controls.
A useful application is an additional review of supplier invoice extracts, particularly when data comes from multiple sources or when Finance needs to investigate historical transactions.
An actual Workday extract contains more information than the four fields used here. Supplier identifiers, company, currency, invoice status, payment status and related transaction references can make the review more reliable.
For example, if Workday provides a reliable supplier identifier, that is more useful than comparing only the supplier name.
The process could start with an authorized invoice report, followed by data preparation and matching in Python. The output would be a list of candidate pairs with the original invoice details and similarity scores.
Accounts payable then reviews the candidates to confirm whether the invoices represent the same obligation.
The notebook does not connect to a Workday tenant or update any supplier invoices. It only demonstrates the matching approach using generated data.
What this test tells me
The main difference is clear: exact matching finds 3 duplicate pairs, while fuzzy matching finds all 25 in this dataset.
The result shows how small changes in supplier names and invoice numbers can affect duplicate detection.
But fuzzy matching is not automatically better in every situation. Broader matching rules can identify more genuine duplicates while also increasing the risk of matching unrelated records.
The next useful test is a more difficult invoice dataset, with recurring monthly invoices, similar supplier names, overlapping amounts and invoice numbers that differ by meaningful suffixes.
That will help establish where the matching rules work and where they create unnecessary exceptions.
For now, this experiment demonstrates a practical way to extend a basic duplicate check using Python. It provides candidate invoices for investigation while keeping the final accounting decision with the finance team.