SOLVED

Dynamic content

Go to solution
Yash
Level 4

Dynamic content

Hello folks, we have an email that needs to be dynamic. We are hoping that one section of the email copy will vary depending on the industry field of the prospect. For example, if Jane Doe is in sales she will receive different body text vs John Smith who is marketing.

I did go through a couple of other posts with regards to this but could not take it to the finish line. I have already created a segment in Marketo and struggling to add it in the email as I build emails using custom HTML & CSS.

 

I am more used to the following approach while using other marketing automation platforms but unsure if Marketo would support something like the following:

 

if industry_vertical=="sales"

serve this block of content

 

else if industry_vertical=="marketing"

serve this block of content

 

else

serve this block of content(default)

 

endif

 

Any advice would be greatly appreciated. Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
Michael_Florin
Level 10

Re: Dynamic content

https://docs.marketo.com/display/public/DOCS/Create+an+Email+Script+Token

Sanford in action here: https://events.bizzabo.com/adobeskillexchange/agenda/session/491289

 

And here's a simple script example from our instance:

 

## if empty or US, display Boston
#if( $lead.Temp_Country__c.isEmpty() || $lead.Temp_Country__c.equals("us") )
LogMeIn USA, 333 Summer Street, Boston, MA 02210
#elseif( $lead.Temp_Country__c.equals("BR") )
LogMeIn Consultoria e Serviços de Informática Ltda., Rua Joaquim Floriano, No. 243, suite 113, Itaim Bibi, 04543-010 São Paulo-SP, Brazil
#elseif( $lead.Temp_Country__c.equals("GB") )
LogMeIn Technologies UK Limited, Ramillies Buildings, 1-9 Hills Place, Westminster, London W1F 7SA United Kingdom
#elseif( $lead.Temp_Country__c.equals("AU") )
LogMeIn AUS Pty Ltd., 20 Martin Place, Levels 19 & 20, Sydney, NSW 2000, Australia
## all other countries, display Ireland
#else
LogMeIn Ireland Limited, Bloodstone Building Block C, 70 Sir John Rogerson’s Quay, Dublin 2, Ireland
#end

In our case it's a Temp Country field that dictates the various text block insertions. In your case that would be your Industry field. What the token outputs can be just a single line of text - as in this example - but also huge blocks of HTML. Depends on your email setup.

 

Hope this helps. You'll find code snippets of Velocity all over this board. Mostly from Sanford. 🙂

View solution in original post

7 REPLIES 7
Amit_Jain
Level 8 - Community Advisor

Re: Dynamic content

Hi @Yash

 

This is possible in Marketo. To make this happen, what you have to do is, you have to first create segmentation in Marketo. Keep in mind that terminology Segmentation has a specific meaning and use cases in Marketo. You can create a segmentation by navigating to Lead Database, Segmentation and then replace specific email sections with dynamic content. 

 

Check out this video by @Joe_Reitz to learn more.

https://www.youtube.com/watch?v=TYwHdKKzsdM

 

Michael_Florin
Level 10

Re: Dynamic content

And if that "if", "elseif" and "else" logic is what you're familiar with or your email design doesn't really fit the segmentation/snippet approach, take a look into Email Scripting. Velocity can certainly be a great solution for creating dynamic content in emails.

Yash
Level 4

Re: Dynamic content

@Michael_Florin would you please provide me the syntax that outlines the use case please. Velocity script is new to me and any guidance would be much appreciated. Thank you in advance.

 

CC: @SanfordWhiteman 

Michael_Florin
Level 10

Re: Dynamic content

https://docs.marketo.com/display/public/DOCS/Create+an+Email+Script+Token

Sanford in action here: https://events.bizzabo.com/adobeskillexchange/agenda/session/491289

 

And here's a simple script example from our instance:

 

## if empty or US, display Boston
#if( $lead.Temp_Country__c.isEmpty() || $lead.Temp_Country__c.equals("us") )
LogMeIn USA, 333 Summer Street, Boston, MA 02210
#elseif( $lead.Temp_Country__c.equals("BR") )
LogMeIn Consultoria e Serviços de Informática Ltda., Rua Joaquim Floriano, No. 243, suite 113, Itaim Bibi, 04543-010 São Paulo-SP, Brazil
#elseif( $lead.Temp_Country__c.equals("GB") )
LogMeIn Technologies UK Limited, Ramillies Buildings, 1-9 Hills Place, Westminster, London W1F 7SA United Kingdom
#elseif( $lead.Temp_Country__c.equals("AU") )
LogMeIn AUS Pty Ltd., 20 Martin Place, Levels 19 & 20, Sydney, NSW 2000, Australia
## all other countries, display Ireland
#else
LogMeIn Ireland Limited, Bloodstone Building Block C, 70 Sir John Rogerson’s Quay, Dublin 2, Ireland
#end

In our case it's a Temp Country field that dictates the various text block insertions. In your case that would be your Industry field. What the token outputs can be just a single line of text - as in this example - but also huge blocks of HTML. Depends on your email setup.

 

Hope this helps. You'll find code snippets of Velocity all over this board. Mostly from Sanford. 🙂

Yash
Level 4

Re: Dynamic content

This is awesome and truly helpful! Thanks @Michael_Florin 

Lastly, if I were to look for contains as the matching operator what would the comparison operator look like. For instance, industry vertical contains 'health' so that it would match 'healthcare' as well as 'health and wellness'. Thanks again.

Michael_Florin
Level 10

Re: Dynamic content

Sorry, I can't help any further. No you have to descend into the depth yourself. 🙂

 

https://stackoverflow.com/questions/13229377/checking-if-a-string-contains-a-particular-substring-in...

Yash
Level 4

Re: Dynamic content

My apologies, yes I should have digged into this by myself. Thanks for all your help @Michael_Florin