Some folks in your Marketo database have an Account Owner, some have a Person (i.e. CRM Contact-level) Owner, and some aren’t yet owned.

So how do you include the best-fit owner info — Account-level first, then Contact-level as a fallback — in an email?

One code-free way might be to use a Dynamic Snippet, tied to a Segmentation with non-empty Account Owner as the highest priority Segment. But this would consume one of your precious 20 Segmentations, so I don’t recommend it.

Far more lightweight is using a Velocity {{my.token}}. VTL can easily detect whether Account-level stuff exists or not (note in this case, nonexistent means an empty String rather than an explicit  null) and output accordingly.

Here’s all you need:

## @requires-tokens
##  [none]
##
## @requires-objects
##   Person ($lead) ## ## @requires-object-fields ## Person.Account Owner Email Address (Account_Owner_Email_Address) ## Person.Account Owner First Name (Account_Owner_First_Name) ## Person.Account Owner Last Name (Account_Owner_Last_Name) ## Person.Sales Owner Email Address (Lead_Owner_Email_Address) ## Person.Sales Owner First Name (Lead_Owner_First_Name) ## Person.Sales Owner Last Name (Lead_Owner_Last_Name) ## ## prefer Account_* info to Sales_* #if( !$lead.Account_Owner_Email_Address.isEmpty() )
Owned at Account level by ${lead.Account_Owner_First_Name}${lead.Account_Owner_Last_Name} &lt;${lead.Account_Owner_Email_Address}&gt; #elseif( !$lead.Lead_Owner_Email_Address.isEmpty() )