Velocity Script error - Change link by country
I'm completely new to Velocity scripting, hoping it can solve a problem I'm having.
I want to serve up different links in an email based on what country is listed in a lead's record. I do not want to use dynamic content/segmentation for this, as we'd use this link in lots of emails and I'd prefer not to have to set it up each time. I took a script from another discussion and modified it as such:
#set( $linksBLC = {
"United Kingdom" : "website.com/page2",
"United States" : "website.com/page3",
"*" : "website.com/page1"
})
#set( $link = $linksBLC[$lead.Country] )
#if ( !$link )
#set( $link = $linksBLC['*'] )
#end
<a href="$link">Click here</a>##
This gives me the following error:
Cannot get email content-
An error occurred when procesing the email Rendered_Email_Velocity_Error_Area_?!
near
?
Not the most helpful error, and turns up zero results in google. Could someone let me know what I'm doing wrong?
The list would eventually contain 60+ countries, just trying to get it working before I scale it.
Thanks!