Skip to content

Instantly share code, notes, and snippets.

  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
AMPscript and Server-Side JavaScript variable together
VAR @ProductName
SET @ProductName = "Mobile phone"
<script runat=server>
//Get the Variable from AMPscript
var ProductName = Variable.GetValue("@ProductName");
Write("<b>SSJS value:</b> "+ProductName);
var price = "1500"
//Set the Variable to be accessible in AMPscript
<b>AMPscript value:</b> %%=v(@price)=%%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment