Platform Functions
The Platform.Function.* API — Data Extension CRUD, dates, HTTP helpers, SOAP wrappers, and content helpers. Most calls do not require Platform.Load.
Most methods here are invoked as Platform.Function.MethodName(...).
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
InsertDE
Alias for InsertData.
→ number
UpdateDE
Alias for UpdateData.
→ number
UpsertDE
Alias for UpsertData.
→ number
DeleteDE
Alias for DeleteData.
→ number
Dates
Now
Current SFMC server date and time.
→ string
SystemDateToLocalDate
Convert system date to subscriber local timezone (send contexts).
→ string
LocalDateToSystemDate
Convert a local date value to the SFMC system date.
→ string
URLs, redirects, and browser detection
UrlEncode
Percent-encode a complete URL (optional reserved-character mode).
→ string
RedirectTo
Email href helper for attribute-driven redirect URLs (AMPscript/WS-FUEL).
→ void
IsCHTMLBrowser
Detect HTML vs text email clients.
→ boolean
Logic and parsing
ParseJSON
Parse a JSON string to a JavaScript object.
→ 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
RaiseError
Stop execution and raise an error with optional skip-send.
→ void
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 control see Script.Util.HttpRequest.
HTTPGet
Perform an HTTP GET request.
→ string
HTTPPost
Perform an HTTP POST with content type and payload.
→ string
Output helpers
Platform.Function.Write and Platform.Function.Stringify are documented alongside their global forms under Global Functions and Stringify.
Content
ContentBlockByKey
Render a Content Builder asset by customer key.
→ string
ContentBlockByName
Render a Content Builder asset by folder path and name.
→ string
ContentBlockByID
Render a Content Builder asset by numeric ID.
→ string
ContentImageByKey
Output an img tag for a Content Builder image by key.
→ string
ContentImageByID
Output an img tag for a Content Builder image by ID.
→ string
BeginImpressionRegion
Start a named impression tracking region.
→ void
EndImpressionRegion
End an impression region.
→ void
TreatAsContent
Evaluate AMPscript/HTML server-side. Security: never pass unvalidated user input.
→ string