AnsweredAssumed Answered

Email script - simpler way?

Question asked by Charles Sanderson on May 2, 2016
Latest reply on May 3, 2016 by Grégoire Michel

I'm trying to create an email script to build a signature based off lead owner fields that may not always be set (too early in marketing to be assigned). I tried a simple if/else loop and it didn't work. I checked out some of the ifnull syntax I found on the Velocity site, but they weren't working for me. Based off somebody else's conversation string in this community, I came up with something that works, but it just seems like the most un-elegant way to do this, when I'm going through multiple items. Maybe somebody with Velocity/Marketo experience knows how I can trim this down?

 

 

## First name

#set( $lo_firstname = ${lead.Lead_Owner_First_Name} )

#set( $blank = "" )

 

#if ($lo_firstname == $blank)

<!-- alternate content or nested if/else statement to pull by region, etc -->

#else

   <span style="color:#104f6e;font-size:1.2em;"><strong>$lo_firstname</strong></span>

#end

 

## Last name

#set( $lo_lastname = ${lead.Lead_Owner_Last_Name} )

#set( $blank = "" )

 

#if ($lo_lastname == $blank)

<!-- alternate content or nested if/else statement to pull by region, etc -->

#else

<span style="color:#104f6e;font-size:1.2em;"><strong> $lo_lastname</strong></span>

#end

 

## Job Title

#set( $lo_title = ${lead.Lead_Owner_Job_Title} )

#set( $blank = "" )

 

#if ($lo_title == $blank)

<!-- alternate content or nested if/else statement to pull by region, etc -->

#else

<span style="color:#4e4e4e;font-size:1.2em;"> | $lo_title</span>

#end

Outcomes