Skip Navigation

Programmatic Marketing Content

control-j is the search shortcutj
Introduction to Programmatic Marketing Content
AMPscript
Guide Template Language
Server-Side JavaScript
Server-Side JavaScript Syntax Guide
Account Functions
AccountUser Functions
Content Area Functions
Data Extension Functions
DateTime Functions
Delivery Profile Functions
Email Functions
Events Functions
Filter Defintion Functons
Folder Functions
HTTP Functions
List Functions
Portfolio Functions
Query Definition Functions
Recipient Functions
Send Classification Functions
Send Functions
Sender Profile Functions
Subscriber Functions
Template Functions
Add
Retrieve
Update
Triggered Send Functions
Utilities Functions
Platform Functions
Server-Side JavaScript Sample Code
Use Server-Side JavaScript with AMPscript
Use Server-Side Javascript via WSProxy with the SOAP API
Server-Side JavaScript/Server-Side JavaScript Syntax Guide/Template Functions

Template Functions

Use these functions to interact with templates within a Marketing Cloud account.

Load

In your server-side JavaScript code, first load the core library using this syntax:

Platform.Load("core", "1");

Initialization

To interact with a template via server-side JavaScript, you must first initialize the object. The code below initializes a list with the external key of 'myTemplate'.

var t = Template.Init('myTemplate');
Salesforce logo