I'm sending an email to new customers alerting them to the fact that they have job proposals and linking them to their posted job.
The smart campaign is:
Email Copy
"Hello,
I just wanted to remind you that you have attorney proposals for your job, {{my.TriggerENTJobTitleLink:default=edit me}}, waiting to be reviewed. Please take a look at the attorneys we’ve sourced for you."
The Token is:
#set($url = "www.upcounsel.com/job/proposals/${TriggerObject.jobid}")
#foreach($job in $jobList)
#if ($job.ucid == $TriggerObject.jobId)
<a href="https://${url}" style="font-family: Helvetica;">$job.jobTitle</a>
#end
#end
Yet when I run the campaign, nothing populates in the email and it looks like:
"Hello,
I just wanted to remind you that you have attorney proposals for your job, , waiting to be reviewed. Please take a look at the attorneys we’ve sourced for you."
What have I written wrong in the Velocity Script?
I'd need to see more information, like the shape of $TriggerObject itself, since if you have an error in the properties there wouldn't be any output. Can you output $TriggerObject and each $job in $jobList (on their own, no conditions). and show the result? Also, syntax highlighting is recommended...
"Yet when I run the campaign, nothing populates..."
How are you running the campaign? I've found the Send Sample and selecting the trigger doesn't always populate the trigger object.
+1, never test Velocity from a Send Sample.