Records and Fields Available in Website System Email Templates

This topic applies to

Applies to

SuiteCommerce Web Stores

The following table lists all the records and synthetic fields that are supported in the Text Editor field on the System Email Templates page and in template files you create and attach there. In addition to the synthetic fields, you can also use the standard record fields belonging to the listed records. System email 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. For more information about the sublists and synthetic fields supported for website system email templates see the help topic Web Site Notification Fields.

Record

Field

Available for Email Type

Web Site

customerCenterUrl

  • Order Received

  • Order Approved

  • Order Cancelled

  • Order Fulfilled

  • Download Available

  • License Code

  • Gift Certificate

  • Gift Certificate Confirmation

  • Password Recovery

  • Checkout Errors

  • Registration Confirmation

url

domain

downloadLink

  • Download Available

  • License Code

recoveryPasswordUrl

Password Recovery

errorTicket

Checkout Errors

cartContents

Sales Order

trackingLink

  • Order Received

  • Order Approved

  • Order Cancelled

  • Order Fulfilled

overviewTable

itemAvailabilities

This field can be used to calculate whether or not an item is out of stock. The calculation to obtain this information depends on how you have set up the ordering workflow in NetSuite. See Include Out of Stock Information in Web Store Email for more information.

licenses

License Code

Cash Sale

licenses

License Code

Item Fulfilment

trackingLink

Order Fulfilled

overviewTable

The following synthetic fields are not associated with a record but are available for use in system email templates for web stores:

Field

Usage

Available for Email Type

itemurls

Provides the URL of the item detail page.

Usage format:

${itemurls[item.internalId]}

  • Order Received

  • Order Approved

  • Order Cancelled

  • Order Fulfilled

  • Download Available

  • License Code

  • Gift Certificate

  • Gift Certificate Confirmation

  • Password Recovery

  • Checkout Errors

  • Registration Confirmation

itemimages

Provides the URL of the item image.

Usage format:

${itemimages[item.internalId]}

Note

When you use either of these fields, replace item.internalId with a valid item internal ID from your NetSuite account. This could be in the form of a constant number or a field containing the internal ID of the item, for example, itemline.item.internalId. For a usage example, see the Standard Web Site Order Received email template.


Include Out of Stock Information in Web Store Email

The itemAvailabilities synthetic field contains the number of items available for sale, taking into consideration items in warehouses minus items already committed to other orders. The exact formula to calculate whether or not an item is out of stock depends on how you have set up the ordering workflow in NetSuite. For example, it is possible to use scripts and custom workflows to change the point in the ordering process at which an order is fulfilled, thus affecting the items available in the warehouse. If your setup allows items to be set to ‘backordered’, this also affects the number of items available. Therefore, you should evaluate your workflows to determine how to use itemAvailabilities to calculate whether an item is out of stock. You can use the result of the calculation in a system email template to display whether the item is out of stock or not.

Note

itemAvailabilities applies only to inventory items, kits, and assembly items.


The following are some sample formulas that could be used to calculate whether an item is out of stock:

Workflow in which order needs to be approved after it is placed

<#if (itemAvailabilities[itemline.item.internalId])?has_content && (itemAvailabilities[itemline.item.internalId]?number - itemline.quantity <0)>
    This item is currently out of stock and may be back ordered.
</#if>

Workflow in which order is approved immediately after it is placed

<#if (salesorder.status == 'Pending Approval')>
    <#if (itemAvailabilities[itemline.item.internalId])?has_content && (itemAvailabilities[itemline.item.internalId]?number - itemline.quantity <0)>
      This item is currently out of stock and may be back ordered.
    </#if>
<#elseif (salesorder.status == 'Pending Fulfillment')>
    <#if (itemline.backordered?number gte 0)>
      This item is currently out of stock and was back ordered.
    </#if>
</#if>