Segment builder - Order of operation | Community
Skip to main content
_Andy_
Level 2
March 30, 2023
Solved

Segment builder - Order of operation

  • March 30, 2023
  • 1 reply
  • 1487 views

Hi,

I can see there is documentation for Order of Operations in Trait Builder, does Segment Builder follow the same order of operations?

I would assume it does, but I can't find a page in Experience League that confirms this.

e.g. (Trait A) OR (Trait B) AND (Trait C) in segment builder would be logically equivalent to (Trait A) OR (Trait B AND Trait C) rather than (Trait A OR Trait B) AND (Trait C)

Thanks.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Hemang35

Yes, Segment Builder in Adobe Audience Manager follows the same order of operations as Trait Builder when evaluating multiple conditions within a segment. The order of operations is as follows:

  1. NOT
  2. AND
  3. OR

So, when you have a segment rule like (Trait A) OR (Trait B) AND (Trait C), it would be interpreted as (Trait A) OR (Trait B AND Trait C) due to the precedence of the AND operator over the OR operator.

To make the evaluation order more explicit, you can use parentheses to group the traits as needed. For example, if you want the evaluation to be (Trait A OR Trait B) AND Trait C, you would use the following configuration in Segment Builder:

((Trait A) OR (Trait B)) AND (Trait C)

I hope this clears up any confusion! If you have any further questions or need additional clarification, please don't hesitate to ask.

1 reply

Hemang35
Hemang35Accepted solution
Level 5
April 5, 2023

Yes, Segment Builder in Adobe Audience Manager follows the same order of operations as Trait Builder when evaluating multiple conditions within a segment. The order of operations is as follows:

  1. NOT
  2. AND
  3. OR

So, when you have a segment rule like (Trait A) OR (Trait B) AND (Trait C), it would be interpreted as (Trait A) OR (Trait B AND Trait C) due to the precedence of the AND operator over the OR operator.

To make the evaluation order more explicit, you can use parentheses to group the traits as needed. For example, if you want the evaluation to be (Trait A OR Trait B) AND Trait C, you would use the following configuration in Segment Builder:

((Trait A) OR (Trait B)) AND (Trait C)

I hope this clears up any confusion! If you have any further questions or need additional clarification, please don't hesitate to ask.

_Andy_
_Andy_Author
Level 2
April 10, 2023

Thanks for confirming @hemang35 !