Core Library
The SSJS Core library provides object-oriented APIs for Data Extensions, Subscribers, Lists, Email sends, HTTP requests, and more. Load with Platform.Load("core", "1.1.5").
The Core library is loaded with Platform.Load("core", "1.1.5") and gives you access to a set of powerful object-oriented namespaces. Unlike Platform.Function.*, Core library objects use a more JavaScript-idiomatic dot-notation with method chaining.
You must call Platform.Load("core", "1.1.5") before using any Core library object. Place it at the very top of your first <script runat="server"> block.
Platform.Load("core", "1.1.5");
Core Library Objects
| Object | Description |
|---|---|
Account |
Account settings |
AccountUser |
Users in the business unit |
ContentAreaObj |
Classic Content Areas (deprecated object — not ContentArea() global) |
DataExtension |
Initialize and work with Data Extensions |
DataExtension.Fields |
Field definitions on a DE |
DataExtension.Rows |
Retrieve, Add, Update, Remove rows |
DeliveryProfile |
Delivery profiles |
Email |
Email message definitions |
FilterDefinition |
Data filters |
Folder |
Content folders |
List |
Work with publication lists |
List.Subscribers |
Subscribers on a specific list |
Portfolio |
Portfolio (file) assets |
QueryDefinition |
SQL query activities |
Send |
Email sends |
Send.Definition |
Send Definition configurations |
SendClassification |
Send classifications |
SenderProfile |
Sender profiles |
Subscriber |
Manage All Subscribers list entries |
Template |
Email templates |
TriggeredSend |
Triggered send definitions and sends |
HTTP utilities are also part of the Core library but documented separately:
| Object | Description |
|---|---|
HTTP.GET |
Simple HTTP GET |
HTTP.POST |
Simple HTTP POST |
Tracking events
SOAP-style tracking event objects expose Retrieve(filter) for send metrics:
| Object | Page |
|---|---|
BounceEvent |
Bounce events |
ClickEvent |
Click events |
ForwardedEmailEvent |
Forwarded email events |
ForwardedEmailOptInEvent |
Forwarded opt-in events |
NotSentEvent |
Not-sent events |
OpenEvent |
Open events |
SentEvent |
Sent events |
SurveyEvent |
Survey events |
UnsubEvent |
Unsubscribe events |
See Tracking events for full documentation on every type.
When to Use Core vs Platform.Function
The Core library and Platform.Function.* both interact with SFMC data, but have different strengths:
| Core Library | Platform.Function | |
|---|---|---|
| DE operations | Object-based (Init → Rows.Retrieve) | Functional (Lookup, InsertData) |
| Subscriber | Rich object model | No direct equivalent |
| Performance (large datasets) | Better for bulk | Better for single lookups |
| CloudPage retrieve | Works correctly | DataExtension.Rows.Retrieve() bug |
| Error handling | Exceptions on failure | Returns 0/null |
See Platform.Function vs Core Library for a detailed comparison.