What is the sequence of scripts execution in Marketing cloud ? ampscript executes first or SSJS ? or it will be top to bottom ?

  • Ampscript executes top down
    – EazyE
    Sep 22 at 12:53
  • 1
    SSJS allows writing and calling functions, but with this exception it will also be interpreted top down. so generally speaking, AMPScript/ SSJS are both top down, none of the two languages inherently executes first or second. As you can also pass data from AMPScript into SSJS and vice versa, using Variable.GetValue and Variable.SetValue SSJS methods, chaining of scripts of both languages is possible by just writing them in the right order. It is not per se recommended as it plausibly won't help performance, but it certainly is possible and sometimes pretty useful. Sep 22 at 13:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.