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.
When to use this template
This template is built for Shopify stores using the JsWorkflows app.
Use this template when you want a ready-made workflow for this use case: Runs monthly, finds customers older than a configurable age with no orders, and deletes them only when deletion is explicitly enabled.
It is designed for Shopify customer operations and gives you a production-ready starting point instead of building the automation from scratch.
This workflow uses the scheduled trigger model and starts from the "Monthly schedule" trigger. It includes setup fields for merchant-facing values, so you can configure the workflow before installing it.
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
Delete only customers created more than this many years ago.
Safety cap for how many eligible customers this workflow can process in one monthly run.
When off, the workflow only logs customers that would be deleted. Turn on after reviewing a dry run.