Customers
Delete inactive customers older than N years
Runs monthly, finds customers older than a configurable age with no orders, and deletes them only when deletion is explicitly enabled.
Setup guide
Before you start
This template is destructive when Delete enabled is turned on. Run it once with deletion disabled and review the logs before enabling deletion.
How it works
- Trigger: monthly scheduled workflow
- Searches customers using
orders_count:0andcustomer_date - Processes customers page by page
- Rechecks each customer before deletion using their current
createdAt,numberOfOrders, andcanDeletevalues - Deletes only customers that still match the criteria and are deletable
Configure in setup
Customer age in years: minimum customer account age before deletionMaximum customers per run: safety cap for one monthly runDelete enabled: off means dry-run logging only; on performs deletion
Notes
- No extra Shopify scopes are requested by this template because customer write access is already part of the app's default install scopes.
- If a customer has placed an order, Shopify will not allow deletion and this workflow also skips them before attempting deletion.
Setup fields
Customer age in years
numberRequiredconfig
Delete only customers created more than this many years ago.
Maximum customers per run
numberRequiredconfig
Safety cap for how many eligible customers this workflow can process in one monthly run.
Delete enabled
checkboxRequiredconfig
When off, the workflow only logs customers that would be deleted. Turn on after reviewing a dry run.