What is the tie-break order between overlapping limits?
Atoti Limits compares two overlapping limits using the checks below, in order. The comparison stops at the first check that finds a difference. Each later check only applies when every earlier check is tied.- Higher precedence. The limit with the higher precedence value wins.
- Explicit match over wildcard match. A limit that matches the coordinate through an explicit member wins over a limit that matches through a wildcard. For example, a limit scoped to
Book = Awins over a limit scoped toBook = *. Both apply at the coordinateBook A. - Depends on which side of check 2 the comparison landed on. These are two mutually exclusive branches. A single comparison between two limits only ever takes one of them, never both:
- If both limits matched explicitly: a limit whose scope uses only “selected” types (“(For each) selected” or “(Total) of selected”) wins over a limit that uses an “excluding selected” type (“(For each) excluding selected” or “(Total) excluding selected”). See Advanced scopes for the scope types.
- If both limits matched only through a wildcard: the limit with more wildcard matches wins.
- Limit type. A
TEMPORARYlimit wins over anOFFICIALlimit. - The most conservative goal value. For a KPI evaluated as “greater than”, the lower limit goal wins, because it is more restrictive. For a KPI evaluated as “less than”, the higher limit goal wins.
Why does a “selected” limit win over an “excluding selected” limit?
A “(For each) selected” limit and a “(For each) excluding selected” limit can both be explicit matches for the same member. For example, consider two limits on theBook level, both valid for the coordinate Book = Book 1:
Book = [ Book 1 + Book 2 ](“(For each) selected”), goal 2000.Book <> [ Book 3 + Book 4 ](“(For each) excluding selected”), goal 1000.
Book 1 explicitly. The first limit matches because Book 1 is one of its listed members. The second limit matches because Book 1 is not one of its excluded members. Checks 1 and 2 end in a tie. Neither limit has a higher precedence, and both matches are explicit.
Because both limits matched explicitly, check 3 takes its “selected” versus “excluding selected” branch, not its wildcard-match-count branch. The wildcard-match-count branch never applies here, since neither limit matched through a wildcard. The first limit uses “(For each) selected”, so it wins over the second limit, which uses “(For each) excluding selected”. Without check 3, both limits would stay tied through check 4 too, assuming the same limit type. The comparison would then fall to check 5, the goal value. That check would pick the “excluding selected” limit’s lower, more conservative goal instead.
Why does a wildcard-scoped limit come last?
A wildcard match, such asBook = *, is the least specific kind of match a scope can produce. Check 2 already ranks every explicit match ahead of every wildcard match. Because of this, the wildcard-match branch of check 3 is never even reached when comparing an explicit match against anything: check 2 already resolved that comparison.
The wildcard-match branch of check 3 only runs when comparing two limits that both lack an explicit match at the current level, and it decides between them by counting wildcard matches. In practice, a wildcard-scoped limit is chosen only when no explicit match applies. This must hold for the same coordinate at the same or higher precedence.