Most stores collect a tail of orders that never went anywhere: card failures, checkouts a customer abandoned at the payment step, pending orders from a gateway that never called back. They sit in failed or pending forever and clutter every count and report. This finds them and clears them, but only ever changes their status. It does not delete orders, so the record stays intact.
I want to clear out stale orders. First, change nothing: list every orderstill in [failed] or [pending] that is older than [60 days], with its number,date, age, and total, so I can see the backlog.
Show me that candidate list and stop. Do not change anything yet.
Once I approve the list, set the ones I confirm to [cancelled] in smallbatches, show me each batch as it goes, and add a note to each order sayingit was cancelled as an abandoned checkout during backlog cleanup. Do notdelete anything. At the end, give me the list of orders you changed and theirnew status.Why this is safe to run
This is a partial-automation recipe, and here is the honest line on scope: it changes order status and adds notes, and that is all it can do. It cannot delete an order, empty the trash, or touch payment data, so the worst case is an order set to cancelled that you set back afterward. A status change is reversible; a delete would not be, and this recipe has no delete in it.
The read comes first. Listing the backlog writes nothing, so you approve the exact orders before a single status flips. From there the change runs in batches you watch, only on the orders you confirmed, with a note left on each explaining why. Every write is checked against the capability of the user you bound the agent to and lands in the Activity Log with the order it touched.
Already connected? You do not have to paste this. Ask your agent for the “clear the stale order backlog” recipe, or just tell it which statuses and how old, and it runs the same reads-first flow on your own store.