Understanding how tag operators work is crucial for effective segmentation:
NOTIN
Operator: This operator excludes devices where the specified tag is set and its value is one of the values listed in the condition. Importantly, devices where the tag has never been set are not evaluated by theNOTIN
operator and will not be included in the segment simply because the tag is not set.NOTSET
Operator: This operator specifically targets devices where the specified tag has never been assigned a value.
Example Scenario:
If you want to send a message to users who either do not have the NotificationCategories
tag set to alerts
OR have never had the NotificationCategories
tag set at all, you would need a combination like:
(... AND (NotificationCategories NOTIN ['alerts'] OR NotificationCategories IS NOTSET))
Complex Filters with the API:
- For simple conditions using only
AND
logic or onlyOR
logic between all conditions, you can use the/createMessage
API method with theconditions
parameter. - For more complex filters that combine
AND
andOR
logic, or require nested conditions (like the example scenario above), you should use the/createTargetedMessage
API method. This method supports advanced filter expressions allowing you to precisely define your target audience across multiple tags and conditions.
Always ensure that the tags you are filtering on are being correctly set on your devices with the expected values.
Comments
0 comments
Please sign in to leave a comment.