Create a workflow to delete contacts in a segment
You might want to delete contacts that are added to a specific segment. If you delete the segment, the contacts will still be in the database.
You could use a workflow that deletes all contacts from the database who are in that specific segment. Additionally, you may want to keep the contacts if they are at the same time present in another segment.
This should not be confused with the action of deleting a segment, where the contacts will not be deleted from the database, but merely the segment itself gets deleted.
There is a way to accomplish this with a workflow and this article will explain you how to create it.
Let’s say you have a segment called Old collection. There are contacts in that segment you want to remove, but only when they are not in the segments Clothing and Shoes.
- In the start block, add all the contacts who are added to the segment Old collection.
The checkbox "Include all contacts that are already a member of the list(s)" must be checked to ensure the proper functioning of this workflow.
- Next, add an if/else block with the trigger Contact belongs to a list and select the segments Clothing and Shoes.
- The Yes side is followed by a flow action End the workflow.
- The No side is followed by the contact action Remove from list with the option Database selected.
The workflow should look like this:
There are a few things to keep in mind, when creating this workflow.
- The contacts that are deleted are deleted permanently. We are not able to get them back for you. So creating this workflow is at your own responsibility.
- Stopping the workflow and making any changes is never a good idea, since there will always be a risk that the workflow does not work as expected anymore.
- Do not forget to stop the workflow as soon as the intended contacts have been removed, to prevent new contacts from being deleted by this workflow.
- Do not add too much segments to your if/else block. Five segments should be the maximum.
- Do not add additional operators between the if/else triggers, but thick off the segments in the first trigger.
- Test the workflow! Before you start this workflow, make a duplicate of the workflow and replace the remove form list action with a wait block. This gives you an idea which contacts will be removed permanently by the original workflow. Stop and optionally delete the duplicated test workflow to release these resources and keep a better overview.
- Do not add a wait block in your final workflow! This could give issues on performance for this specific triggers and could cause the workflow to stop.