Skip to main content

Server-side JavaScript (SSJS) in the Salesforce Marketing Cloud allows a developer to use JavaScript syntax and proprietary platform libraries for server-side processing.

Server-side JavaScript in the SFMC does not work with the DOM and will not function with exterior libraries. Instead, you can use the Core or Platform libraries provided by the Salesforce Marketing Cloud that interact with Objects inside the platform or duplicating the functionality of AMPscript.

Many functions and capabilities native to JavaScript, such as arrays, math functions, the EVAL function, and try catch blocks, will work with server-side JavaScript. But it is limited to ECMA 3 standards, so it is well behind modern day JavaScript.

You can duplicate the functionality of AMPScript using server-side JavaScript. However, server-side JavaScript can also handle more advanced procedures:

  • You can use arrays in your server-side JavaScript.
  • You can use more advanced exception handling with server-side JavaScript.

If you are already familiar with JavaScript, you can immediately begin to use that knowledge in building emails and landing pages.

For more information: