Hi, I am looking to set up an email using tokens. the problem I have is that the field in Salesforce is returning a value of 1 instead of the name of the field.
for example, I want the email to say thank you for purchasing brand1 - the field in salesforce for brand1 if they have purchased brand1 is 1.
What would the best way to approach this?
My thoughts would be to create a pick list field in Marketo and display the brand name desired if brand1 = true [1]. I haven't quite figured the logic yet.
Would there be a better way to approach this, I don't have the option to change the original field.
Thanks
Solved! Go to Solution.
This would be a use case for Dynamic Content. Dynamic Content can be done by Segmentation and Snippet or - and that could be the appropriate option here - by Script Token aka Velocity.
Take a look at this documentation to understand the basics, and then probably start with a simple script like this:
#if ($lead.brand1.equals("1"))
Brand 1
#else
Brand 2
#end
You can see the result of your scripts in personalized Email Preview or by sending test emails to yourself.
This would be a use case for Dynamic Content. Dynamic Content can be done by Segmentation and Snippet or - and that could be the appropriate option here - by Script Token aka Velocity.
Take a look at this documentation to understand the basics, and then probably start with a simple script like this:
#if ($lead.brand1.equals("1"))
Brand 1
#else
Brand 2
#end
You can see the result of your scripts in personalized Email Preview or by sending test emails to yourself.
Thank you Michael. I will have a go at this to see if I can get it to work. This is not something I've explored previously.
To be clear, Boolean fields work this way 99.999% of the time!
The value of the field will be integer 1
/0
, boolean true
/false
, or sometimes a stringified "true"
/"false"
or "1"
/"0"
.
The value won’t be the name of the field, except in very quirky circumstances like HTML Boolean attributes.
thank you for the clarification.