SOLVED

Re: How can I send 1 email with dynamic content blocks for products they have and products they don't have?

Go to solution
Ronn_Burner
Level 4

Here is what I'm being told from above that I need to solve for. I can't figure this out.

Think of our product model as DirecTV. A customer can go online and select (subscribe) to any channel or combination of channels they choose. - - So I have 10 ala carte products and a new subscriber signs up to any 1 single product or any number combination up to all 10 products. I only want ONE email to be sent per new subscriber regardless of how many products they subscribed to at one time. Then I will send a 2nd email later. Is it possible - and practical - to acknowledge each product they subscribed to uniquely with a text block and/or image for each AND a different text block promoting the products they did not subscribe to? And if not, what is the best way to handle this type of situation?

So many questions: 1. Segmentation logic? 2. Snippets, dynamic emails or unique streams or programs? 3. Engagement or Default Programs? 4. How to ensure ONLY 1 email regardless of new subscriptions deploys? 5. Smart campaign total and goal?

Any thoughts and or advice on how to handle this initial entry via new subscribers would be a life saver. Thank you!

1 ACCEPTED SOLUTION
SanfordWhiteman
Level 10 - Community Moderator
- I should only use $lead.DMSSubscribed or $lead.DMSSubscribedDate and not both, right?

Only the DateTime field.

- Do I simply just replace all $lead.DMSSubscribed with $lead.DMSSubscribedDate in the code?

Yes, that is, if you're going to convert a stringified DateTime (i.e., ISO8601 format) field into a Date, that's where you use the DateTime.

However I don't think these are ISO8601 "yyyy-MM-dd'T'HH:mm:ss".  They're actually ISO8601 "yyyy-MM-dd HH:mm:ss". That is, they have a space instead of the letter "T". So you can add this line to the code at the top:

#set( $ISO8601WithSpace = "yyyy-MM-dd HH:mm:ss" )

Then use $ISO8601WithSpace where you're using $ISO8601 now.

Parsing a String to a Date requires that you tell Velocity (actually Java) all the parts of the format.

- Do I uncheck the $lead.DMSSubscribed box in the Script Token?

For clarity, yes, but it's harmless to leave it checked as you won't be using it. Leaving it unchecked means it will always have the value null. That may be more or less confusing if you accidentally use it, I don't know.

View solution in original post

96 REPLIES 96
Ronn_Burner
Level 4

Understood. Just wanted to confirm.

I haven't forgotten about this but in the process of exporting to CSV I discovered that 'Product X Subscribed Date' per product is updating daily to that day. So all leads Subscribed Dates are today. Obviously a major problem I need to resolve asap.

This is occurring due to this Smart Campaign (below). I'm unclear as to what specific action needs to take place to qualiify for “Was Added to Product Revised” (the 002 New (Daily) Subscriptions (Trigger) Campaigns in the tree) versus what action qualifies as “Has Product Revised” - the 001 Batch campaigns.

It appears the one time daily sync is causing this Smart Campaign to read that data as new and update the 'Subscribed Date' to the current day.

You wouldn't happen to clearly be able to see precisely what the problem is would you?

pastedImage_2.png

pastedImage_3.png

pastedImage_1.png

SanfordWhiteman
Level 10 - Community Moderator

Those filters refer to Custom Objects.

Ronn_Burner
Level 4

@SanfordWhitemanJust wanted to follow up - I can take it to the community posed as a new post question if you prefer.

 

 Can you help me solve for combining the "Product X Trials" with the "Product X Subscriptions" using "any" or "or" conditions (utilizing the double pipe ||)?

 

Intellectually, I can see this is an easy function within velocity based on everything else I've done here as well as how seamless the use of the "and" (&&) function was to utilize.

 

The challenge is writing un-broken code. I assumed that in every line $lead.dMSSubscribedDate and $caldMSSubscribedDate appeared (the first #if and #set lines 9-17) would require the | | followed by the trial fields $lead.dMSTrialDateTime and $caldMSTrialDateTime.

 

I really appreciate and grateful for the help. Thank you.

Ronn_Burner
Level 4

@SanfordWhiteman  can you help me solve this?

 

I have no idea what you were expecting this use of || to do, it’s broken too:

 

I'm just trying to figure out where the "any" or "or" (| |) belongs so I simply mirrored and added all "Trial" syntax on the lines where the "Subscribed" syntax was present. What I was expecting was the fact I know this works individually and I know this works in this fashion in the (&&) syntax I hoped by simply adding the |  | would result in the same output. I was wrong. That's why I'm here. I'm trying. At least by trying I am discovering what does not work.

 

 

 

Individually I know this is right for DMS Subscribed...

 

 

#set( $ISO8601WithSpace = "yyyy-MM-dd HH:mm:ss" )
#set( $defaultTimeZone = $date.getTimeZone().getTimeZone("America/Los_Angeles") )
#set( $defaultLocale = $date.getLocale() )
#set( $calNow = $date.getCalendar() )
#set( $ret = $calNow.setTimeZone($defaultTimeZone) )
#set( $calConst = $field.in($calNow) )
#set( $ISO8601 = "yyyy-MM-dd'T'HH:mm:ss" )
#set( $ISO8601DateOnly = "yyyy-MM-dd" )
#if( !$lead.dMSSubscribedDate.isEmpty() )
#set( $caldMSSubscribedDate = $convert.toCalendar(
 $convert.parseDate(
 $lead.dMSSubscribedDate, 
 $ISO8601WithSpace, 
 $defaultLocale, 
 $defaultTimeZone 
 )
) )
#if( $date.difference($calNow,$caldMSSubscribedDate).getHours() >= -24 )
You now have access to PRODUCT X!
#end
#end

 

 

And I know this is right for DMS Free Trial...

 

 

#set( $ISO8601WithSpace = "yyyy-MM-dd HH:mm:ss" )
#set( $defaultTimeZone = $date.getTimeZone().getTimeZone("America/Los_Angeles") )
#set( $defaultLocale = $date.getLocale() )
#set( $calNow = $date.getCalendar() )
#set( $ret = $calNow.setTimeZone($defaultTimeZone) )
#set( $calConst = $field.in($calNow) )
#set( $ISO8601 = "yyyy-MM-dd'T'HH:mm:ss" )
#set( $ISO8601DateOnly = "yyyy-MM-dd" )
#if( !$lead.dMSTrialDateTime.isEmpty() )
#set( $caldMSTrialDateTime = $convert.toCalendar(
 $convert.parseDate(
 $lead.dMSTrialDateTime, 
 $ISO8601WithSpace, 
 $defaultLocale, 
 $defaultTimeZone 
 )
) )
#if( $date.difference($calNow,$caldMSTrialDateTime).getHours() >= -24 )
You now have access to PRODUCT X!
#end
#end

 

 

What I wanted to do was utilize the "any" or "or" (| |) syntax so I added the "Trial" after the "Subscribed" and  | | .

 

This is what my vtl code looks like at the top - as you can see where my confusion lies in that the first #if references "subscribed" only. I would think I would have to include some code also scanning for "Trial" conditions. But where and how does that fit in?

 

 

#set( $ISO8601WithSpace = "yyyy-MM-dd HH:mm:ss" )
#set( $defaultTimeZone = $date.getTimeZone().getTimeZone("America/Los_Angeles") )
#set( $defaultLocale = $date.getLocale() )
#set( $calNow = $date.getCalendar() )
#set( $ret = $calNow.setTimeZone($defaultTimeZone) )
#set( $calConst = $field.in($calNow) )
#set( $ISO8601 = "yyyy-MM-dd'T'HH:mm:ss" )
#set( $ISO8601DateOnly = "yyyy-MM-dd" )
#if( !$lead.dMSSubscribedDate.isEmpty() )
#set( $caldMSSubscribedDate = $convert.toCalendar(
 $convert.parseDate(
 $lead.dMSSubscribedDate, 
 $ISO8601WithSpace, 
 $defaultLocale, 
 $defaultTimeZone 
 )
) )
#if( $date.difference($calNow,$caldMSSubscribedDate).getHours() >= -24 || $date.difference($calNow,$caldMSTrialDateTime).getHours() >= -24 )
You now have access to PRODUCT X!
#end
#end

 

 

 

Also, there’s no image inserted in your post.

ss-marketo.jpg

 

 

 

SanfordWhiteman
Level 10 - Community Moderator

The line

 

 

#if( $date.difference($calNow,$caldMSSubscribedDate).getHours() >= -24 ) || $date.difference($calNow,$caldMSTrialDateTime).getHours() >= -24 )

 

 

is a syntax error because you have mismatched parentheses. The correct parens are

 

 

#if( $date.difference($calNow,$caldMSSubscribedDate).getHours() >= -24 || $date.difference($calNow,$caldMSTrialDateTime).getHours() >= -24 )

 

 

 


Finally I attempted to combine them into a single block and edited using the || indicated below


This syntax does not work in Velocity, it might  be a valid JavaScript null coalescing sequence but it’s broken VTL:

 

 

$some.function( $param2 || $param2 )

 

 

 

I have no idea what you were expecting this use of || to do, it’s broken too:

 

 

#set( $caldMSSubscribedDate = $convert.toCalendar( || $caldMSTrialDateTime

 

 

 

Also, there’s no image inserted in your post.

Ronn_Burner
Level 4

@SanfordWhiteman 

I have tested this a few different ways but I can't seem to find the proper coding sequence to make it work.

Obviously utilizing only this will not work with the #if and #set VTL block for $lead.dMSSubscribedDate.isEmpty()  ) and !$lead.dMSTrialDateTime.isEmpty()  ) written.

#if( $date.difference($calNow,$caldMSSubscribedDate).getHours() >= -24 ) || $date.difference($calNow,$caldMSTrialDateTime).getHours() >= -24 )

I also tested using the entire $lead.dMSSubscribedDate.isEmpty()  ) and then followed that with the enitre !$lead.dMSTrialDateTime.isEmpty()  ) VTL block - which did not work.

Finally I attempted to combine them into a single block and edited using the || indicated below - which also does not work and returns the error shown in the image below.

Can you please correct my missteps?

 

#if( !$lead.dMSSubscribedDate.isEmpty() || !$lead.dMSTrialDateTime.isEmpty() )
#set( $caldMSSubscribedDate = $convert.toCalendar( || $caldMSTrialDateTime = $convert.toCalendar(
 $convert.parseDate(
 $lead.dMSSubscribedDate || $lead.dMSTrialDateTime, 
 $ISO8601WithSpace, 
 $defaultLocale, 
 $defaultTimeZone 
 )
) )

 

Ronn_Burner
Level 4

There are a few different locations that may require the || in this scenario.

I will test but it's always easier to get as much info prior to really messing things up. 🙂

In this first section below do I simply add the entire #if( !$lead.dMSTrialDateTime.isEmpty() ) content block duplicating the Subscribed block below or do I use the double pipe || and add the Trial content mirroring the Subscribed content for lines 1, 2 and 4 below?

 

#if( !$lead.dMSSubscribedDate.isEmpty() )
#set( $caldMSSubscribedDate = $convert.toCalendar(
 $convert.parseDate(
 $lead.dMSSubscribedDate, 
 $ISO8601WithSpace, 
 $defaultLocale, 
 $defaultTimeZone 
 )
) )

 

I do believe this portion is correct, right?

 

#if( $date.difference($calNow,$caldMSSubscribedDate).getHours() >= -24 ) || $date.difference($calNow,$caldMSTrialDateTime).getHours() >= -24 )

 

 

SanfordWhiteman
Level 10 - Community Moderator

For boolean OR, use the multi-language standard, the double pipe:

 

  ||

 

Velocity also supports literal OR but that's bad for learning cross-language syntax.

Ronn_Burner
Level 4

That worked to perfection! This is amazing stuff. I always make this so much harder than I need to. But, yes, I see. And it worked!

 

Of course, now that I know I can create AND (&&) conditions, is it just as easy to create ANY or OR conditions?

Currently, I have separate programs for Product X Subscribed and Trial - which triggers an email #1 for each - one with theTrialDateTime token and the other with the SubscribedDateTime token.

With ANY or OR conditions (in past 24 hrs) I would be able to have only a single program per product and a single email #1 recognizing any new subscription OR trial.

 

Email #1 - Congratulate all NEW Subscriptions OR Trials (DateTime in past 24 hrs = TRUE) AND promote to all Product X Trial AND Subscription (DateTime is empty) = FALSE

Email # 2 - Only promote to all Product X Trial AND Subscription (DateTime is empty) = FALSE

 

As always, thank you!

 

SanfordWhiteman
Level 10 - Community Moderator

$lead.field.isEmpty() checks for an empty String, as does $lead.field.equals("").

Ronn_Burner
Level 4


No, those are just placeholders for the conditions you want to match!

Oh, man. Buzzkill. Because literally "something" and "something else" is exactly what I need to identify - but in a DateTime field. Basically, for my use case only (empty field values) "null" and "null" = FALSE (does not have Product X Trial or Subscription) and anything else, any value in either field, would indicate TRUE.

FALSE = promote that product because lead does not have product Trial or Subscription

TRUE = skip because lead currently has product Trial or Subscription

Is there a way to do this based on the information I provided and with DateTime "null" and "null" or "null" and "not null"?

If not, I don't think I can do this utilizing VTL as this entire script you and I (you!) created here is based on DateTime.

 

SanfordWhiteman
Level 10 - Community Moderator

For example, do I literally use “something” and “something else”?


No, those are just placeholders for the conditions you want to match!

 

.equals("something") is a case-sensitive match on a Marketo String or Text field. 

 

.equals("1") would match on a Marketo Boolean field set to true (surfaced as a String "1" in Velocity). I don’t know what you want to do here, it’s all up to your business requirements.

 


And is ##both conditions are true required VTL - I know ## signifies comment but not sure if that is comment for me or comment text

A comment for you, to show the state when you’re inside the #if.

Ronn_Burner
Level 4

This is great! I understand exactly what you are doing with the script conceptually - but technically I'm not exactly sure how to execute it properly. I have exactly how I interpreted your message below. I did create a token with the below VTL and sent a test send from Lead Record > Marketing > Send Email and it returned no text where Your Product X Subscribed and Trial is false. should be displayed. Yes, I have checked the two corresponding DateTime boxes and used the appropriate system names in the VTL. Please grade my paper, Good Sir.

 

For example, do I literally use "something" and "something else"? And is ##both conditions are true required VTL - I know ## signifies comment but not sure if that is comment for me or comment text location for consumer and the place I should write the text... Your Product X Subscribed and Trial is false.

 

 

 

#set( $ISO8601WithSpace = "yyyy-MM-dd HH:mm:ss" )
#set( $defaultTimeZone = $date.getTimeZone().getTimeZone("America/Los_Angeles") )
#set( $defaultLocale = $date.getLocale() )
#set( $calNow = $date.getCalendar() )
#set( $ret = $calNow.setTimeZone($defaultTimeZone) )
#set( $calConst = $field.in($calNow) )
#set( $ISO8601 = "yyyy-MM-dd'T'HH:mm:ss" )
#set( $ISO8601DateOnly = "yyyy-MM-dd" )
#if( $lead.dMSTrialDateTime.equals("something") && $lead.dMSSubscribedDate.equals("something else") )
## both conditions are true
Your Product X Subscribed and Trial is false.
#end

 

 

 

 

 

 

SanfordWhiteman
Level 10 - Community Moderator

Velocity supports the usual C-style boolean and - &&. (It also supports the more primitive AND but that's not good for learning to code.)

 

#if( $field1.equals("something") && $field2.equals("something else") )
## both conditions are true
Ronn_Burner
Level 4

@SanfordWhiteman  is there a line of VTL or a way to use "AND" conditions in the script?

 

The reason for this is that a customer can "Subscribe" or begin a "Free Trial" with PRODUCT A (or any of our products). Obviously, the DateTime fields need to be unique for each "PRODUCT X Free Trial" or "PRODUCT X Subscription".

 

Therefore if I want to send Email #2 (Email #1 populates only Trial/Subscription that are TRUE in past 24 hours) to populate only the FALSE values (products they are currently not subscribed to AND not in a Free Trial.

 

So if: "Product A Subscription DateTime" is FALSE (empty) AND "Product A Free Trial DateTime" is FALSE (empty) THEN populate with "Product A is FALSE so TRY NOW!" text.

 

If so, can you please help me with this?

Ronn_Burner
Level 4

Hi @SanfordWhiteman I ran into something here and hoped you could help.

 

We created this VTL for all product subscriptions via lead.DMSSubscribedDate (The value is actually DateTime as I edited those fields) and it works perfectly. All "true" values within past 24 hours reflected and all "false" values data appropriately affected as well.

The monkey wrench is all of these products also offer a Free Trial - which is obviously a different status so I duplicated the VTL appropriately and created and lead.DMSTrialDateTime and that VTL token and programs work perfectly as well.

 

The problem I have created and need to solve for is the fact that it is possible to "Subscribe" to Product01 and begin a "Free Trial" for Product02. The "New Subscriptions Program" will send the Email with the {{RecentlySubscribedProducts}} token only recognizing T or F for "Subscriptions" and therefore populating Product02 as a product you still need - even though you currently have a "Free Trial. 

Likewise the "New Free Trials Program" will send the Email for that program with {{NewProductTrials}} token that will acknowledge a "Free Trial" TRUE for Product02 but recognize Product01 "Free Trial" as FALSE even though it's actually a "Subscribed" product. As it should with those 2 separate VTL scripts.

Do you know how I can solve for this using Smart Campaigns?

The Program looks like this and is duplicated for each Subscribed program and entire sequence duplicated for each Free Trial program:

NEW SUBSCRIPTIONS (default program) - 7 of these so 1 for each product subscription

Smart Campaign: Data Value Changes (trigger): Attribute: DMS Subscribed DateTime in past 24 hours

Flow: Change Program Status: Member

SENDER (default program)

Smart Campaign #1 to send Email #1 (Welcomes TRUE and Promotes FALSE values)

Smart List: (1 or 2 or 3 or 4 or 5 or 6 or 7)

1-Data Value Changed: DMS Subscribed DateTime in past 24 hours --> Flow: Send Subscribed Email #1.

repeat for all products

 

Smart Campaign #2 to send Email #2 (Only promotes FALSE values)

Smart List: 1 and (2 or 3 or 4 or 5 or 6 or 7 or 😎

1-Was Sent Email: Email #1 in past 2 days

2-Member of Program: False / Program is Product01 (DMS)

repeat for all products

 

I know this is confusing but hopefully I articulated clearly enough and you know precisely how to solve for this using Smart Campaign logic that would only send Email #1 from "Subscribed" and not from "Free Trial" in the same day. #If so, please share. Thank you so much

Ronn_Burner
Level 4

And problem solved. Thank you, Sir!

SanfordWhiteman
Level 10 - Community Moderator

That's the debug output from

${display.list( $lead.entrySet(), "\u000a" )}
Ronn_Burner
Level 4

Hello Sanford - The VTL script we created here is working flawlessly - with the exception of one minor display error in the screenshot below. User error, no doubt. All the velocity script displays properly following this block of text - I just didn't show all of the rest as it's perfect. I have included the relevant top portion of the code below and hopefully, you are able to easily see why this is happening. Can you please tell me what I need to do so that does not happen and/or appear? Thanks!

pastedImage_1.png

#set( $ISO8601WithSpace = "yyyy-MM-dd HH:mm:ss" )
#set( $defaultTimeZone = $date.getTimeZone().getTimeZone("America/Los_Angeles") )
#set( $defaultLocale = $date.getLocale() )
#set( $calNow = $date.getCalendar() )
#set( $ret = $calNow.setTimeZone($defaultTimeZone) )
#set( $calConst = $field.in($calNow) )
#set( $ISO8601 = "yyyy-MM-dd'T'HH:mm:ss" )
#set( $ISO8601DateOnly = "yyyy-MM-dd" )
${display.list( $lead.entrySet(), "\u000a" )}
#if( !$lead.dMSSubscribedDate.isEmpty() )
#set( $caldMSSubscribedDate = $convert.toCalendar(
$convert.parseDate(
$lead.dMSSubscribedDate,
$ISO8601WithSpace,
$defaultLocale,
$defaultTimeZone
)
) )
#if( $date.difference($calNow,$caldMSSubscribedDate).getHours() >= -24 )
<tbody>
<tr>
<td colspan="3" style="line-height: 1px; font-size: 1px;" height="${FreeText2Col-top-space}">&nbsp;</td>
</tr>
<tr>
<td class="block" width="290" valign="top" style="vertical-align:top;width:290px;">
<table cellpadding="0" cellspacing="0" width="100%" border="0">
<tbody>
<tr>
<td style="font-size:14px; color:${TextColor}; font-family:${TextFontFamily}; mso-line-height-rule: exactly; line-height:20px;text-align:left;" valign="top">
<div id="FreeText2ColLContent71732c78-1779-4a8b-a26b-7f22327f6ca2" class="mktoText" mktoname="FreeText2ColLContent">
<div>
<strong><span style="font-size: 18px;"><span style="font-family: arial,helvetica neue,helvetica,sans-serif;"></span></span></strong>
<strong><span style="font-size: 18px;"><span style="font-family: arial,helvetica neue,helvetica,sans-serif;"></span></span></strong>
<strong><span style="font-size: 18px;"><span style="font-family: arial,helvetica neue,helvetica,sans-serif;"></span></span></strong>
<strong><span style="font-size: 18px;"><span style="font-family: arial,helvetica neue,helvetica,sans-serif;"></span></span></strong>
<p><strong><span style="font-size: 18px;"><span style="font-family: arial,helvetica neue,helvetica,sans-serif;"></span></span></strong><br /></p>
<p><strong><span style="font-size: 18px;"><span style="font-family: arial,helvetica neue,helvetica,sans-serif;"></span></span></strong><strong><span style="font-size: 18px;"><span style="font-family: arial,helvetica neue,helvetica,sans-serif;"></span></span></strong><strong><span style="font-size: 18px;"><span style="font-family: arial,helvetica neue,helvetica,sans-serif;">Dealertrack and RouteOne Applications</span></span></strong><span style="font-size: 14px;"><span style="font-family: arial,helvetica neue,helvetica,sans-serif;"><a href="https://{{my.LM1}}?utm_source={{my.UTMSource}}&amp;utm_medium=email&amp;utm_campaign={{my.UTMCampaign}}&amp;utm_content={{my.UTMcontentW1CTA2}}" style="-ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%; color: #007c89; text-decoration: underline;"><span style="color: #0000ff;"><em><strong></strong></em></span></a></span></span></p>
<p><span style="font-size: 14px; font-family: arial, helvetica, sans-serif;">No other system gives you access to more lenders. Simply structure all your finance deals and submit to your lenders and receive lender decisions without ever leaving <em><strong>DealerCenter</strong></em>.&nbsp;<span style="color: #0000ff;"><em><strong><a href="https://{{my.LM1}}?utm_source={{my.UTMSource}}&amp;utm_medium=email&amp;utm_campaign={{my.UTMCampaign}}&amp;utm_content={{my.UTMcontentW1CTA1}}" target="_blank" id="" style="color: #0000ff;">See how it works in this video!</a></strong></em></span></span></p>
<span style="font-size: 14px;"><span style="font-family: arial,helvetica neue,helvetica,sans-serif;"><a href="https://{{my.LM1}}?utm_source={{my.UTMSource}}&amp;utm_medium=email&amp;utm_campaign={{my.UTMCampaign}}&amp;utm_content={{my.UTMcontentW1CTA2}}" style="-ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%; color: #007c89; text-decoration: underline;"><span style="color: #0000ff;"><em><strong></strong></em></span></a></span></span>
</div>
</div> </td>
</tr>
</tbody>
</table> </td>
<td class="block" width="20" style="font-size:1px;line-height:1px;">&nbsp; </td>
<td class="block padding_top" width="290" valign="top" style="vertical-align:top;width:290px;">
<table cellpadding="0" cellspacing="0" width="100%" border="0">
<tbody>
<tr>
<td style="font-size:14px; color:${TextColor}; font-family:${TextFontFamily}; mso-line-height-rule: exactly; line-height:20px;text-align:left;" valign="top">
<div id="FreeText2ColRContent71732c78-1779-4a8b-a26b-7f22327f6ca2" class="mktoText" mktoname="FreeText2ColRContent">
<table style="width: 67px; height: 29px; margin-left: auto; margin-right: auto;">
<tbody>
<tr>
<td><img src="https://gallery.mailchimp.com/f60eb80b4f12731362cb001a7/images/9529e54f-4754-4ac4-ae2b-ab817bcbf026.png" alt="" constrain="true" imagepreview="false" width="280" height="202" border="" align="top" /><br /></td>
</tr>
</tbody>
</table>
<p></p>
</div> </td>
</tr>
</tbody>
</table> </td>
</tr>
#end
#end‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍
SanfordWhiteman
Level 10 - Community Moderator

Awesome, Ronn. Glad we were both able to persevere. Could you mark one of my answers as Correct?  And also, if you don't already follow my blog, it's a good idea now that you're in the Velocity world.

Ronn_Burner
Level 4

OK, that means your Smart Campaign wasn't in the right place in the MA hierarchy and didn't have the token available. Make sure the Program w/the SC can see the token (as is the case w/all tokens).

Oh my goodness. *slams face onto keyboard* You're absolutely right and such a rookie mistake! I obviously know that. I utilize dynamic tokens for utm parameters extensively throughout my dynamic programs. I cannot believe I didn't catch that. It's so obvious. Ugh! That was paralysis by analysis resulting from fear and pressure of trying to do VTL from a clean slate.

Yes, you can add HTML where you currently have plain text. Velocity just outputs what you tell it to, it doesn't think about whether it has HTML tags or not.

I just tested this is a couple spots and it rendered perfectly!

Thank you, Sanford! Truly. This entire lesson was invaluable and I will take it and the code with me and utilize it as much as possible. This is high level and super cool stuff! I cannot thank you enough for your time, patience and help. You're my hero!