Google Tag Manager

Forum Discussion

reentry's avatar
reentry
Influencer
3 months ago
Solved

How to Filter Multiple Values in a String Field (e.g., Product Categories)?

Hello everyone, I’m currently working with a string field called Product Categories, which can have multiple values like Music, Metal, and Festival. My goal is to select 3 random products from the c...
  • reentry's avatar
    3 months ago

    Hello Arso,

    Thanks for your input—I had a similar thought, but I’ve found a solution that works perfectly.

    It turns out Braze handles this in a rather peculiar way, but it works:

    When you create a field in a catalog via the API, you can set the type to "ARRAY". This enables the use of the operator "Include Value". Interestingly, this option is only available if the field is created via the Catalog API, and I’m not sure why that’s the case.

    I discovered this while reading the documentation on creating selections via API:
    Create Catalog Selections API

    Here’s my workflow:

    • I create the field via the API.
    • Then, I upload a CSV file with the data (next step: automation).

    The data in the array field looks like this:
    ["value1", "value2", "value3"]

    Hopefully, this solution can help someone else as well!