Braze Delivery & Entry Types: Change Custom Attribute Value Deep Dive [Audience Before Trigger & Race Conditions]

Braze Delivery & Entry Types: Change Custom Attribute Value Deep Dive [Audience Before Trigger & Race Conditions]

What comes first, page 2 or page 3?

In Braze, page 3! Except for this one scenario.

Oh, and make sure to avoid Race Conditions. And no, I’m not talking about “Mostly Sunny” ☀️.

🗣️ WATCH FULL YOUTUBE VIDEO HERE 🗣

https://youtu.be/e4px1cWY2Ow

[Braze-mas 2023, Day 15]

What’s up everyone, my name is Allan, Founder and Consultant at For Now Marketing, and welcome to Day 15 of Braze-mas 2023!

Before we get started, if you have any questions, whether you are currently using Braze or considering using Braze, please feel free to reach out! You can find these addresses and more in the Youtube description below.

Change Custom Attribute Value

Today, we are actually going to spend some more time talking about the specific trigger: Change Custom Attribute Value. There are some additional, important information that we didn’t get to cover yesterday.

Let’s get started!

So here we are, on the Attribute Triggers Braze documentation, and there are two very very important statements, under the Change custom attribute value section:

1. “For change attribute, the trigger is evaluated first, then the audience criteria. This differs from the default behavior of audience criteria evaluated first, then trigger.”

Default: Audience Before Trigger

So let’s talk about these two sentences briefly, starting with the second sentence. “This differents from the default behavior of audience criteria evaluated first, then trigger”. We haven’t quite gotten to our 3rd page, the Target Audience page, yet, but one thing to note is that even though this is the 3rd page which comes after the 2nd page, Braze will evaluate the audience criteria BEFORE the trigger.

For example, if you want to look for users who have never made a purchase and want to send them a thank you campaign on their very first purchase, then you target an audience who has made exactly 0 purchases.

Your logical mind might want you to think that on page 2, I’m going to trigger my first purchase, and then on page 3, as a result, I would be at 1 purchase so we want to target users who have made exactly 1 purchase. However, this is not the case. Braze evaluates audience first, then the trigger.

Change Custom Attribute Value: Trigger Before Audience

However, going back to our first sentence now, it says “For change attribute, the trigger is evaluated first, then the audience criteria.” So it looks like there is one exception that when using the Change Custom Attribute Value trigger, we evaluate the trigger, before the audience.

Race Condition

And then the second statement from the documentation says:
2. “To avoid a race condition, ensure the attribute used as the trigger is not the same as the attribute used to qualify your audience.”

So we want to avoid using the same attribute for both the trigger and the target audience. For example, let’s say I want to congratulate a user on their 10th viewed_shoe_page. So I set the trigger here. And then just so I can be extra safe, I add the trigger on this page also.

According to Braze, this could cause a race condition, where two different data sources are “racing against each other”. For example, after the custom attribute viewed_shoe_page changes to 10 on page 2, Braze will then move on to page 3, and check that the user’s viewed_shoe_page custom attribute is equal to 10. However, it’s possible that this user’s custom attribute viewed_shoe_page isn’t quite updated fast enough to equal exactly 10 before Braze’s target audience evaluation happens.

So to avoid this scenario where our logic could fail only because the data wasn’t updated fast enough, Braze recommends not using the same attribute in both the trigger and the audience.

Thank you!

That’s it for Day 15. We will cover the remaining Action-Based triggers in our next video.

If you have any questions, please share them in the comments. We’re happy to help! 🙏

If you learned something from this video, please subscribe for more awesome Braze videos in the future!

Thank you for watching, and see you next time!

allan@fornowmarketing.com

fornowmarketing.com

Previous
Previous

Braze Delivery & Entry Types: Action-Based [Part 2]

Next
Next

Braze Delivery & Entry Types: Action-Based [Part 1]