FreeMarker Data Model

The FreeMarker data model uses a tree structure that is populated with data from NetSuite that respects the context in which a template is being used. Context determines the records that can be referenced for a certain type of email.

The following contexts (and their supported records) are included in the NetSuite FreeMarker data model:

Context (Email Type)

Supported Records

Campaign and Sales Campaign Email

entity (either customer, contact, vendor, partner, or employee), parent company (if recipient is a contact), campaign event (couponCode field only)

Support Case Notification

case, customer

Customer Issue Notification

issue, case

Employee Issue Notification

issue

Online Form Notification

customer, online customer form (name field only)

Login Access Notification

entity

Marketing Subscriptions Opt-In Email

entity, subsidiary (mainaddress, name, edition, showsubsidiaryname, shippingaddress, federalidnumber, and returnaddress fields only)

Web Site Digital Delivery Notifications

  • web site, customer, sales order: available for all notifications

  • cash sale: available for all notifications except Gift Certificate notification

  • gift certificate: available for only Gift Certificate Notification and Gift Certificate Confirmation Notification

Web Site Order Notifications

  • web site, customer, sales order: available for all notifications

  • item fulfilment: available for only Order Fulfilled notification

Web Site Other Notifications

web site, customer

With FreeMarker, there are three types of nodes (or points where data is linked):

You can also use include directives to reference subtemplates that you use.

Note:

Scriptable templates use the same record, field, and sublist IDs that are used in SuiteScript. Refer to the SuiteScript Records Browser for a complete list of these IDs. You can use camel case or lower case in FreeMarker code.

There are additional synthetic fields that are not available for SuiteScript that are available in scriptable templates for each context. For descriptions and a complete list of these fields, see Synthetic Fields for Scriptable Templates.

Related Topics

General Notices