You will find below a reminder of how the filters work according to the type of your attributes to help you write your JSON scripts.
Feel free to read this large preamble about JSON audiences and structure before reading this : https://faq.quable.com/en/articles/6803910-how-does-the-audiences-administration-work
Filter on integer or decimal attribute:
example:
“attributes.millesime[]” : 2008
Filter on text attribute:
example:
“attributes.ean-bottle[]” : “3510804702668"
Filter on a boolean attribute:
example:
“attributes.online[]” : 1
Filter on select or multi-select attribute:
example:
“attributes.color__codes[]” : “red_color”
red_color is the code of the "Red" value of color attribute
Depending the attribute type, their combination will work as a AND or a OR:
2 filters on different attributes work as AND
example:
"attributes.millesime[]" : 2008,
"attributes.ean-bottle[]" : "3510804702668"
2 filters on the same attribute (with the [] notion) work as OR
example using [] :
"attributes.millesime[]" : [2021,2022]
In the example below, only the value 2022 will be taken into account
"attributes.millesime[]" : 2021,
"attributes.millesime[]" : 2022,
Finally, if you broadcast several document types, but you'd like to exclude one of them from some audiences (user types), we recommend you to use an impossible value:
example :
"attributes.millesime": 9999
To know more, consult our online documentation:
Key words: JSON, filters, audiences, portal