Dynamic content | Community
Skip to main content
New Participant
March 30, 2021
Solved

Dynamic content

  • March 30, 2021
  • 2 replies
  • 7478 views

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

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 Michael_Florin-2

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. 🙂

2 replies

Michael_Florin-2
New Participant
March 30, 2021

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-3Author
New Participant
March 30, 2021

@michael_florin-2 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-2
Michael_Florin-2Accepted solution
New Participant
March 30, 2021

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. 🙂

Amit_Jain
Community Manager
March 30, 2021

Hi @yash-3

 

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