Lead lists were renamed to segments in Mautic 1.4.0.
Segments provide ways to easily organize your contacts. These segments can be configured from a variety of fields.
When viewing all segments you will notice the column on the right which shows the number of contacts matching that particular segment.
To create a new segment navigate to Segments in the menu, and click on 'New'.
Since Mautic 3.2 it has been possible to provide a public name, in addition to an internal name, for a segment.
This is used if the segment is displayed in the Preference Centre, allowing the contact to choose to remove themselves from it. The Public Name is what will be displayed to the contact in the preference centre.
It is possible to create a segment which is accessible to everybody who uses your Mautic instance - a public segment - or just for your own use - a private segment.
There are many approaches that can be taken when it comes to allowing contacts to choose communications they wish to receive from you. If you wish to allow them to subscribe and unsubscribe based on segments, you can select the option to make a segment available in the Preference Centre.
Use this in conjunction with the public name to provide a user-friendly description of the segment.
If a segment is unpublished, it will not be available for use in Mautic, and will not show in any dropdown fields.
Filters are used to define the contacts who will be in the segment.
In addition, these filters can be combined to either be inclusive or exclusive depending on your needs.
Once you have selected the field you can then choose the type of operation to perform. These vary depending on the way you wish to filter your contacts.
If you want to divide your segment based on certain criterion, and you wish to avoid sending duplicate emails to the (sub)segments, you can view and alter them through typing the alias name of the contact segments separated by '+' only. You can add n contact segments to show the contacts they have in common, but you will always receive the result as the intersection of the subsets. You can then manipulate the contacts to remove them from either one subset or all, hence avoiding sending duplicate emails to the same leads in the subsets.
There are 5 filters you can use for matching part of a string -
regexp. First three filters match strings as you enter it.
like filter is for advanced users - you can specify which type you want to use with
My string%is the same as
starts withfilter with
%My stringis the same as
ends withfilter with
%My string%is the same as
My stringis the same as
A few notes for text filters:
containsfilters were added later than the
likeone, so you can easily specify what you need now.
%character in the middle of the string has no special meaning.
my % stringwill search for a string with
%in the middle. The same is true for
%my % string%value. There is no need for escaping this character.
%character in a value for
likefilter and no modification is performed if at least 1
You can use regular expressions in a
regexp filter. Mautic recognises all common operators like
| for OR (
first string|second string), character sets (
[a-z0-9] etc.), repetitions (
?) and more. You have to escape special characters with
\ if you want to use them as matching character. Learn more about regex at https://dev.mysql.com/doc/refman/5.7/en/regexp.html. Please note that MySQL (and Mautic) uses POSIX regex, which could behave differently from other types of Regex.
Date filters allow you to choose a date via DatePicker:
Hovewer you can specify much more here. Mautic recognizes relative formats too (these string are not translatable):
+1 day(you can also use
-2 days(you can also use
2 days ago)
3 weeks ago
3 years ago
Example (Consider that today is
Date identified equals -1 weekreturns all contacts identified on 2018-02-23.
Date identified less than -1 weekreturns all contacts identified before 2018-02-23.
Date identified equals -1 monthsreturns all contacts identified on 2018-02-02.
Date identified greater or equal -1 yearreturns all contacts identified 2017-03-02 and after.
Date identified greater than -1 yearreturns all contacts identified after 2017-03-02.
Beside this you can specify your date with text. These formulas are translatable, so make sure you use them in correct format.
birthday -7 days/
anniversary -7 days
Example (Consider that today is
Date identified equals last weekreturns all contacts identified between 2018-02-26 and 2018-03-04 (Monday to Sunday).
Date identified less than last weekreturns all contacts identified before 2018-02-19.
Date identified equals last monthreturns all contacts identified between 2018-02-01 and 2018-02-28.
Date identified greater or equal last yearreturns all contacts identified 2017-01-01 and after.
Date identified greater than last yearreturns all contacts identified after 2017-12-31.
Custom contact date field equal birthday -1 dayreturns all contacts identified every year on 03-01 (1st march).
Custom contact date field equal anniversary -1 monthreturns all contacts identified every year on 02-01 (1st february)
Once you have created your segment, any applicable contact will be automatically added through the execution of a cron job. This is the essence of segments.
To keep the segments current, create a cron job that executes the following command at the desired interval:
php /path/to/mautic/bin/console mautic:segments:update
Through the execution of that command, contacts that match the filters will be added and contacts that no longer match will be removed. Any contacts that were manually added will remain part of the list regardless of filters.
In addition to segments you can also manually add any contact to a list by clicking the Preferences button at the segments tab, use the dropdown to select a segment and add the contact to it or click on the x next to a segment in the input field to remove the contact.
Filter the contacts in the segment. The batch delete action in the contact table allows deletion of up to 100 contacts at one time. This is a performance precaution since deleting more contacts at one time could cause issues. This feature can be used for hundreds of contacts.
But deleting thousands of contacts this way in one segment will become a tedious task. Luckily, there is a trick how to let the background workers do the job for you.
This way the
mautic:campaign:trigger commands will delete all the contacts in the segment. As well as all the contacts which will be added to the segment in the future. Everything is done automatically in the background. The cron jobs must be configured. However, be aware that when a contact is deleted, there is no way to get it back.
Since Mautic 4.0 there is a check when deleting or unpublishing a segment to ensure that it is not required as a filter by an existing segment.
If you attempt to delete or unpublish a segment which is in use by a filter in another segment, you will see an alert message informing you of the segments that you will need to edit before you delete it.
Found errors? Think you can improve this documentation? edit this page