# SSJS Platform functions versus Core library

*Marketing Cloud Engagement Developer Study Guide · Programmatic Languages · Last updated November 3, 2026 · https://www.certifyforce.com/study-guide/marketing-cloud-engagement-developer/programmatic-languages/ssjs-platform-functions-versus-core-library*

How server-side JavaScript is declared and loaded, where Platform functions and Core library objects may run, how values pass between SSJS and AMPscript, and how to read data extensions, personalization strings and HTTP responses in SSJS.

- Certification: Salesforce Marketing Cloud Engagement Developer
- Exam section: Programmatic Languages
- Study guide: https://www.certifyforce.com/study-guide/marketing-cloud-engagement-developer

**Official exam objective:**

> Given a scenario, demonstrate knowledge of AMPscript and SSJS language syntax and functions.

## What the exam expects

- Read and fix the `<script runat="server">` declaration and its optional attributes.
- Decide whether a requirement calls for Platform functions or the Core library, given where the code runs (email, CloudPage, application).
- Pass values between SSJS and AMPscript with `Platform.Variable.SetValue()` and `GetValue()`, and print them with SSJS personalization strings.
- Look up data extension values with `Platform.Function.Lookup()` and retrieve rows with Core `DataExtension` objects.
- Call an external endpoint with `HTTP.Get()` or `HTTP.Post()` and parse the JSON body.
- Key terms: **Platform functions** (SSJS objects that run in messages, CloudPages and landing pages without loading a library); **Core library** (SSJS objects loaded with `Platform.Load()` for landing pages and applications); **personalization string** (a `ctrl:` tag that outputs an attribute, variable or expression); **ordinal** (a parameter's position in a function call).

## Key facts

| Fact | Detail | Source |
|---|---|---|
| Missing `runat="server"` | The browser tries to run the code, causing errors | [SSJS Syntax Guide](https://developer.salesforce.com/docs/marketing/marketing-cloud/guide/ssjs_syntaxGuide.html) |
| Script tag defaults | `language` JavaScript; `ExecutionContextType` Get | [SSJS Syntax Guide](https://developer.salesforce.com/docs/marketing/marketing-cloud/guide/ssjs_syntaxGuide.html) |
| In email | AMPscript or Platform functions only | [Server-Side JavaScript](https://developer.salesforce.com/docs/marketing/marketing-cloud/guide/ssjs_serverSideJavaScript.html) |
| Core library load | `Platform.Load("Core","1")` before Core objects | [SSJS Syntax Guide](https://developer.salesforce.com/docs/marketing/marketing-cloud/guide/ssjs_syntaxGuide.html) |
| Platform performance | Faster, because Platform objects sit outside Core | [Platform Functions](https://developer.salesforce.com/docs/marketing/marketing-cloud/guide/ssjs_platformFunctions.html) |
| Not available | DOM and external libraries | [Server-Side JavaScript](https://developer.salesforce.com/docs/marketing/marketing-cloud/guide/ssjs_serverSideJavaScript.html) |
| SetValue / GetValue | Two parameters to write; one to read | [SetValue](https://developer.salesforce.com/docs/marketing/marketing-cloud/guide/ssjs_platformAMPscriptVariableSetValue.html), [GetValue](https://developer.salesforce.com/docs/marketing/marketing-cloud/guide/ssjs_platformAMPscriptVariableGetValue.html) |
| `default` attribute | Returned when the source is null or empty | [SSJS Syntax Guide](https://developer.salesforce.com/docs/marketing/marketing-cloud/guide/ssjs_syntaxGuide.html) |
| Rows.Retrieve() | Up to 2500 rows; not in email or email preview | [Rows.Retrieve](https://developer.salesforce.com/docs/marketing/marketing-cloud/guide/ssjs_dataExtensionRowsRetrieve.html) |
| DataExtension functions | No enterprise-level data extensions | [Data Extension Functions](https://developer.salesforce.com/docs/marketing/marketing-cloud/guide/ssjs_dataExtensionFunctions.html) |
| HTTP ports | Only 80 (HTTP) and 443 (HTTPS) | [HTTP.Get()](https://developer.salesforce.com/docs/marketing/marketing-cloud/guide/ssjs_httpGet.html), [HTTP.Post()](https://developer.salesforce.com/docs/marketing/marketing-cloud/guide/ssjs_httpPost.html) |

## Check yourself

- Why can Platform functions run faster than other SSJS functions?
- When does a `ctrl:field` tag return its `default` value?
- Which headers does `HTTP.Post()` add without being asked?
- Why does `DataExtension.Init()` fail as a way to reach an enterprise-level data extension?
- What is the default `ExecutionContextType` of a server-side script tag?

## Sources

- [Server-Side JavaScript](https://developer.salesforce.com/docs/marketing/marketing-cloud/guide/ssjs_serverSideJavaScript.html)
- [SSJS Syntax Guide](https://developer.salesforce.com/docs/marketing/marketing-cloud/guide/ssjs_syntaxGuide.html)
- [Programmatic Languages](https://developer.salesforce.com/docs/marketing/marketing-cloud/guide/programmatic-content-overview.html)
- [Platform Functions (SSJS)](https://developer.salesforce.com/docs/marketing/marketing-cloud/guide/ssjs_platformFunctions.html)
- [Data Extension Functions (SSJS)](https://developer.salesforce.com/docs/marketing/marketing-cloud/guide/ssjs_dataExtensionFunctions.html)
- [Rows.Retrieve (SSJS)](https://developer.salesforce.com/docs/marketing/marketing-cloud/guide/ssjs_dataExtensionRowsRetrieve.html)
- [Lookup (SSJS)](https://developer.salesforce.com/docs/marketing/marketing-cloud/guide/ssjs_platformDataExtensionLookup.html)
- [Pass Variables from AMPscript to SSJS](https://developer.salesforce.com/docs/marketing/marketing-cloud/guide/ssjs_passVariables.html)
- [SetValue (SSJS)](https://developer.salesforce.com/docs/marketing/marketing-cloud/guide/ssjs_platformAMPscriptVariableSetValue.html)
- [GetValue (SSJS)](https://developer.salesforce.com/docs/marketing/marketing-cloud/guide/ssjs_platformAMPscriptVariableGetValue.html)
- [GetQueryStringParameter (SSJS)](https://developer.salesforce.com/docs/marketing/marketing-cloud/guide/ssjs_platformHTTPPropertyGetQueryStringParameter.html)
- [HTTP Functions (SSJS)](https://developer.salesforce.com/docs/marketing/marketing-cloud/guide/ssjs_httpFunctions.html)
- [HTTP.Get() (SSJS)](https://developer.salesforce.com/docs/marketing/marketing-cloud/guide/ssjs_httpGet.html)
- [HTTP.Post() (SSJS)](https://developer.salesforce.com/docs/marketing/marketing-cloud/guide/ssjs_httpPost.html)
- [ParseJSON (SSJS)](https://developer.salesforce.com/docs/marketing/marketing-cloud/guide/ssjs_platformUtilityParseJSON.html)

## About the full unit

The "Core concepts", "Exam traps" and "Worked scenario" sections of this unit, its 6 linked practice questions, and unlimited timed mock exams are included with the Marketing Cloud Engagement Developer pack (USD $19): https://www.certifyforce.com/practice-exams
