Programmatic Languages35% of the exam
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.
Given a scenario, demonstrate knowledge of AMPscript and SSJS language syntax and functions.
~6 min read · 6 practice questions ·
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()andGetValue(), and print them with SSJS personalization strings. - Look up data extension values with
Platform.Function.Lookup()and retrieve rows with CoreDataExtensionobjects. - Call an external endpoint with
HTTP.Get()orHTTP.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 (actrl:tag that outputs an attribute, variable or expression); ordinal (a parameter's position in a function call).
Key facts
Missing
runat="server"- Detail
- The browser tries to run the code, causing errors
Script tag defaults
- Detail
languageJavaScript;ExecutionContextTypeGet
In email
- Detail
- AMPscript or Platform functions only
Core library load
- Detail
Platform.Load("Core","1")before Core objects
Platform performance
- Detail
- Faster, because Platform objects sit outside Core
Not available
- Detail
- DOM and external libraries
SetValue / GetValue
- Detail
- Two parameters to write; one to read
default attribute- Detail
- Returned when the source is null or empty
Rows.Retrieve()
- Detail
- Up to 2500 rows; not in email or email preview
DataExtension functions
- Detail
- No enterprise-level data extensions
HTTP ports
- Detail
- Only 80 (HTTP) and 443 (HTTPS)
Sources for this section (9)
- SSJS Syntax Guidedeveloper.salesforce.com (opens in a new tab)
- Server-Side JavaScriptdeveloper.salesforce.com (opens in a new tab)
- Platform Functionsdeveloper.salesforce.com (opens in a new tab)
- SetValuedeveloper.salesforce.com (opens in a new tab)
- GetValuedeveloper.salesforce.com (opens in a new tab)
- Rows.Retrievedeveloper.salesforce.com (opens in a new tab)
- Data Extension Functionsdeveloper.salesforce.com (opens in a new tab)
- HTTP.Get()developer.salesforce.com (opens in a new tab)
- HTTP.Post()developer.salesforce.com (opens in a new tab)
- Why can Platform functions run faster than other SSJS functions?
- When does a
ctrl:fieldtag return itsdefaultvalue? - 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
ExecutionContextTypeof a server-side script tag?
The questions are free to read. Answers with their sources and self-grading are included with the pack.
Keep reading with the Marketing Cloud Engagement Developer pack
- Core concepts
- Exam traps
- Worked scenario
The pack includes:
- All 25 lessons of the Marketing Cloud Engagement Developer guide, with reading progress
- Interactive decision walks and step-by-step sequence steppers
- Practice exams purchase adds inline bank questions and topic practice (6 questions for this lesson)
- An official source cited for every claim
- An AI tutor that answers from the guide
- Choose guide-only, practice-only, or save $4 with both