The Mautic Randomizer Plugin
August 21, 2026
Sometimes the best automation isn't another complicated condition—it's simply randomly choosing what happens next, or randomly deciding who it happens to. Have you ever wanted to test the quality of a list or test content on a randomly selected slice of that list? Or test campaigns using randomly selected paths? If you have, you know it's a pain in the rear with Mautic. Until now.
The idea for this plugin came from the need to process a huge cold list day by day. I needed to add a couple of thousand contacts to a segment every day, but one of the requirements was to do it randomly.
You see, I didn't want to go with the most recent contacts or slice them alphabetically. Normally, I would create a custom field, assign a random number to all contacts, and create segments based on those not-so-random numbers. I wanted to be able to change the size of the slice—in other words, I wanted to be in control of how large the next random addition to the segment would be.
I heard that other marketers face similar requirements all the time, which made me think that creating a plugin would be a logical next step.
This is how the plugin works
You need to upload your original list into a segment or create filters to group contacts together. Both ways work. Click on the three dots on the left side of the segment, and you'll see the Randomize command.
You can see the name of your original segment and the number of contacts displayed.
You can go two different ways:
1. Create a new segment by copying a random set of members from the original one
-
Add a new name and alias if you want to. If you don't define them, they will be generated automatically.
-
Choose the number of contacts you want to add to your new segment. This number obviously cannot be larger than the total number of contacts in your original segment.
Once you click RUN, the new segment will be created and the defined number of contacts will be added to it.
It is important to know that these members are not in the new segment because we created a filter. They are members because we added them, which is considered manually added in Mautic's definition.
2. Add more contacts to an existing segment
-
Select Add to an existing segment and choose the segment you'd like to enrich.
-
Choose how many contacts you'd like to add.
A live comparison takes place, and a little help text will show how many contacts are in your original segment but are not yet in the new one. This helps you understand the overlap between the segments.
Once you click RUN, contacts from the original segment will be added to the segment you are about to enrich.
This is very useful if you have an original FULL segment that you'd like to mail to at a rate of 1,000 emails per day. All you have to do is create a segment email for the TO-MAIL segment and add 1,000 random contacts to this segment every day from your original FULL segment.
I have found a bunch of other uses for this feature, and I was really happy with how it works. But something was missing.
Random segment membership is great, but I felt we really needed similar behavior in Campaigns as well.
So I added a new condition called Random Chance. Using this campaign condition, Mautic generates a random outcome of Yes or No. In the condition's settings, you can define the probability of it resulting in Yes or No.
This gives you the ability to truly A/B test, distribute the load between co-workers, or enable practically any random outcome in your campaigns.
This is for Mautic 5 right now (download it from here), and the Mautic 7 version is coming up. Sign up for my newsletter here if you want to be notified when it's out.
Enjoy, and let me know if you have any questions and/or recommendations for improvements.
Comments
Please log in to post a comment.