Ragnarok logo

Configuring Nested Attributes

Your growth marketing partner! Ragnarok’s technical and strategic skill set blends with our marketing expertise to deliver scalable and personalized outcomes across all marketing channels through the optimization of a modern Martech stack. As a key partner, we have successfully implemented and run Braze programs for over 150 clients since 2017.

Traditionally, nested objects, or arrays of objects as they are also known, was a challenging concept to incorporate into legacy marketing automation platforms; as data use cases have gotten more complex, we’ve seen more modern tools, like Braze, support new data types to enable more flexibility in the data integration. 

One of the common ways to articulate a categorical list of items is to use nested objects, as it enables a match against the entire concept for segmentation use cases while also enabling a personalized display. This covers a variety of industries, such as having multiple items in a cart, a list of favorites, multiple pets, etc. Historically, these would have been named things like “pet1_name, pet1_age, pet1_breed,” however under the nested object structure, they can be incorporated under a single entity called “pets” and each object would contain a list of attributes that make up each pet. You can also apply this concept for a favoriting books, such as in the example below:

Entity: favorite books

Attributes: title, author, published_year
JSON:
{
“favorite_book” : [{
“title” : “The Hobbit”,
“author” : “J.R.R. Tolkien”,
“published_year” : 1937
}, {
“title” : “The Sun Also Rises”,
“author” : “Ernest Hemmingway”,
“published_year” : 1926
}] }

The advantage to this is you can now segment just one attribute, favorite_books, and return back a match for segmentation without needing to look through an individual set of attributes. So, if I wanted to pull a list of users who had a favorite book before 1930, I could simply write in my Braze segment nested custom attributes > favorite_book.published_year < 1930

It gets even better.

Braze has the ability to specifically look at a single object in the nested array to match multiple attributes represented in one of those objects.

Typically, segmentation tools will look at and match on ANY attribute represented in ANY object. This means if you only want to look at favorites that were added within the last six months AND were published before 1930, you wouldn’t be able to do that as the segmentation filter would simply find an added date, then a published_date, even if they were represented in two separate objects in the array. 

In Braze, you can actually look at just attributes in one object, so to solve that use case above, let’s say my JSON now looks like this:

{
“favorite_book” : [{
“title” : “The Hobbit”,
“author” : “J.R.R. Tolkien”,
“published_year” : 1937,
“date_favorited” : “2023-01-25”
}, {
“title” : “The Sun Also Rises”,
“author” : “Ernest Hemmingway”,
“published_year” : 1926,
“date_favorited” : “2022-10-05”
}] }

As of the publish date of this article, if you wanted to match segments of users who, in the last six months, added a favorite book that was published before 1930, Braze would accurately NOT return this user because the book they favorited was published in 1926, and was favorited more than a year ago.

Interested in learning more about how to better use Nested Attributes for your Braze campaigns?

About Braze

Braze is a solution that empowers growth marketers to optimize consumer digital experiences, utilizing data to increase revenue and enhance customer retention. It facilitates efficient management of customer data, content, and engagement across various channels while providing insights into campaign effectiveness.

Facebook
Twitter
LinkedIn