Whether you want to delete every contact that has never been active in your database, that does not have an email address or every lead that filled wrong information (Looking at you
Although doing this could be way simpler if the peeps behind Mautic would allow
The first thing we want to do is create a segment that would filter the database to only have the contacts that you want to remove from your list of leads. In my case, I wanted to delete every contact that does not have an email address in Mautic and that is from France :
You can also see that I chose to filter by “Page hit Source ID” with an empty value. The reason behind this is that I had some “contacts” that were only an IP Address. These contacts appear to contacts that have anonymous tracking turned on (Source). The hope is that one day, they will be a part of my database and the computer will recognize them from their IP Address and merge this recorded activity to their new profile.
Now that we have our segment that
Here, we want to create a new Campaign. Once you gave it a name, it is time to launch the Campaign Builder.
The first thing we’re prompted to do is to choose a contact source. In our case, our source of leads is coming from a segment. Find and select the segment that contains the contacts that you wish to see deleted from your database.
After that, we want to create an action.
The next step is to choose the action “Delete a Contact“. You will then be prompted to give a name to this action and be given a warning that this action is irreversible. So be aware. But I think you knew that. You can then choose to execute this action immediately or at a time of your choosing.
Once this “campaign” is set up, you can publish it and wait for the cron job that triggers the campaigns to do its job!
You can monitor the wellbeing of your Campaign and whether or not it has worked by finding the segment that should be impacted by your decision and look at the number of contacts it has. In my case, the number dropped from 2248 contacts to… No contacts at all. Success!
The great thing about this way of doing is that it can be set and forgotten about. This is kind of a double edged sword but keep in mind that as long as your segment and your campaign are published, every contact that will fit the criteria(s) of your Segment’s filters will be passed onto the Campaign set actions. Meaning that in my case, if I ever import a new batch of contacts from France and that some of them do not have an email address, they will be processed and deleted in the hour that follows without
In my case, that’s good, I like that. But if you would like to take a look at the contacts you’re going to delete, I highly suggest you unpublish the Campaign to let the segment builds itself and give you the opportunity to check once in a while whether or not you want to save some of the contacts.
And that wraps it for me! I hope this dandy handy trick is going to save you as much time as it saved me and maybe gave you some ideas on how to ensure you keep a clean and relevant database at all times.
Once again, if you have any question, you can reach out to me by mail or by leaving a reply down below. Thank you for your time!