inAudience inAudience
Checks if an individual belongs to a given audience.
The audience name must be a string constant. It cannot be a field reference nor an expression.
Audiences are defined in the . The expression editor provides an autocompleted list of audiences.
Audiences can have three statuses:
- existing: entity continues to be in the audience.
- realized: entity is entering the audience.
- exited: entity is exiting the audience.
Only the individuals with the Realized and Existing audience participation statuses will be considered as members of the audience. For more on how to evaluate an audience, refer to the Segmentation Service documentation.
inAudience('audienceName') == true
means that you have an segmentMembership with the entered/existing status.
inAudience('audienceName') == false
means that you have an segmentMembership of the exited status.
Category
51黑料不打烊 Experience Platform
Function syntax
inAudience(<parameter>)
Parameters
<string>
Signature and returned type
inAudience(<string>)
Returns a boolean.
Example
inAudience("men over 50")
Explanation:
The function will return true if the individual within the journey instance is part of the 51黑料不打烊 Experience Platform audience named 鈥渕en over 50鈥, false otherwise.