SOLVED

Velocity script - use greeting only when first name is known

Go to solution
kfeigeles
Level 1

Velocity script - use greeting only when first name is known

I am trying to use the first name token in my emails but have a custom script that eliminates the greeting when the first name of the record is not known. how would that custom script be written?

1 ACCEPTED SOLUTION

Accepted Solutions
SanfordWhiteman
Level 10 - Community Moderator

Re: Velocity script - use greeting only when first name is known

Remember to search first. There are tons of past posts on subjects like this.

 

In this case it’s as simple as:

#if( !$lead.FirstName.isEmpty() )
Hello ${lead.FirstName},
#end

 

View solution in original post

1 REPLY 1
SanfordWhiteman
Level 10 - Community Moderator

Re: Velocity script - use greeting only when first name is known

Remember to search first. There are tons of past posts on subjects like this.

 

In this case it’s as simple as:

#if( !$lead.FirstName.isEmpty() )
Hello ${lead.FirstName},
#end