Including Information from NetSuite Records in Dunning Templates
Creating templates requires knowledge of XML and FreeMarker.
When creating a dunning template, you can include the following information from NetSuite records:
Record |
Description |
Usage |
---|---|---|
employee |
Contains information from the employee record. |
Prefix with |
customer |
Contains information from the customer record. |
Prefix with |
companyInformation |
Contains information from the company information record. |
Prefix with |
invoice |
Contains information from the invoice record. |
Prefix with |
invoicelist |
Contains information from the invoice search result. |
This is a special sublist search that can be embedded in the dunning template. This is applicable to dunning procedures assigned to customers. |
invoicegroup |
Contains information from the invoice group record. |
Prefix with |
invoicegrouplist |
Contains the list of invoice groups for customer level dunning. |
Prefix with |
If you add fields from other record types, no data will be retrieved for those fields.
The following examples show the correct format for the fields in the dunning template:
-
Employee (Dunning Manager or Dunning Director)
Employee
These fields can be added to both PDF and email template types. The data is sourced from the employee record.
firstname
<span>${employee.firstname}</span>
Displays the first name of the dunning manager or dunning director.
lastname
<span>${employee.lastname}</span>
Displays the last name of the dunning manager or dunning director.
middlename
<span>${employee.middlename}</span>
Displays the middle name of the dunning manager or dunning director.
Customer
These fields can be added to both PDF and email template types. The data is sourced from the customer record.
companyname
<span>${customer.companyname}</span>
Displays the customer name. Applicable only if the customer is a company.
lastname
<span>${customer.lastname}</span>
Displays the customer’s last name. Applicable only if the customer is an individual.
middlename
<span>${customer.middlename}</span>
Displays the customer’s middle name. Applicable only if the customer is an individual.
firstname
<span>${customer.firstname}</span>
Displays the customer’s first name. Applicable only if the customer is an individual.
overduebalance
<span>${customer.overduebalance}</span>
Displays the customer’s overdue balance.
Invoice
These fields can be added to both PDF and email template types. The data is sourced from the invoice record.
amountremaining
<span>${invoice.amountremaining}</span>
Displays the remaining unpaid invoice amount. Applicable only to dunning procedures assigned to invoices.
currency
<span>${invoice.currency}</span>
Displays the currency of the invoice. Applicable only to dunning procedures assigned to invoices.
Invoice List
In addition to NetSuite records, you can also add information from invoice search results. To use the invoice sublist, you must enclose it within <span></span>
tags.
Example
<span>
<#if invoicelist?has_content>
<#list invoicelist as invoice>
<!-- insert invoice search information here -->
</#list>
</#if>
</span>
Search columns that you have added to the predefined transaction saved search (customsearch_dunning_invoice) can be added to the invoice sublist. See Including Fields from the Transaction Saved Search in Dunning Templates.
Invoice Group
These fields can be added to both PDF and email template types. The data is sourced from the invoice group record.
amountdue
<span>${invoicegroup.amountdue}</span>
Displays the unpaid due amount of the invoices that are part of an invoice group. Applicable only to dunning procedures assigned to invoice groups.
currency
<span>${invoicegroup.currency}</span>
Displays the currency of the invoice group. Applicable only to dunning procedures assigned to invoice groups.
duedate
<span>${invoicegroup.duedate}</span>
Displays the due date of the invoice group. Applicable only to dunning procedures assigned to invoice groups.
dunningprocedure
<span>${invoicegroup.custrecord_dl_ig_dunning_procedure}</span>
Displays the dunning procedure assigned to the invoice group. Applicable only to dunning procedures assigned to invoice groups.
invoicegroupnumber
<span>${invoicegroup.invoicegroupnumber}</span>
Displays the invoice group number of the invoice group. Applicable only to dunning procedures assigned to invoice groups.
Invoice Group List
In addition to NetSuite records, you can also add information from invoice group search results. To use the invoice group sublist, you must enclose it within <span></span>
tags.
Example
<span>
<#list invoicegrouplist as invoicegrouprecord>
<!-- insert invoice group and invoice search information here -->
</#list>
</span>
Search columns that you have added to the predefined transaction saved search (customsearch_dunning_invoicegroup) can be added to the invoice sublist. See Including Fields from the Transaction Saved Search in Dunning Templates.