Skip to main content
Documentation for version v73

Recommendations for working with segments

Segments are a key tool for working with data in a CDP platform. The quality of selections, analytics, and marketing campaign launches depends on how they are configured. However, in practice, there are situations when a segment does not work as expected: it is not recalculated, not updated, or returns unexpected results.

To simplify troubleshooting, this article provides recommendations for working with segments.

Using the "NOT" condition with "OR"

When building a segment, a condition like the following is often set:

NOT (has active contract) OR NOT (verified)

At first glance, it may seem that this condition excludes all customers without a contract and without verification. In practice, it works differently: the segment will include all customers except those who simultaneously have both an active contract and verification completed.

This means that the condition excludes only those for whom both conditions are true at the same time, and not everyone who has at least one of them.

Recommendations:

  • If you need to select only customers who have neither a contract nor verification, use:
NOT (has active contract) AND NOT (verified)
  • To improve readability, always use parentheses and avoid long expressions with alternating NOT and OR.

Too many "NOT" conditions

Excessive use of negations in segmentation conditions complicates logic and increases the risk of errors.

NOT (in segment A)
AND NOT (in segment B)
AND NOT (in segment C)
AND NOT (in segment D)
...

Such constructions make rules harder to understand and maintain. In addition, recalculation performance decreases — each negation requires additional checks.

Recommendations:

  • Do not exceed 2–3 consecutive NOT conditions without a strong reason.

  • Whenever possible, replace a set of "NOT" conditions with a single positive rule. Instead of listing where an object should not be, it is better to describe where it should be.

  • Document segmentation rules: specify why each negation is added. This will help avoid situations where one of the conditions becomes outdated and the logic remains overly complex.

Incorrect action selection when recalculating a segment

The segmentation interface provides two different buttons with similar "refresh" icons:

  • The button in the top panel — launches segment recalculation. When used, the segment composition is updated, i.e., the participant list is recalculated based on the specified conditions.

  • The button in the "Statistics" block — updates only the displayed metrics ("Total", "Weekly growth"). This button does not trigger segment recalculation.

Because of the identical visual marker, users often click the button in the Statistics block expecting the segment to be recalculated.

Recommendations:

  • To recalculate a segment, use the top panel button.

  • Use the button in the Statistics block only to update numeric indicators — it does not affect segment composition.