when a field is showing a value of 0 or 1 what is the best way to add a description? | Community
Skip to main content
Level 2
April 23, 2025
Solved

when a field is showing a value of 0 or 1 what is the best way to add a description?

  • April 23, 2025
  • 1 reply
  • 881 views

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

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

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.

 

https://experienceleague.adobe.com/en/docs/marketo/using/product-docs/email-marketing/general/using-tokens/create-an-email-script-token


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.

1 reply

Michael_Florin-2
Michael_Florin-2Accepted solution
Level 10
April 23, 2025

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.

 

https://experienceleague.adobe.com/en/docs/marketo/using/product-docs/email-marketing/general/using-tokens/create-an-email-script-token


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.

AdeleB1Author
Level 2
April 23, 2025

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.

SanfordWhiteman
Level 10
April 23, 2025

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.