Platform Functions
The Platform.Function.* API — Data Extension CRUD, string manipulation, date math, crypto, HTTP, SOAP helpers, and more. Available without Platform.Load.
All methods documented here are accessed as Platform.Function.MethodName(...). No Platform.Load call is required.
Data Extensions
Read and write rows in SFMC Data Extensions.
Lookup
Get a single field value from a DE row matching filter criteria.
→ string
LookupRows
Get multiple rows from a DE matching filter criteria.
→ object[]
LookupOrderedRows
Get sorted rows with a max count and filter.
→ object[]
InsertData
Add a new row to a Data Extension.
→ number
UpdateData
Modify existing rows matching filter criteria.
→ number
UpsertData
Insert or update a row based on filter match.
→ number
DeleteData
Remove rows matching filter criteria.
→ number
DataExtensionRowCount
Count all rows in a Data Extension.
→ number
InsertDE
Alias for InsertData.
→ number
UpdateDE
Alias for UpdateData.
→ number
UpsertDE
Alias for UpsertData.
→ number
DeleteDE
Alias for DeleteData.
→ number
Strings
Substring
Extract part of a string (1-based indexing).
→ string
Trim
Remove leading and trailing whitespace.
→ string
Replace
Substitute all occurrences of a substring.
→ string
IndexOf
Zero-based position of the first substring occurrence.
→ number
Length
Number of characters in a string.
→ number
Uppercase
Convert to uppercase.
→ string
Lowercase
Convert to lowercase.
→ string
ProperCase
Convert to title case.
→ string
Char
Character for a given ASCII code.
→ string
Concat
Join two or more strings.
→ string
Format
Format a value using a .NET format string.
→ string
Dates
Now
Current SFMC server date and time.
→ string
DateAdd
Add an interval to a date.
→ string
DateDiff
Difference between two dates in a given interval.
→ number
DateParse
Convert a string to a date object.
→ object
FormatDate
Format a date into a string pattern.
→ string
SystemDateToLocalDate
Convert system date to subscriber's local timezone.
→ string
Logic & Utility
ParseJSON
Parse a JSON string to a JavaScript object. SSJS equivalent of JSON.parse().
→ object
GUID
Generate a new globally unique identifier string.
→ string
IsEmailAddress
Validate a string as an email address format.
→ boolean
IsPhoneNumber
Evaluate whether a string is a valid phone number.
→ boolean
IsNull
Check if a value is null.
→ boolean
Empty
Check if a string is null, empty, or whitespace.
→ boolean
IIf
Inline if — return one of two values based on a condition.
→ any
URLEncode
URL-encode a string for safe use in query parameters.
→ string
CloudPagesURL
Build an encrypted CloudPages URL with optional parameters.
→ string
MicrositeURL
Generate a tracking URL for a microsite page.
→ string
AttributeValue
Safely retrieve a subscriber attribute value.
→ string
RaiseError
Stop execution and raise an error with optional skip-send.
→ void
Redirect
Redirect the browser to a specified URL.
→ void
Encryption & Encoding
Base64Encode
Encode a string to Base64.
→ string
Base64Decode
Decode a Base64-encoded string.
→ string
SHA256
Compute the SHA-256 hash of a string.
→ string
SHA512
Compute the SHA-512 hash of a string.
→ string
MD5
Compute the MD5 hash of a string.
→ string
EncryptSymmetric
Encrypt a string with AES or other symmetric algorithm.
→ string
DecryptSymmetric
Decrypt a symmetrically encrypted string.
→ string
AMPscript Bridge
GetValue
Retrieve the value of an AMPscript variable.
→ string
SetValue
Assign a value to an AMPscript variable.
→ void
TreatAsContent
Evaluate an AMPscript/HTML string and return rendered output.
→ string
SOAP API Helpers
Low-level SOAP API wrappers. For most SOAP operations, prefer WSProxy instead.
CreateObject
Instantiate a Marketing Cloud SOAP API object.
→ object
SetObjectProperty
Set a property on a SOAP API object.
→ void
AddObjectArrayItem
Append an item to a SOAP API object array property.
→ void
InvokeCreate
Execute a SOAP Create call.
→ string
InvokeRetrieve
Execute a SOAP Retrieve call.
→ object
InvokeUpdate
Execute a SOAP Update call.
→ string
InvokeDelete
Execute a SOAP Delete call.
→ string
InvokePerform
Execute a SOAP Perform action.
→ string
InvokeConfigure
Execute a SOAP Configure call.
→ string
InvokeExecute
Execute a SOAP Execute call.
→ string
InvokeExtract
Execute a SOAP Extract call.
→ string
InvokeSchedule
Execute a SOAP Schedule call.
→ string
HTTP
Simple HTTP functions — for full REST support see Script.Util.HttpRequest.
HTTPGet
Perform an HTTP GET request. Supports custom headers.
→ string
HTTPPost
Perform an HTTP POST with content type and payload.
→ string
HTTPRequestHeader
Get the value of an incoming HTTP request header.
→ string
Content
ContentBlockByKey
Render a Content Builder asset by customer key (global).
→ string
ContentBlockByName
Render a Content Builder asset by folder path and name (global).
→ string
ContentBlockByID
Render a Content Builder asset by numeric ID (global).
→ string
ContentImageByKey
Output an img tag for a Content Builder image by external key.
→ string
ContentImageByID
Output an img tag for a Content Builder image by numeric ID.
→ string
BeginImpressionRegion
Start a named impression tracking region.
→ void
EndImpressionRegion
End an impression region (optionally close all nested).
→ void