AnsweredAssumed Answered

Can I use a my.token rich text as defined by a velocity script?

Question asked by Will Thomas on Jul 10, 2018
Latest reply on Jul 10, 2018 by Will Thomas

I'm trying to create a dynamic content email, where it will use one of a few different rich text my.tokens to populate the content based on variables.

I am defining the variables in one velocity token:

#define( $FocusArea1NoInterest )
{{my.FocusArea1NoInterest}}
#end
#define( $FocusArea1LowInterest )
{{my.FocusArea1LowInterest}}
#end
#define( $FocusArea1HighInterest )
{{my.FocusArea1HighInterest}}
#end

 

Then in the next token, I am using variables to determine which output to use:

 

#if (${lead.FocusArea1} == "High")
   #set ($Dynamic1Text0 = $FocusArea1HighInterest)
#elseif (${lead.FocusArea1} == "Low")
   #set ($Dynamic1Text0 = $FocusArea1LowInterest)
#else 
   #set ($Dynamic1Text0 = $FocusArea1NoInterest)
#end

 

Using these two I was able to make $Dynamic1Text0 output {{my.FocusArea1NoInterest}} into an email, but not the rich text contents of that my.token itself.  Is it possible to use the velocity here to actually pick which rich text my token to use?

Outcomes