Solved

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

  • 30 April 2024
  • 3 replies
  • 34 views

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. 

icon

Best answer by Tiffany Darwish 1 May 2024, 22:36

View original

3 replies

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. 

HI Tiffany,

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

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

Reply