Automate Deleting Old, Non-Purchasing Customers
Automatically cleans your customer database by removing profiles of non-purchasing customers older than five years, ensuring a streamlined and compliant system.
The Problem
Maintaining a bloated customer database inflates email marketing costs, clutters your CRM, and creates unnecessary data privacy risks under regulations like GDPR or CCPA. Manually sifting through thousands of profiles to identify and delete inactive accounts is a time-consuming, error-prone task that diverts valuable resources from growth-focused activities.
What This Automation Solves
This Shopify Flow automation proactively addresses database hygiene by leveraging a 'Scheduled time' trigger to run monthly. It uses 'Get customer data' to precisely identify customer profiles created over five years ago who have never placed an order. A subsequent 'For each' loop then systematically applies the 'Delete customer' action, ensuring your database remains lean, compliant, and efficient without any manual effort.
When to Use This Automation
- To reduce email marketing platform costs by having a cleaner, more targeted subscriber list.
- To enhance data privacy compliance by adhering to 'right to be forgotten' principles and data retention policies.
- To improve the accuracy of customer analytics and segmenting by removing 'dead weight' from your active customer base.
Workflow
Trigger
Step 1Trigger that runs every month on the 1st.
Action
Step 2Gets customers over 5 years old with no orders.
Loop
Step 3Iterates over each item in getCustomerData.
Action
Step 4Deletes the customer.
Step-by-Step Setup
- 1
Set the Flow trigger to 'Scheduled time', configured to run monthly on the 1st day of the month.
- 2
Add an 'Get customer data' action. Set the conditions: `customer created at` is 'before' '5 years ago' AND `orders count` is '0'.
- 3
Add a 'For each' loop action, iterating over the 'Customers' list from the 'Get customer data' step.
- 4
Inside the loop, add a 'Delete customer' action. Use the 'customer ID' from the 'For each' loop's iteration.
Related Questions
- What happens to the orders associated with a deleted customer?
- When a customer profile is deleted via Shopify Flow, only the customer's personal data (like name, email, address) is removed. Any orders they previously placed will remain in your Shopify admin for historical and accounting purposes, but they will no longer be linked to an active customer profile.
- Can I recover a customer profile after it has been deleted by this Flow?
- No, customer profiles deleted through Shopify Flow cannot be recovered. Once the 'Delete customer' action is executed, the customer's data is permanently removed from your Shopify store, so ensure your criteria are precise.
- How can I exclude certain inactive customers from being deleted (e.g., VIPs)?
- You can add an additional condition to your 'Get customer data' action. For instance, you could add 'AND customer tags' 'does not include' 'VIP' to prevent the Flow from targeting any customers you've specifically tagged as important, regardless of their activity.
- Does deleting inactive customers impact my historical sales data or reporting?
- No, deleting customer profiles primarily impacts your customer list and associated personal data. Your historical sales data, revenue figures, and order counts remain intact, as the orders themselves are not deleted, only the customer record they were once linked to.
Recommended Tools & Apps
Launch this automation
Open Shopify Flow and use this page as your setup blueprint.
Merchant Insight
Before activating this Flow, consider running a final win-back email campaign to any customers who meet the deletion criteria. This gives them one last chance to engage and ensures you're not deleting a potentially valuable customer who jus
Related Automations
Automate Tagging for Shopify Subscription Orders
Instantly tag every recurring subscription order with a specific label, streamlining order identification and management within your Shopify admin.
How to Get Email Alerts for Shopify Flow Errors
Automatically receive an email notification whenever one of your critical Shopify Flow automations encounters an error, preventing silent failures and revenue loss.
Monitor Your Shopify Flows: Get Instant Error Alerts
Receive immediate Shopify alerts whenever a critical automation workflow fails, ensuring you catch and resolve issues before they impact your business.