Hello! I need help understanding where i'm going wrong with my conditional messaging.
Is it possible to search and dynamically pull a specific value from a nested profile using Liquid code in a Braze email?
Example: Users have a nested custom attribute called 'Colour'. User 1 is associated with two profiles: Company A (nested profile [0]) and Company B (nested profile [1]). The value of 'Colour' for Company A is 'Green', while for Company B it is 'Purple'. How can I dynamically retrieve the 'Colour' value for a specific company (e.g., Company A)?
Note: I haven't used [] indexing as I want to look across all associated profiles per user to filter down for the correct value (example above).
And the testing code:
{% assign found = false %}
{% for Partner_Name in custom_attribute.Profiles %}
{% if Partner_Name == "Onsi" %}
Your partner ID is {{custom_attribute.${Profiles}.Partner ID}}.
{% assign found = true %}
{% endif %}
{% endfor %}
{% unless found %}
You do not have a partner ID associated with this account.
{% endunless %}
Thank you for any help or suggestions you have!