SOLVED

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

Go to solution
AdeleBriggs
Level 2

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

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

1 ACCEPTED SOLUTION

Accepted Solutions
Michael_Florin
Level 10

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

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


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.

View solution in original post

4 REPLIES 4
Michael_Florin
Level 10

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

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


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.

AdeleBriggs
Level 2

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

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 - Community Moderator

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

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.

AdeleBriggs
Level 2

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

thank you for the clarification.