AnsweredAssumed Answered

Troubles when using Javascript within Velocity?

Question asked by Ken Soldink on Aug 8, 2019
Latest reply on Aug 12, 2019 by Sanford Whiteman

I've been trying to implement Sanford Whiteman's post "Use Javascript within Velocity" from late 2017 to utilize Javascript in an Email Script Token, and when following the example verbatim, instead of outputting the Lead's firstname


playfully as

K e N n E t H

, the actual Velocity code is output in the email:

$JSEngine.put("lead", $lead) $JSEngine.get("spacedOutInJS")

Attached are screenshots showing:

  • the token script - named "ai_trk_test" (20190808_104120_msedge_CompassionateTuraco_938x794.png),
  • the email draft with {{my.ai_trk_test}} included (20190808_104357_msedge_SnowBuzzard_815x516.png), and
  • previewing the email as a Person with Kenneth as first name 20190808_104600_msedge_ImmenseBluet_1052x680.png)


Am I missing something here?


Kenneth Soldink