Flow Automation: Deleting Customer via Action
You can use the Delete customer action in Flow Automation to automatically delete customer profiles from your store when predefined conditions are met. For example, you can clean up spam accounts created through bulk sign-ups.
This guide explains when to use this action, its field descriptions, and its usage notes. It also provides a practical example.
When to Use the Delete Customer Action
Use the Delete customer action when:
- Your store receives a large number of suspicious account sign-ups, and you want to remove them automatically to keep your customer list organized.
- You want to automatically delete customer profiles when they meet specific conditions, such as using an obviously invalid email address.
| Note: Deleted customers cannot be restored. If you only want to stop a customer from using their account, go to the customer details page and click Add to blacklist. If you need to re-enable the account later, click Remove from blacklist. |
Field Descriptions
| Field | Description |
| Customer ID | The customer to be deleted. Click + Add variable and select the customer who triggered the workflow. |
Usage Limits & Notes
- Customers with order history cannot be deleted: To deactivate these customers’ accounts, add them to the blacklist instead.
- Deleted customers cannot be restored: Make sure to use Condition to precisely define which customers should be deleted, so you do not delete real customers by mistake.
- Test before enabling: Before publishing the workflow, we recommend replacing this action with Add customer tags and monitoring which customers are selected for a while. Once you confirm the results, switch the action back to Delete customer.
Applicable Workflows
The Delete customer action is primarily used in workflows initiated by the following triggers:
- [Customer] Customer created
- [Customer] Bulk action run on customers
Example Use Case
Here is a practical example of using the Delete customer action to automatically clean up spam accounts.
Scenario: Your store frequently receives bulk sign-ups that use the same suspicious email domain and you want these accounts to be automatically deleted as soon as they register.
- Trigger: Customer created
- Condition: [Email] ends with "@spam.example.com" (replace this with any other suspicious email domain as needed)
-
Action: Delete customer
- Customer ID: [Customer ID]
- Outcome: Accounts registered with suspicious email addresses are deleted automatically, keeping your customer list organized and preventing marketing emails from being sent to these addresses.
| Note: To insert the information shown in square brackets (such as the customer id), click + Add variable and select the corresponding parameter. |