Forum Discussion
How to Use the standard user attribute in the Connected audience object filter
Hi st-haingo! I think I can help here. Yes, you can use standard user attributes in the Connected Audience Object filter in Braze. While the documentation primarily highlights custom attributes, standard user attributes - for example, country - can also be utilized in your audience filters.
LIQUID
{% assign country_filter = {
"user_attribute": {
"attribute_name": "country",
"comparison": "equals",
"value": "VN"
}
} %}
In this Liquid code snippet, we create a variable called country_filter that holds the JSON structure for the audience filter. You can then use this variable in your API call or wherever you need to reference the filter.
JSON
To create a filter using a standard user attribute, you would structure your filter like this:
{
"user_attribute": {
"attribute_name": "country",
"comparison": "equals",
"value": "VN"
}
}
In this example, the user_attribute object is used to specify the standard user attribute you want to filter on, along with the comparison type and the value you're targeting.
Make sure to replace "country" with the actual name of the standard user attribute you want to use, and adjust the comparison and value as needed for your specific use case.
I hope that helps! If so, please take a second to mark this answer as the solution. Thank you! 🙇♀️
Related Content
- 10 months ago
- 8 months ago