Guides · For agents
Find Active accounts that stopped ordering
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
"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
- Word the question carefully. Counting every Active CRM row with no recent order gives 129: the 64, plus 46 rows with no customer ID and 19 whose ID isn't in the product file.
- Those 65 extra rows are a different problem: missing or broken IDs. Fix them in the CRM, then rerun.
- Hand the 64 to the account owners as a list of record IDs, not a CSV of customer data.
Questions
So the count is repeatable. Sift never uses today's clock: the same files and the same as_of date always give 64.
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.