How to Create a Purchase-Driven Email — Thread the Needle with Braze

Out: generic, batch & blast emails.

In: Precision-targeted, highly dynamic emails that resonate with each audience segment and drive engagement and conversions.

With Braze features like event properties, dynamic UTMs, and Catalogs, marketers can leverage a customer’s purchase history to craft the hyper-personalized messaging that helps them stay competitive. 

In this episode of Thread the Needle, Kaleigh Porter, Solution Architect at Stitch, walks through the process of building a purchase-driven email, including:

  • Understanding Message Extras
  • Using Dynamic UTMs for Enhanced Reporting
  • Creating a Priority Content Catalog
  • Incorporating Dynamic Elements into Messaging
  • Testing and Previewing Dynamic Content

Transcript

Hi, my name is Kaleigh Porter and today I'll be talking about building purchase-driven emails dynamically in Braze. Today we'll talk about the first thing, dynamic email reporting and ensuring you have the reporting mechanism set up to support this type of work in Braze. We'll talk about how we use event properties to drive the audience prioritization for the type of email that we'll get, and then we'll talk about also the content catalog that's used to drive this type of work. 

So I like to start with the end in mind. If we're going to do something like this, we have to be able to report on it to know where we're successful.  So the first component here is Message Extras. If you haven't worked with those yet, Message Extras are special values you can assign using Liquid in a Braze message.

And they essentially add additional context to your back-end engagement data that comes from Braze. If you use message extras at the time of sending, those get attached to that back-end reporting so that you're able to understand more information about a particular send, from the time it was sent.

So you can use event properties or if a user has an attribute value that's regularly changing, then you might want to use a message extra so you can understand more about that send. These are available in the current data or if you use something like Snowflake data share, you'll see it in those tables as well.

One example is if you want to know which loyalty tier your customers are in at the time they received a message, then you can include that as a message extra and then you'll be able to see that in your data.  Adding message extras is really easy in Braze. You can use the liquid personalization, I call it the liquid helper, where it goes in and helps you build things.

So first you'll go in and grab the custom attribute that you would like to append and save that value. And then go in a second time, there's a message extras personalization type. You'll give it a key name, so loyalty tier, and then, fill in the value that you grabbed from your custom attribute previously, and that will give you a liquid snippet that you can use to insert into your messages.

So with that, we're saying message extras, the key is the tier, and the value is the tier. And that will be appended to your messages.

Once you've done that, you can run some queries. There is a query builder tool in Braze that you can use to test this, but you'll also probably want to work with your data team to access and support building custom reports for your use case.  And just as a quick example here, this is a, what a table might look like, here you have the different, elements here, Canvas name, variant, et cetera.

In my case here, this dynamic version is what is really special about this. Because all of these are touch one, they're all part of the same Canvas. I do have two variants in this example, but really what we're looking at is being able to tell the difference between product families A, B, and C.

In the Braze dashboard, those other layers, or granularities of this report would be available in the dashboard already. Canvas name, variant, and touch number. But what we wouldn't have unless we sent it as a message extra would be this product family that we'll be talking about more today. And then, of course, all of those roll-ups, sent, open rates, click rates, etc. 

The second thing to talk about here is dynamic UTMs.  In the work I've done, we've used the same value that we would pass as a message extra. We've added that as a dynamic UTM as well, that way reporting tools such as Google Analytics will also have the same level of context that we're attaching to the engagement data in Braze.

And then if you are using your site analytics for things like sessions, conversions, and revenue attribution, now by sending this value as a link parameter, you'll also have the ability to join engagement data with revenue and conversion tracking from your website to have a really holistic report on each of these variations.

So link templates for email are a functionality. If you don't have it turned on, you can talk to your Braze representative to get that turned on. But link templates are a way to append UTM parameters to every single link that is in an email. So the previous version here, if you're doing something like campaign name, that's not dynamic.

But if you want to make it dynamic, you can add all this additional context to that value, which gives you more value in what you're reporting on. So here, that version, again, if we're doing a post-purchase onboarding campaign, we'll want to know if it's product family A, B, or C, so we're putting that here into the UTM parameter. 

All right, so now your analytics tool has that additional data and you can merge the reports. All right, so given that we have a method for reporting on these, we now want to actually build the campaign and assign our users. So, the first thing here to note is that we have really a mechanism for understanding purchase events. 

Some customers in Braze have already configured their out-of-the-box purchase events to be order-level. Other clients are actually sending purchase events to Braze at the item level. Both are really great ways to do it, but for this particular type of work, you may be more interested in a purchase-level event. So if you already have a purchase-level event or custom event, you're in good shape, move on to the next step. If you're using item level, then you may need to work with your data team to create a custom event or some sort of liquid script that can handle the data if it's at an item level.

But once you have a purchase-level custom event, or if your revenue events in Braze are already purchase-level, then you have what you need.  Next, you'll create a priority catalog. We'll show this a little bit more in the demo in just a moment. But the priority catalog will have things like your name, and how you're prioritizing them.

I like to create a default or fallback, some sort of generic content for users who are purchasing products that don't fit into my prioritized product families. And then you need to know which SKUs are for each audience group.  And then once you have your event and your catalog in the demo, we'll show this, you'll use a, essentially a loop, uh, with liquid scripting that takes the data from the custom event about the purchase details and compares that to your catalog with the prioritized audience information.

Then you can store that value on a user's profile as an attribute, and reference that in your emails to both facilitate the build of the email and the content of the email, but also to build those dynamic UTMs and message extras.

Alright, so now we're ready to bring it together. The content catalog is going to be an item that has all of the actual content for a message based on each audience. So rather than it just being the priority, this one will have things like subject lines, images, button, call to action text, as well as the links that a button may go to, body copy, colors, and everything you can think of that you may want to dynamically put into a message you can add to a content catalog. 

You'll also need an email liquid that pulls those catalog values based on the assignment for the user on their attribute profile. And then finally, the email that has those dynamic sections to pull everything together. So with that, we will move over to the demo. I'll show you a few assets in Braze that bring all of these concepts together and show a dynamic email.

  Okay, so now with all of our background, we're ready to kick off the demo here. So there are a few different assets we'll work with. The first is our audience priority catalog with the different audience names that we'll be using, the priority that they have, and the SKUs that are assigned to that type of product category.

We also have an active status so that we can turn priorities on and off without having to update the canvas itself.  The next is going to be how we set those users into their product. So we'll go over to the canvas and this would be the first step in your Canvas the content of this webhook or user update step is a few pieces here.

The first is assigning an order value. This is actually something in real life that would come from entry properties from your custom event where all of your order-level details are rolled up. The next is going to be a content block that specifically does the priority setting. Then, the actual payload is dynamically built to put the time and the version that the user was assigned to and update the user's profile.

So let's go over to the content block for just a moment.  Not this one.  And look at the priority content block just for a moment here. You'll see here that there's a lot of liquid. All this liquid is doing is taking the entry properties, and looping through all of the different properties that came, or all the different SKUs that came through in that custom event, and comparing them to the audience catalog that we just looked at.

At the end of this content block, that version will have been defined.  So then, we can go back to our canvas and test this with a few different values here. So for our preview and test, let's just grab any random user because we hardcoded for this test a different SKU. Here we can see that this user would be assigned Dairy because they had the HIJ SKU.

Next let's try somebody who would be assigned to the meat category,  and to do that we'll just change this value here to KLM.  Go back to preview and test and grab another random user,  and now here we can see that this person is assigned meat. Finally, let's go through what if somebody has purchased something from two different categories, which one will they get assigned?

So here we can do, let's do KLM, and then ABC, which should be a dairy item. Go back to preview and test one more time. 

Now this person is getting dairy, so even though they purchased something from both items and the first item that actually was in their payload was a meat item, dairy is a higher priority product for my business, so I will be sending them the dairy content.  Alright, and then I'm actually going to just copy this value so I can test it in just a moment.

I've got a few random test users in my account, so I'll just go ahead and send this and we can use it for the next step of the demo. 

All right, so the next step here is to bring that actually into a message. My demo account doesn't have the ability to send emails, so I built in an app message that I'd be able to actually save.  And what we have here is some additional liquid. The first part of this is a content assignment content block, and then you can see here I'm calling in different elements for different sections.

So this is the hero image. For the header, I use the subject line that I would have done in an email. Free header for the body, just for simplicity. The button text is actually going to be my CTA text value from another catalog, and then the main CTA is where this will link to. So to show you this other catalog, this is the content catalog.

This actually stores for all of my various audiences, the different elements of the email itself. So for dairy, there's a little cheese icon, special gift, generic,  meat, little meat icon. And then this could be truly something that's different for every single user. You'll see here for the images, I loaded a few images into Braze and I've just populated the URL uh there.

 the links are in my case, I just put the same link, as the image for the main CTA, just so it will click through to something. I don't have a real grocery website. And then, CTA text. Claim your gift, claim your gift,  claim your gift, and then claim your surprise for that other one. So all of this is dynamically built as well.

Okay, so now with my different elements, we can do a few different  previews. So for this first preview,  this test user has the dairy, and then I have an additional user who is set up with the meat content. So there you have the dynamic elements, for this, based on what they were assigned from their purchase details. So a few other things that we talked about are in terms of dynamic reporting that I want to fill in the gaps on here.

The first is the UTMs. So for, this being an in-app message, we can still add a UTM here if we want to. So I might do something like, question mark UTM campaign equals, and then I would want to include, first of all, the message level details. So there's a canvas attribute rather message.

 Insert personalization, that value is going to pull from here in that message one, but I also want to know how in that message one is doing for each of my different variants. So that's where I will pull in my additional layer of detail here. that includes the version they got.

So, I like to do two underscores between the elements of my UTM campaign value. So the next one here with the liquid personalization is the nested custom attribute. Our top level is going to be Thread the Needle campaigns. And then our attribute key will be the version that they were assigned. So I'll insert the personalization there.

And now we have this longer string. This URL isn't going to go anywhere right now for my test. So what I'm going to do is just replace my body briefly with this value instead, so that we can see what this will look like. So let's go back to our test one more time. And now we can see here, this says Step 2.

I haven't saved this campaign, so it still shows Step 2, but once I actually activate this, this will refresh, and the in-app message underscore 1 would be the first value here. All right, and then underscore meat to tell us which version they were part of. So that's the first component. And then if we were doing an email, we talked about link templates as being another component of this.

for link templates, we have an additional layer of email links. So let's just do a really generic email here. I'll do a blank template.  HTML editor and I'll grab this and then I'm actually going to remove all of this additional content here because we want this to come through as a link in the link template.

So to do that we have to add a tag and for a link template to work it does need to be in the body of an email.  So we will put it into the body of this basic email. One other thing that needs to be available is a question mark at the end of our link so that it knows to attach the link template.  So with that, we should be able to see that link here populating into our link management.

Here we can go and add our link template, which has the dynamic values. And if we click add, now we have that same value we just talked about, campaign name, underscore, underscore, and their version. So if we were to send this in an email, all of the links would be appended with the UTM campaign equal to that value. 

So with that, we now have the main components and the very last one we'll talk about is the message extras. Typically what I do for message extras is incorporate those into my loader blocks. So for that component here, This would be the content block for the content assignment. If you're using a content block for your assignment like I was all of this is baked into the in-app message we just looked at.

This is where you can add your message to ensure that it's appended to all campaigns. Message extras were just recently, added to the in-app message, and reporting, but all the other channels, email, et cetera, will have that. So to add a message extra, and we can actually use the liquid helper again, just to continue with that consistency is to go to the personalization window, go in here, there's an item called message extras. The key is going to be the UTM campaign. And then the value will be the same value that we've been working with,  where it is equal to the campaign name. 

There we go. The campaign name and the variant. So that message extra now will come through as part of the backend data for Braze for message engagement. So on email sends, there's going to be a message extra. That way you can create a custom report that has, by sending, not only the campaign that they were sent, but also at what variant they were sent.

Just to give you that full look at reporting on the Braze side for engagement. And then if you're also appending that UTM value to the links themselves, it would show up in your reporting tool like Google Analytics or Adobe.   

 All right, so bringing this all together, the sky really is the limit. Almost every part of an email can be dynamic. There is also a capability to use the drag and drop as you saw with the in-app message.  If you're building an email in Braze with the drag-and-drop functionality, you can also use the same tool. It doesn't all have to be HTML. If you just drag a liquid statement to the very top of your email, to do that content block assignment that we talked about in the in-app message, then every other element in the email, the images, the links, those types of drag and drop elements, as well as text and image and body copy, those can all be, used referencing the variable that you assigned without having to continue calling that content block. The only elements in an email that have to be set separate from the rest of the email body are the subject line and preheader. 

So you'll end up calling that same content block, three times in an email, once for the subject line, once for the preheader, and once for the body of the email in its entirety. If you're building other message types, SMS, in-app messages, or pretty much anything else, you actually need to call that content block that sets the value before you can use it in each of the individual items because those elements don't talk to each other the same way that an email does.  But the sky's the limit. Don't think just email. As you saw, we can also build other types of messages with the same functionality.

And also think about running a test. This catalog structure makes it easier to scale your products not only to different product families or new designs, but you can also do tests where all you're doing is comparing you know, image A versus image B. And you can set that up easily with a secondary content catalog or a lookup element in your existing content catalog that has those various values. 

So again, I hope you did enjoy this and got some good ideas for how you might enhance your marketing in Braze. 

You might also like...