Hello,
I am looking to see if I can send an email with specific dynamic content that is not in Marketo to 12 recipients.
Example: Email is all the same text except for 1 paragraph that contains a code specific for each of the 12 recipients. Is this possible? I tried to create a token script, but I was unable to match it to the specific email address of the recipient.
Dear so and so,
blah blah blah, please enter this 16 digit code xxxxx that is unique to you...
If a token is the correct way to go, how do I match that token to the lead in Marketo? Token A is dynamic to lead A.
Do I have to do this old school and send an email merge?
Thanks for your help!
Tara
One way I've done this in the past that is relatively quick is to create a re-usable field in Marketo specifically for projects like this. You can name is "Misc. Field #1" or whatever you decide. Then you can put together an excel doc with the 12 recipients and naming the column with the code "Misc. Field #1" so that when you upload the list into the campaign it will populate that field. Once you do that you can then token that field into your email. Might not be the proper way to do this but it does the job somewhat quickly.
Ah, yes. Didn't think of it that way. I agree, a quick easy way to get the job done!
Thanks Chris!
You could do it Chris's way, but there's no reason this wouldn't work in a Velocity script:
#if( $lead.Email == "firstaddy@grunk.com" )
First content
#elseif( $lead.Email == "secondaddy@henk.com" )
Second content
#elseif( $lead.Email == "thirdaddy@jonk.com" )
Third content
#else
Default Content
#end
Hi Sanford,
Im doing something similar but cant find if there is a "contains" operator rather than ==. I can get this to work on boolean fields but ideally want it to work on an if field contains basis.
I have 58 different pieces of info (product desc plus link) to include in an email and dont want to create 58 boolean fields.
Is that possible.
thanks
Mark
Sure, split the string on the delimiter (semicolons are traditional) and create a list, then you have .ontains(). To quote myself from a post yesterday:
#set( $indivValues = [] )
#foreach( $value in $lead.multiValuedField.split(";") )
#set( $tmp = $indivValues.add($value) )
#end
#if( $indivValues.contains("bird") )
bird is in the building
#end
Thank you so much. I think I have this working.
Cool! Inspiring a post on my blog, too, because it's such a perfect highlight (though you may not be thinking about it this way) of how you're really learning Java (and certainly not JavaScript) if you learn Velocity.
Im very keen to learn more.
In a few lines Ive just realise how powerful this could be.
Thanks again for your help. I was dead stop confused and have gone from telling a project team this isnt possible to transforming their response email.
Im hoping I can now include a link and some basic formatting to the inserted text and we are well away.
I am not too sure about the velocity script. I took Chris' suggestion.
The only problem I am having now is my csv upload. I receive an error that the data field basically isn't long enough to hold the code. Here is the exact description: "Value is greater than allowed for field". I have tried to locate more info on this but to no avail. I did not notice any section where I can input the 18 digit limit and assign it to the field.
Is there such a thing? is there a maximum?
Thanks for your assistance.
Tara