FreeMarker Data Model

The FreeMarker data model uses a tree structure that's filled with data from NetSuite that matches the context in which a template is being used. Context determines which records you can reference for each type of email.

The NetSuite FreeMarker data model includes the following contexts and their supported records:

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

FreeMarker includes 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.

Scriptable templates also have extra synthetic fields for each context that you can't get in SuiteScript. For descriptions and a complete list of these fields, see Synthetic Fields for Scriptable Templates.

Related Topics

General Notices