Allow spaces and blank merge tag defaults

Allow spaces and blank merge tag defaults

I want an email to begin like this:
Hello John,

If I don't have the lead name, I want it to begin like this:
Hello,

I tried using the following merge tag, which includes a space at the beginning of the name, so if the name doesn't exist, I don't get a space between "Hello" and the comma:
Hello{{ lead.First Name}},

But I get the following error:
mktLogicException: {{ lead.First Name}}: Token is not a valid token format

It doesn't seem possible to make spaces part of the token. Why not?

8 Comments
Anonymous
Not applicable
How about something like {{"Hello "lead.FIrst Name","}}? Our org wouldn't even want the "Hello " to show up if there's not a name.
Anonymous
Not applicable
You can create a Salutation formula field in Admin. If Name is not empty, then do this format. If Name is empty, then do this format. If Language is X, then format like this. etc..

This can be done today quite easily.
Anonymous
Not applicable
That's a good workaround, Adam. However, I'd rather not create fields or formulas for every scenario. It would be nice to do this from the merge tag itself, since the greeting language of different campaigns will vary.
Anonymous
Not applicable
George, I really like that solution!
Anonymous
Not applicable
FYI, Marketo does not permit adding "Hello" into the token. I tested this and received the below error message:


Error approving test.test tokens — {{Hello lead.First Name:default=edit me}}: Token is not a valid token format
Anonymous
Not applicable
Adam, how do you do that? Does that have to be done through SFDC? Custom fields don't seem to have that capability (at least in our sandbox)
Anonymous
Not applicable
Here are Marketo's instructions. You could also say, if Salutation is "Herr" then "XYZ German male", if Salutation is "Frau" then "XYZ German female", if Salutation is "Monsieur" then "XYZ French male" .... Certainly can do "IF First Name, is empty" then..
kh-lschutte
Community Manager
Status changed to: Open Ideas