Group filters for segments

Posting from GH issue: https://github.com/mautic/mautic/issues/6636

When creating the filter on a segment, i currently cant filter with multiple grouped or values.
i.e.
‘Tags’ Include ‘Number 1’
AND
( Stage != ‘A’, OR ‘B’, OR ‘C’)

The returned value I would expect would be "All contacts with a Tag or “Number 1” that is NOT in stages A, B. or C .

If I am understanding it correct, currently i would have to write it as:

Tags Include “Number 1” and Stage != ‘A’
OR
Tags Include “Number 1” and Stage != ‘B’
OR
Tags Include “Number 1” and Stage != ‘C’

Which is very wasteful.

My request is that we be able to group the filters as:

'Tags Include ‘Number 1’
AND
{ Stage != ‘A’
OR
Stage != ‘B’
OR
Stage != ‘C’ }

1 Like

I’m experiencing the same struggle that Mautic is far far from user friendly when it comes to constructing segment filters.

A much more user friendly way is to do it, for example, like: QueryBuilder.js.org

image

Although the colors in the AND | OR selector need to be further apart from each other, I would go for grey and green (or blue).

That said, I would also love to be able to set an AND NOT filter so you can make something like

AND NOT Sent any mail (date) greater than or equal 2022-12-01 00:00

which is NOT the same as

AND Sent any mail (date) less than 2022-12-01 00:00

The NOT option is also available in the QueryBuilder, see the last 2 demo’s.

You can also take a look at my Bootstrap 5 and FontAwesome 6 compatible adjustments at: https://jsfiddle.net/golabs/wL0jgt2a

1 Like