SOLVED

Re: Customize Email Tokens

Go to solution
Huihsing_Kiang3
Level 4

Customize Email Tokens

Hi all,

Quick question. We're switching from marketing cloud to Marketo. One of my colleagues are asking which tokens to use to replace this one pulled from marketing cloud:

Dear %%[IF NOT EMPTY(Salutation) THEN]%% %%Salutation%% %%[ELSE]%% Dr.%%[ENDIF]%% %%LastName%%

I do not think Marketo tokens can replicate this one above? The closest possible solution I can think of is a dynamic content?

Your thought is welcome.

Thanks,

Huihsing

1 ACCEPTED SOLUTION

Accepted Solutions
SanfordWhiteman
Level 10 - Community Moderator

Re: Customize Email Tokens

You certainly can do this with a Velocity ("Email Script") token -- and so much more it will blow your mind. You need to search the Community for "Velocity" and also read the seminal posts at https://blog.teknkl.com/tag/velocity (while Velocity is a standard template language not unique to Marketo, these are the only Marketo-specific deep dives in existence).

In this particular case the Velocity equivalent is:

Dear ##

#if( !$lead.Salutation.isEmpty() )

${lead.Salutation} ##

#else

Dr. ##

#end

${lead.LastName}

But you should familiarize yourself with the wider world of Velocity rather than concentrating on only this one need.

View solution in original post

5 REPLIES 5
SanfordWhiteman
Level 10 - Community Moderator

Re: Customize Email Tokens

You certainly can do this with a Velocity ("Email Script") token -- and so much more it will blow your mind. You need to search the Community for "Velocity" and also read the seminal posts at https://blog.teknkl.com/tag/velocity (while Velocity is a standard template language not unique to Marketo, these are the only Marketo-specific deep dives in existence).

In this particular case the Velocity equivalent is:

Dear ##

#if( !$lead.Salutation.isEmpty() )

${lead.Salutation} ##

#else

Dr. ##

#end

${lead.LastName}

But you should familiarize yourself with the wider world of Velocity rather than concentrating on only this one need.

JD_Nelson
Level 10 - Community Advisor

Re: Customize Email Tokens

Sandy - are they having you teach a Velocity class for University Day at Summit 2019, yet!? I will book front row seats if they do!!

SanfordWhiteman
Level 10 - Community Moderator

Re: Customize Email Tokens

Oh man, that would be fun. It's just so Rounding an integer to the nearest 100 or 1000 sometimes, my "Don't worry, you're gonna love this" opening number would have to be really amazing!

Huihsing_Kiang3
Level 4

Re: Customize Email Tokens

This is cool! Thanks a lot!

Jay_Jiang
Level 10

Re: Customize Email Tokens

Unfortunately there isn't as in-depth of a guide for Velocity as there is for AMP. Check here for starters though: developers.marketo.com/email-scripting/