inSegment

Checks if an individual belongs to a given segment.

NOTE
You can retrieve up to 100 segments.

The segment name must be a string constant. It cannot be a field reference nor an expression.

Segments are defined in the Adobe Experience Platform. The expression editor provides an autocompleted list of segments.

Segments can have three statuses:

  • existing: entity continues to be in the segment.
  • realized: entity is entering the segment.
  • exited: entity is exiting the segment.

Only the individuals with the Realized and Existing segment participation statuses will be considered as members of the segment. For more on how to evaluate a segment, refer to the Segmentation Service documentation.

IF inSegment('segmentName') == true means that you have a segmentMembership with the entered/existing status.

ELSE inSegment('segmentName') == false means that you have a segmentMembership of the exited status.

Category

Adobe Experience Platform

Function syntax

inSegment(<parameter>)

Parameters

Parameter
Description
Type
Segment
The segment name
<string>

Signature and returned type

inSegment(<string>)

Returns a boolean.

Example

inSegment("men over 50")

Explanation:

The function will return true if the individual within the journey instance is part of the Adobe Experience Platform segment named “men over 50”, false otherwise.

recommendation-more-help
4f4a00c1-77c9-4eee-84df-bbe6206c3ab9