Google Tag Manager

Forum Discussion

TillaSennane's avatar
TillaSennane
Supporter
1 month ago
Solved

Action Path based on custom attribute

Hello, I have a custom attribute in my dashboard giving me the total number of people you're currently following (let's call it nb_following). I want to start sending communications as soon as users...
  • Nirnay's avatar
    1 month ago

    Hi TillaSennane​
    That’s a bit of a bummer with custom attributes 😅 In an Action Path you can only use “change to any value” or “change to exactly X”, so there’s no native way to check something like nb_following ≥ 10 or 50 when the attribute updates.

    Based on my experience, one workaround that works well is to convert the custom attribute change into a custom event, since custom event properties do support “greater than / less than” filters in action path. 

    Here’s the approach:

    --> Create an action based canvas that triggers whenever the custom attribute nb_following changes to any value. 
    -->In that canvas, add a Webhook step.

    The webhook calls Braze’s /users/track endpoint to fire a custom event such as followers_count.

    Pass the current nb_following value as an event property.

    You’ll need to create an API key in Braze with permission to track users and events, and use it in the webhook’s Authorization header.

    Example webhook call:

    POST https://{{instance_url}}/users/track

    {
      "events": [
        {
          "external_id": "{{${user_id}}}",
          "name": "followers_count",
          "properties": {
            "nb_following": "{{custom_attribute.${nb_following}}}"
          },
          "time": "{{${time}}}"
        }
      ]
    }

    Once this is in place, you can use the followers_count custom event as your entry trigger or within an Action Path, apply basic nester property filters like nb_following ≥ 10, and then manage your 4 day logic cleanly inside the current canvas.

    Setup and testing should take less than a couple of hours if you’re already familiar with webhooks in Canvas, based on my experience.

    Also, if the Action Path needs to sit after a communication is sent or you have multiple steps in the same canvas, this is probably the best solution since it keeps everything within Canvas and works around the custom attribute limitations. 

    Hope this helps! 

    EDIT: Please note every single custom event count towards a single data point.