Skip to main content
Solved

Using objects and arrays of objects as traits in email editor (Broadcast)

  • April 30, 2024
  • 3 replies
  • 79 views

Forum|alt.badge.img+2

Can we use custom traits of data type objects and array of objects in email in Engage? 

For example - consider these traits - last_car_plan_selected (object type), list_car_policies (array of object type) 

Now, when I try using these objects in the email in a broadcast - I have used the traits as appearing in merge tags -  

  1. {{ profile.traits.last_car_plan_selected.name }}, 
  2. {{ profile.traits.last_car_plan_selected.premium }}, 
  3. {{ profile.traits.list_car_policies.$.items.policy_start_date }} etc. 

When this email comes from Segment, the values are blank when infact these traits have specific values in user profiles. I tried using different formats of this using liquid js but it seems nothing works. 

Best answer by Tiffany Darwish

Hi Saurabh,

Broadcast templates don't currently support nested traits. You would need to flatten those nested parameters out as Trait to get that to work in liquid. 

3 replies

Tiffany Darwish
Segmenter
Forum|alt.badge.img+3

Hi Saurabh,

Broadcast templates don't currently support nested traits. You would need to flatten those nested parameters out as Trait to get that to work in liquid. 


Forum|alt.badge.img+2

HI Tiffany,

Thanks for your response. You mentioned broadcast templates, so does that mean journeys support this?


Tiffany Darwish
Segmenter
Forum|alt.badge.img+3

Yes, the content editor in Journeys does support nested traits.