Token prints out velocity variable instead of link
I created a program token, activation_link, that should pull a link from a custom Salesforce object that is synced with Marketo. The velocity script is:
#if(${Provisioning__cList.get(0).License_Code__c}=="")
#set($HTMLSafeString = "Please email support for your activation code" )
#else
#set($HTMLSafeString = $esc.html(${Provisioning__cList.get(0).License_Code__c}))
#end
${HTMLSafeString}
In my email body, I put the token {{my.activation_link}} but this prints out
${HTMLSafeString}instead of the link, as expected. I think the value exists because it's getting to the 'else' part of the script, but it's just not rendering as expected.
What am I doing wrong?