Match Two CSV Files by Invoice Number With AI
Short answer
Match two CSV files by invoice number with AI and surface missing invoices, duplicate keys and changed fields for review.
Match two CSV files by invoice number with AI and surface missing invoices, duplicate keys and changed fields for review. A reconciliation helps a finance or operations team see which records agree and where someone needs to review a mismatch. Start with an example that you can check manually. When a teammate needs to act on the result, include enough context to identify the file, source row or page without having to repeat the whole task.
Prepare the inputs
Upload both CSV exports in the same chat message. Specify each invoice-number header, the amount and currency fields, the period, and which file came from which system. Keep raw export copies and use a small sample to test the join.
Confirm each row represents the same thing
One file can contain one row per invoice while another lists one row per invoice line. Count and inspect repeated keys on both files before interpreting the match.
Where transactions use multiple currencies or legal entities, choose a business key that identifies the invoice within its own context. Model any aggregation explicitly.
Preserve leading zeros and significant characters
Treat invoice identifiers as text, especially if some start with zeros or use letters. Compare spaces, capitalization and prefixes only under a documented rule.
Inspect import settings before changing values. Stripping a leading zero can combine records that represent unrelated invoices.
Report mismatches and unmatched rows separately
Use categories for matched records with equal comparison fields, matched records with changed fields, only in the first file, only in the second file and keys that require review.
Check like-for-like values. A gross and net amount will disagree for valid reasons, and a refunded or credited invoice can appear in one export only.
Check whether dates and filters explain differences
Record the export run date, selected record state and reporting cutoff. Confirm the meaning of posted date versus issue date in each system.
Give each unmatched row a possible explanation only where the inputs support it. Verify source-system dispositions before changing records.
A prompt to copy into Assistly
Reconcile these two CSV attachments by their stated invoice-number columns. Preserve identifiers as text. Compare amount and currency, list missing and repeated keys, and give me a downloadable comparison where supported. Treat unresolved repeat keys as exceptions.Try this task
See it in practice
A first pass with a clear result
The ledger contains INV-100 and INV-101, while the vendor export lists INV-100 and INV-102. INV-100 is present in both. INV-101 appears only in the ledger and INV-102 only in the vendor file. If the amounts for INV-100 disagree, show both with their currencies and leave the settlement conclusion open.
A case that needs clarification
The second export lists two item rows with the same invoice number. Mark it for review and confirm whether the second file should be grouped by invoice before rerunning. Reconcile any subtotal from its original line items and keep adjustments explicit.
Preserve the discrepancy and the identity of the person who can resolve it. A missing field may be enough to prevent a conclusion even when the rest of the draft is ready. Carry confirmed work forward and leave the disputed entry open, with the next check and the reason it matters.
How to use Assistly for this workflow
Open Assistly and start a chat with the assistant you use for the work. Attach the relevant files or enter the exact public URLs and the information to read. Tell the assistant what it should return, what it should leave blank and how someone can verify important fields. Request a first pass on a small set and open the sources to check it. Assistly’s local reconciliation tool handles supported CSV and Excel attachments. Give the exact matching columns and review repeated keys and limitations before relying on totals.
Ask for an output you can review in a familiar format. A short table works for a handful of items, while a downloadable file can be easier to share when other people need to review rows or supply answers. For any number with an important business consequence, ask for the figures and the calculation used. If a document or page was unavailable, have the result say so and identify the missing piece.
Check results and assign the next step
Pick a confirmed observation, a borderline result and a record with missing evidence. Trace each to the input and compare the scope in both places. Check numbers against the source units and the date range. Verify which named version settles a conflict. Keep the open concerns with the output so a recipient does not interpret a blank as a confirmed absence.
Write down a clear next action for each issue you want someone to resolve. Name the person or team responsible and give them the identifier they need to find the original evidence. When you run the workflow again, preserve what changed and why, including corrected inputs. A review note with the last checked date helps colleagues decide whether they can reuse the result or should obtain a fresh copy before acting.
Review the draft in the same context where it will be used. A checklist for internal review can contain questions and owner names. If you share the output externally, make a copy with the appropriate fields and confirm that the recipient can access any source you reference. Put the most consequential decision near the top and leave the evidence close enough that a reviewer can open it without searching through unrelated materials.
Validate the result with a small review set
Make a small export with known expected counts. Include a matched pair, a missing row and a duplicate key. After the run, match each material field to the original. If the output gives a citation that points to a related passage, verify that the passage actually supports the claim and applies to the same item, date and version. A useful review can reproduce the result without access to the original chat.
Add a duplicate with two amounts in different currencies. Leave those amounts separate until grouping is defined. Label what you can establish and what remains open. Preserve disagreements in the source rather than choosing the more favorable result. If data that does not belong in this report appears in the extract, remove it before sharing the output. Continue with a related workflow: Check Field Mapping After a CSV Migration With AI
Verify the reconciliation with a second export after correcting the mistaken tab or date filter. Consider a rerun when the source changes, even if the previous answer looked complete. Check that the old conclusion and its replacement each point to the correct input. Keep the person who can confirm the changed value on the record. Keep both exports with the checked reconciliation file. Continue with a related workflow: Analyze Ecommerce Return Reasons From CSV With AI
Questions and answers
- Can I match on different header names?
Yes. Identify the matching header in each export and tell Assistly which comparison fields correspond.
- How should I handle duplicate invoice numbers?
Determine whether they represent invoice lines, errors, or separate entities. Check the business meaning before combining rows.
- Does an unmatched row prove an invoice is unpaid?
It only establishes that a corresponding row was absent in the selected exports. Check the accounting record and period.