Understanding how tag operators work is crucial for effective segmentation:
NOTINOperator: 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 theNOTINoperator and will not be included in the segment simply because the tag is not set.NOTSETOperator: 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
ANDlogic or onlyORlogic between all conditions, you can use the/createMessageAPI method with theconditionsparameter. - For more complex filters that combine
ANDandORlogic, or require nested conditions (like the example scenario above), you should use the/createTargetedMessageAPI 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.