Guides · For agents
Find unpaid invoices: match invoices to payments
Join invoices to payments on the invoice number, then count the invoices with no payment and total what they are worth. In the test files, that is 6 invoices worth 4,623.75, 3 of them overdue.
Ask your agent
With Sift connected (setup takes three steps), paste this and swap in your own paths.
Use Sift to match /path/to/invoices.csv on invoice_no to /path/to/payments.csv on invoice_no, as of 2026-11-01. How many invoices have no payment, what are they worth, and how many of those are past their due_date? Then count the open invoices in invoices.csv and total the amount column.
What Sift sends back
One unpaid invoice has a blank amount. It is counted, left out of the total, and Sift says so. It is never treated as 0.
What to do next
- One payment is for inv-2005, written in lower case, so an exact match finds nothing. Ask Sift to trim and lowercase both keys: 7 invoices then have a payment, and 2 overdue invoices worth 795.75 have none.
- INV-2006 has a payment but is still open: it was part paid. Chase the balance, not the whole invoice.
- Send the invoice numbers to whoever chases payment, not a copy of the file.
Questions
So the count is repeatable. Overdue is measured against the date you give, never today's clock.
Sift says when a key sits on several rows of the other file, as one invoice does here, so a split payment is never counted twice.
Two lists of any kind work the same way: stock against a supplier list, sign-ups against who turned up.