Guides · Beyond customer lists
Flag big refunds and orders for review, with an undo
Count the refunds and orders over your limits, then have Sift write check in a review column on just those rows. In the test file, 7 of 18 transactions are over the limits, worth 5,465.00, and 6 get marked: the seventh was marked already.
Ask your agent
With Sift connected (setup takes three steps), paste this and swap in your own paths.
Use Sift on /path/to/shop_transactions_nov.csv. Count the refunds with an amount of 100 or more and the orders of 1,000 or more, and total the amount. Then, with /path/to/rules.shop-review.json, dry run set_if on the review column, setting it to check where that holds, and apply it if I say yes.
Your agent writes the condition for both tools: {"any": [{"all": [{"field": "type", "op": "eq", "value": "refund"}, {"field": "amount", "op": "gte", "value": 100}]}, {"all": [{"field": "type", "op": "eq", "value": "order"}, {"field": "amount", "op": "gte", "value": 1000}]}]}. The rules file allows up to 40% of rows to change, and makes txn_id, type and amount hands-off.
What Sift sends back
A refund of exactly 100.00 counts, because the condition is 100 or more. One at 99.99 does not. A refund with a blank amount is not counted, because a blank can't be compared with 100.
What to do next
- Send the changes-only file to whoever reviews. It lists the 6 transaction IDs, not the whole file.
- To try other limits, change the numbers and dry run again. Nothing is written until you apply.
Questions
Yes. Add a condition such as within_days 30 with an as of date, and only recent rows are marked.
It counts as meeting the condition, but nothing on it changes.
No. Apply writes a new file next to it, with a receipt that records every old and new value.
One file, no agent? Clean a file by hand in your browser, with nothing uploaded.