Overview

Marketing Cloud’s Server-Side JavaScript (SSJS) has several advantages over AMPscript. First, JavaScript is more mainstream and familiar to developers. Marketing Cloud SSJS also includes additional features that do not exist in AMPscript, like arrays, array functions and JSON parsing tools.

On the flip side, the Marketing Cloud SSJS is not maintained like AMPscript, so most newer AMPscript functions have no SSJS equivalent. The use of SSJS is generally discouraged by Marketing Cloud Support due to additional overhead that adversely affects platform performance.

If an advanced development scenario aligns with the capabilities of SSJS, you will probably need to leverage the features and advantages of AMPscript too. Fortunately, there are two SSJS functions that allow you to get and set variables in AMPscript.