First Name Email Script Token | Community
Skip to main content
Matilda_Miglio
New Participant
April 16, 2018
Solved

First Name Email Script Token

  • April 16, 2018
  • 2 replies
  • 4352 views

Hi there,

I was referencing this thread: Conditional First Name Token

#if (${lead.FirstName} == "[Not Provided]")

there

#else

${lead.FirstName},

#end

I have built the above but am struggling to pull in a value. We have leads that have a first name of [Not Provided], and we'd like to say if we identify the first name as such, fill in "there" as the value, if not identified as [Not Provided] use the value that lives in the field.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by SanfordWhiteman

The code looks fine, though you don't need the curly braces and I recommend removing them (see Velocity ${formal.notation} invites syntax errors: use it wisely).

  • Do you have First Name checked off in the tree on the right-hand-side of Script Editor?
  • What do you see if you simply output $lead.FirstName?
  • Are you sure the case matches on both sides?
  • Are you testing with a real email, not Send Sample?

2 replies

SanfordWhiteman
SanfordWhitemanAccepted solution
New Participant
April 16, 2018

The code looks fine, though you don't need the curly braces and I recommend removing them (see Velocity ${formal.notation} invites syntax errors: use it wisely).

  • Do you have First Name checked off in the tree on the right-hand-side of Script Editor?
  • What do you see if you simply output $lead.FirstName?
  • Are you sure the case matches on both sides?
  • Are you testing with a real email, not Send Sample?
Matilda_Miglio
New Participant
April 16, 2018

Removed the curly brackets and it worked!

Thank you!

Josh_Hill13
New Participant
April 16, 2018

@Sanford Whiteman​