Ability to combine AND and OR in segments | Community
Skip to main content
Level 3
May 30, 2025
New

Ability to combine AND and OR in segments

  • May 30, 2025
  • 3 replies
  • 3095 views

Description - it would be great to have the ability to combine AND and OR logical operators in segments/ filter.

 

Why is this feature important to you - let me bring an example here. I work in the education industry and we are responsible for communicating students about a variaety of subjects. For the businesses teams, technical details are irrelevant, they just want to see how communications are performing (note that we use AJO). For example, enrollment team wants to see enrollment results. Therefore, I would like to develop a CJA report with a segment like (Campaign Name contains enrollment OR Journey Name contains enrollment OR customActionJourneyName contains enrollment) AND not test event AND Journey Name does not contains count.

 

Two important notes here:

1. we currently use SMS as custom action. So the journey name for SMS is stored in a non-native AEP dataset. For AJO emails, journey name is stored in ajo_entity_dataset normally. In this situation, I am unable to create a derived field to combine the names, since three looks up would be needed to achieve such a result, which at this moment is not possible.

 

2. journey count. We started working with AJO recently. Since we are still learning how to work with AJO and there has been some delays with data ingestion and audience evaluation, we sometimes create journeys with no actions, just to confirm the evaluation is correct.

 

How would you like the feature to work - I would like to have the ability to combine AND and OR logical operators in segment builder in CJA. 

 

Current Behaviour - currently, segments only accept AND or OR as operators, even if you have different containers. You either use condition1 AND condition2 AND condition3; or condition1 OR condition2 OR condition3.

3 replies

Josh Stephens
Community Advisor
Community Advisor
May 30, 2025

Hi @filipefreitas if I'm understanding your suggestion correctly, it is possible. You can use both AND & OR, but you have to use different containers. Here's an example. 

In the top container I'm using or. In the second container I'm using and. Between the two I'm using and

I can change any of them but the operators in the same container will also change.

 

Level 3
May 30, 2025

Hi Josh!

 

I was clearly doing things wrong. Thank you very much indeed for bringing the solution. It really helped me.

 

Highly appreciated!

 

All the best!

Filipe

 

 

Josh Stephens
Community Advisor
Community Advisor
June 2, 2025

Awesome, glad it was helpful @filipefreitas !