How can I provide a default value for a token that also replaces a word it?

Anonymous
Not applicable

How can I provide a default value for a token that also replaces a word it?

I want the greeting in my email template to be "Dear {{lead.First Name}}". If there is no first name, I would like the greeting to be just "Hello". 

How can I do this? If I provide a default to lead.First Name, it will be appended to "Dear", but I want "Dear" to not display if there is no lead.First Name. 

Thank you!
Ann
Tags (1)
8 REPLIES 8
Anonymous
Not applicable

Re: How can I provide a default value for a token that also replaces a word it?

Edit the "Edit Me" copy in the token and voila, you create the default value.
Anonymous
Not applicable

Re: How can I provide a default value for a token that also replaces a word it?

Thanks for your help. Where is the "Edit Me" copy?
Anonymous
Not applicable

Re: How can I provide a default value for a token that also replaces a word it?

When you place the token in your document, like an email, you will see the token name followed by "=Edit Me}}". You can change that Edit Me portion to whatever you need it to be. Glad to help.
Anonymous
Not applicable

Re: How can I provide a default value for a token that also replaces a word it?

But I need the default value to replace the word that comes before the token as well. Do you know how that can be achieved?
Anonymous
Not applicable

Re: How can I provide a default value for a token that also replaces a word it?

You could create a custom field, something like "Greetings" and use a standard value of "Dear" in the data and then set the Edit Me to "Hello". That's one idea anyway.
Anonymous
Not applicable

Re: How can I provide a default value for a token that also replaces a word it?

I do not think you can achieve that using just default value for a merged field.
One way to do is to split your list in 2 smart lists. One with first names and one without first names. And send separate emails to these smart lists.
or
may be use dynamic text in the email.


Rajesh

Calvin_Lam
Level 4

Re: How can I provide a default value for a token that also replaces a word it?

Rajesh's solution is great.  I can't think of a better one.
 
If you want to be really fancy, you can use Email Scripting to check whether first name is null or empty string http://developers.marketo.com/documentation/email-scripting/

For your use case example though, it is probably not necessary unless you have something more complicated in the future. 
Anonymous
Not applicable

Re: How can I provide a default value for a token that also replaces a word it?

Another option is the use of a Formula Field. 

If First Name is not empty --> Dear {{lead.First Name}}

Default: Hi there

See screen with our Formula Field for a German salutation string:

0EM50000000R9hS.jpg