Add to Claude

Guides · For agents

Find Active accounts that stopped ordering

Tools: sift_matchWorks with Claude Code

Join the CRM to your order data on the customer ID, then count the Active accounts whose last order is more than 90 days old, or who never ordered. In the test files, that is 64 companies.

Ask your agent

With Sift connected (setup takes three steps), paste this and swap in your own paths.

Use Sift to match /path/to/crm_companies.csv on customer_id to /path/to/product_accounts.csv on account_id. How many Active companies have a product account but no order in the last 90 days, including ones that never ordered? Use the as_of date in /path/to/rules.companies.json.

What Sift sends back

CRM IDs found in the product file1,010 (96.1%)
CRM only / product only41 / 140
Active, has a product account, no order in 90 days64
of which never ordered20
Accounts that never ordered at all290, 250 of them in the CRM

"No order in 90 days" means the last order is more than 90 days before the rules file's as_of date. Exactly 90 days still counts as recent.

What to do next

Questions

Why does the date come from the rules file?
So the count is repeatable. Sift never uses today's clock: the same files and the same as_of date always give 64.
Can it check other windows, like 30 or 180 days?
Yes. The condition takes any number of days, and can also compare two dates in the same row.

One file, no agent? Clean a file by hand in your browser, with nothing uploaded.

More guides for agents

Guide Audit a CRM export with your agent Guide Check who you're emailing that you shouldn't Guide Fix phone numbers with a receipt and an undo