Google Tag Manager

Forum Discussion

amyh's avatar
amyh
Collaborator
2 months ago

Using a catalog to populate a push based on date

Hi. 

I created a catalog in Braze with 3 fields:
id
title
preheader

The id column is a date yyyy-mm-dd

I then created a selection where id equals {{today}}

I followed Braze support to use this as my push message:

{% catalog_selection_items anchor today %}

{{ items[0].preheader }}

However, nothing is populating.  

Does anyone have a solution?

3 Replies

  • Try using code snippet like below:

    {% capture currentDate %}
        {{ "now" | time_zone: 'Australia/Sydney' | date: "%Y-%m-%d"  }}
    {% endcapture %}
    {% catalog_items my_catalog {{currentDate}} %}
    {{items[0].preheader  }} 

    This should work as we are using successfully.

    Make sure to update the time_zone to your environment's timezone.

  • Hi, if you are using liquid for {{today}}, please make sure to add the time zone that you're checking from.

  • eakinsey's avatar
    eakinsey
    Icon for Community Manager rankCommunity Manager

    Hmmmmm... the only thing that sprang to mind was verifying the catalog has entries for the current date? If there are no entries for {{today}}, the selection will return empty.