How does SSJs interact with the Marketing Cloud?

How does SSJs interact with the Marketing Cloud?

SSJS interacts with Marketing Cloud via several libraries. Write your code to work with these libraries in order to work with the information in your Marketing Cloud account. These libraries allow SSJS to be updated while maintaining previous versions in order to avoid breaking preexisting code.

How does server side JavaScript work in Marketing Cloud?

Instead of using the browser to render the JavaScript on the client-side computer, Marketing Cloud executes the JavaScript on the server when rendering. While you can duplicate the functionality of AMPscript using SSJS, SSJS does not work with the DOM and will not function with exterior libraries.

Can you use SSJs on a landing page?

While you can duplicate the functionality of AMPscript using SSJS, SSJS does not work with the DOM and will not function with exterior libraries. Instead, use libraries provided by Marketing Cloud to create SSJS that works within landing pages.

Can you use the eval function in SSJs?

You can use the EVAL function in SSJS. SSJS handles more advanced exception handling, including try catch blocks. Before diving in, remember that SSJS does not work with external JavaScript libraries and you can’t work with the DOM. SSJS appears in Marketing Cloud as a code block, like this example.

How to create server side JavaScript in Marketing Cloud?

Server-side JavaScript does not work with the DOM and will not function with exterior libraries. Instead, use libraries provided by Marketing Cloud to create server-side JavaScript. All functions native to JavaScript, such as arrays, math functions, the EVAL function, and try catch blocks work with server-side JavaScript.

How to manage encryption keys in Marketing Cloud?

Specify the key as part of the file transfer activity from the Marketing Cloud Safehouse location to an FTP Location. Want to know more about managing your data in Marketing Cloud? Check out the Marketing Cloud Data Management module.

How to create an externally hosted Marketing Cloud App?

Here’s a brief overview of creating an externally hosted Marketing Cloud app: Create an installed package, or navigate to an existing package. Under Components, click Add Component. Select Marketing Cloud App. Enter a name and description for your app. Enter your app’s login, redirect, and logout URLs.