AnsweredAssumed Answered

Velocity Script referencing multiple custom objects

Question asked by Doug Meierdiercks on Oct 13, 2017
Latest reply on Oct 15, 2017 by Sanford Whiteman

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:

  • Smart List
    • Trigger: Added to Event - Event name is job_posted
    • Filter: Has Job - Is true AND Current status is Open AND Type is Enterprise
  • Flow
    • Wait 2 Days
    • Send Email

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?

Outcomes