← Support Home

Merge Fields

Merge fields allow you to include transaction-specific information in the parts of the invoice template that can be edited. As with many standard mail merge systems, you simply include the field with parentheses around it, ensuring the text has the correct case.

Note: Each of the below sections have their particular applicable merge fields. They do not work in other sections.

Sales and Purchases

Merge Field Merge Value/Text
{BalanceDue} Balance outstanding.
{BillingContact.FirstName}, etc See Contact Merge Fieldssection below for full list. Prefix with “BillingContact.”. E.g. {BillingContact.FirstName}, {BillingContact.LastName}, {BillingContact.ContactID}, {BillingContact.MobilePhone}, {BillingContact.MailingAddress.Street}, etc
{BillingContact.IsSpecified} Returns “true” if billing contact is specified or “false” otherwise.
{Ccy.Code} The currency code for this transaction. E.g. USD, EUR, GBP, AUD, SGD, NZD, etc.
{Ccy.Symbol}
{Ccy.Name}
{Date} The invoice date.
{Due} The invoice due date.
{TradingTerms.DisplayText} The text describing the type of terms structure.
{TradingTerms.Type} The type such as Due, Days after End of Month (EOM+) or Cash on Delivery.
{TradingTerms.Interval} The interval of time
{TradingTerms.IntervalType} The type of interval, days, weeks, months etc. Note: Days only for "Days after End of Month"
{HasDiscounts} Returns “true” if current invoice has discounts applied.
{InvoiceNumber.Label} For order and invoice: Invoice #
For quote: Quote #
{InvoiceNumber}
{InvoiceType.PrintDescription} Zone-sensitive invoice type description. E.g. Invoice, Tax Invoice, Adjustment Note, Credit Note, etc.
{IsInvoice} Returns “true” if current status is invoice or “false” otherwise.
{IsOrder} Returns “true” if current status is order or “false” otherwise.
{IsPurchase} Returns “true” is current invoice is a purchase invoice or “false” otherwise.
{IsQuote} Returns “true” if current status is quote or “false” otherwise.
{IsSale} Returns “true” is current invoice is a sale invoice or “false” otherwise.
{Notes.Internal}
{Notes.Pdf}
{PurchaseOrderNumber.Label} Displays “PO #”
{PurchaseOrderNumber}
{ShippingContact.FirstName}, etc See Contact Merge Fieldssection below for full list. Prefix with “ShippingContact.”.
{ShippingContact.IsSpecified} Returns “true” if shipping contact is specified or “false” otherwise.
{Summary}
{TotalExcTax} Invoice total excluding tax.
{TotalIncTax} Invoice total including tax.
{TotalPayment} Total payment applied to this invoice.
{TotalTax} Total tax in the invoice.
{HasAmountOwed} Any outstanding amount for the invoice?

The following merge fields should only be used in the line item section of the theme. They MUST be enclosed within the following comment tags:

1
	2
	3
	4
	5
	6
	7
	8
	9
	10
	11
	
<!-- Begin Service Invoice Line Items -->
	<!-- Begin Service Invoice Line Item -->
	--- Line item merge fields could only be used here ---
	<!-- End Service Invoice Line Item -->
	<!-- End Service Invoice Line Items -->
	 
	<!-- Begin Item Invoice Line Items -->
	<!-- Begin Item Invoice Line Item -->
	--- Line item merge fields could only be used here ---
	<!-- End Item Invoice Line Item -->
	<!-- End Item Invoice Line Items -->

Also note that ALL the comment tags above MUST exist in the sale and purchase theme. Otherwise, your theme will only work with either a service invoice or an item invoice, but not both. See the existing theme for sample implementation.

Item Invoice Line Items

Merge Field Merge Value/Text
{LineItem.Quantity}
{LineItem.Item.Code}
{LineItem.Item.SupplierItemCode}
{LineItem.Item.Description}
{LineItem.Attributes.’Attribute Name’} Replace ‘Attribute Name’ for attributes e.g. Location or Serial #.
{LineItem.TaxCode}
{LineItem.TaxCode.Description}
{LineItem.TaxRate}
{LineItem.UnitPriceExcTax}
{LineItem.UnitPriceIncTax}
{LineItem.PercentageDiscount}
{LineItem.Tax}
{LineItem.TotalExcTax}
{LineItem.TotalIncTax}

Service Invoice Line Items

Merge Field Merge Value/Text
{LineItem.Description}
{LineItem.TaxCode}
{LineItem.TaxCode.Description}
{LineItem.TaxRate}
{LineItem.Tax}
{LineItem.TotalExcTax}
{LineItem.TotalIncTax}

Date Merge Fields

With Date merge field you can display dates using merge fields that can calculate. Calculations are done based on the transaction date.

Some examples are:

  1. {Date+0D}
  2. {Date+7D}
  3. {Date+2W}
  4. {Date+1M}

UPDATE:
You now have the ability to combine a range of calculations. For example :
{Date+1M-1Y+15D} or {Date+2W-10D+5w+3M-2M+5D} etc.. you get the idea.

Basically you can keep going with the addition and subtraction of time periods.

Also, there are now 2 new functions:

These new functions expect a string as the argument. For example:
{FirstDayOfMonth("23 Aug 12")} will equal “1 Aug 12”
{LastDayOfMonth("15 Sep 2012")} will equal “30 Sep 12”

These new functions provide most benefit when combined with the previous Date calculation. For example:
{FirstDayOfMonth({"Date+1M"})} ß if run in Aug, this would result in “1 Sep 2012”
{LastDayOfMonth({"Date+3M+1Y"})} ß if run in Aug 2012, would result in “30 Nov 2013”

You can use Date merge fields in:

  1. description and summary fields in Sales or Purchases.
  2. also use them in your Templates and Themes.

This is very useful if you bill for fixed time periods. e.g. If we have an Automated Sale invoice on the 10th of each month that will be recurring we can set up an Automated Sale with the Summary field set to “For {Date+0D} to {Date+1M}” then it will display as “For 10Jan12 to 10Feb12″.

Remittances and Receipts

NOTE: For remittance and receipt templates, add ‘BillingContact’ to the beginning of contact related merge fields. For example, to display the full name of the billing contact, use {BillingContact.FullName}.

Merge Field Merge Value/Text
{Ccy.Code} Currency code of the payment currency.
{PaymentAmount} The total payment amount.
{DatePaid}
{DateCleared}
{Reference}
{Summary}

Remittance and Receipt Line Items

Merge Field Merge Value/Text
{LineItem.IssuedDate} The invoice date.
{LineItem.InvoiceNumber} For remittance, this is the invoice number issued to you by the supplier. For receipt, this is the invoice number issued by you to the customer.
{LineItem.PurchaseOrderNumber} For remittance, this is the purchase order number issued by you to the supplier. For receipt, this is the purchase order number issued to you by the customer.
{LineItem.Amount} The total amount of an invoice.
{LineItem.Paid} The total amount paid for an invoice.
{LineItem.Outstanding} The total amount outstanding for an invoice.

Contacts

NOTE: For invoice templates, add ‘BillingContact’ or ‘ShippingContact’ to the beginning of the merge field. For example, to display the full name of the billing contact, use {BillingContact.FullName}. This is different to ‘statement’ templates, see the next graph below for instructions on using contact merge fields on ‘statement’ templates.

{AcceptCheque}Returns “true” or “false”

Merge Field Merge Value/Text
{Title}
{FirstName}
{Initial}
{LastName}
{FullName}
{Company.Name}
{Company.TradingName}
{Company.BusinessNumber}
{Company.Website}
{PositionTitle}
{Email}
{Website}
{TwitterID}
{SkypeID}
{MainPhone}
{HomePhone}
{MobilePhone}
{OtherPhone}
{Fax}
{MailingAddress.IsSpecified}
{MailingAddress.Street}
{MailingAddress.City}
{MailingAddress.State}
{MailingAddress.PostOrZipCode}
{MailingAddress.Country}
{ShippingAddress.IsSpecified}
{ShippingAddress.Street}
{ShippingAddress.City}
{ShippingAddress.State}
{ShippingAddress.PostOrZipCode}
{ShippingAddress.Country}
{ContactID}
{ContactManager.Title}
{ContactManager.FirstName}
{ContactManager.Initial}
{ContactManager.LastName}
{ContactManager.FullName}
{ContactManager.ContactID}
{CustomField1}
{CustomField2}
{AcceptDirectDeposit} Returns “true” or “false”
{DirectDeposit.AccountName}
{DirectDeposit.BranchOrRouteNumber}
{DirectDeposit.AccountNumber}
{Cheque.PayableTo}

Statements

NOTE: For statement templates, simple prefix with “Contact” e.g. {Contact.FirstName} or {Contact.MobilePhone}. These merge fields can be used in both PDF invoices and email messages from Saasu.

The screenshot below shows the templates that these merge fields relate to:

Merge Field Merge Value/Text
{Contact.FirstName}, etc See the Contact Merge Fieldssection for a full list. Prefix with “Contact.”. E.g. {Contact.FirstName}, {Contact.LastName}, {Contact.ContactID}, {Contact.MobilePhone}, {Contact.MailingAddress.Street}, etc.
{PeriodFrom} Statement start date.
{PeriodTo} Statement end date.
{Balance} Running balance as at statement end date.
{Total.Invoice} Total of all invoices included in the statement. This amount includes tax.
{Total.Tax} Total tax in the statement.
{Total.Payment}

The following merge fields should only be used in the line item section of the theme.

Merge Field Merge Value/Text
{LineItem.Date}
{LineItem.DueDate}
{LineItem.DueDate.IsSpecified}
{LineItem.Summary}
{LineItem.InvoiceNumber}
{LineItem.PONumber}
{LineItem.InvoiceAmount}
{LineItem.PaymentAmount}
{LineItem.PaymentReference} Reference for payment. For invoices, this will always be blank.
{LineItem.Amount} The line item amount. Show the invoice amount if the current line is an invoice, or payment amount multiplied by -1 for payment.
{LineItem.Tax} Tax amount for current invoice.
{LineItem.Balance} Running balance, current line.
{LineItem.ShipToFirstName}
{LineItem.ShipToLastName}
{LineItem.ShipToCompany}
{LineItem.ShippingContact}
{LineItem.IsOpeningBalance}
{LineItem.IsInvoice}
{LineItem.IsPayment}

Outstanding Invoices

NOTE: For outstanding invoice templates, simple prefix with “Contact” e.g. {Contact.FirstName} or {Contact.MobilePhone}. These merge fields can be used in both PDF invoices and email messages from Saasu.

The screenshot below shows the templates that these merge fields relate to:
outstanding-invoices

Merge Field Merge Value/Text
{Owed}
{Total}

Payslips

Merge Field Merge Value/Text
{PayDate}
{Employee.FirstName}
{Employee.LastName}
{Employee.FullName}
{Employee.MailingAddress}
{PayPeriod.From}
{PayPeriod.To}
{AnnualGrossPay}
{EmploymentType}
{PayRateMethod}
{PayFrequency}
{RegisteredAgreement}
{EmployeeClassification}
{DirectDeposit.AccountName}
{DirectDeposit.BranchOrRouteNumber}
{DirectDeposit.AccountNumber}
{GrossPay.ThisPeriod}
{GrossPay.Ytd}
{NetPayBanked.ThisPeriod}
{NetPayBanked.Ytd}
{Notes.Pdf}
{Notes.Internal}

The following merge fields should only be used in the line item section of the theme.

They MUST be enclosed within the following comment tags:

1
	2
	3
	4
	5
	
<!-- Begin Wages And Salaries Pay Item -->...<!-- End Wages And Salaries Pay Item -->
	<!-- Begin Deductions Pay Item -->...<!-- End Deductions Pay Item -->
	<!-- Begin PAYG Witholding Pay Item -->...<!-- End PAYG Witholding Pay Item -->
	<!-- Begin Employer Contributions Pay Item -->...<!-- End Employer Contributions Pay Item -->
	<!-- Begin Entitlements Pay Item -->...<!-- End  Entitlements Pay Item -->

Please see the existing payslip theme for sample implementation.

Merge Field Merge Value/Text
{LineItem.PayItem.Name}
{LineItem.PayItem.Name.CssClass} Pay item name, in css friendly format. E.g. If pay item name is “Base Salary”, the css class name generated is “base-salary”.
{LineItem.PayItem.Notes}
{LineItem.Hours}
{LineItem.Rate}
{LineItem.Amount}
{LineItem.Ytd} Financial year-to-date amount, from 1 Jul to 30 Jun. Other financial year ends will be supported in the future.

Common Merge Fields

The following are merge fields that could be used across all Templates and Themes.

Merge Field Merge Value/Text
{Saasu.BaseUrl} Returns the BaseUrl for Saasu Web App, which is: https://secure.saasu.com/a/
{Today} Today’s date.
{T} Same as {Today}
{CTName} Consumption tax name for your Zone, e.g. GST, VAT, Sales Tax.
{ZoneUid} Internal tax zone uid.
{ZoneName} Tax zone name
{CTRate} Consumption tax rate.
{BIType} Zone specific contact business identifier type. E.g. For Australia, it’s ABN.
{Logo.IsSpecified}
{Logo.Url} Full url for the selected logo.
{Image.Url} Url for the image folder holding all of the uploaded logos.
{IsSpecified({MergeFieldToCheck})} Usage example: {IsSpecified({InvoiceNumber})}

This will check whether {InvoiceNumber} contains any values or not and returns “true” or “false” accordingly.

Using Sales and Purchase Merge Fields

For example, if you were to include the text,

Remittance advice for invoice number {InvoiceNumber} dated {Date}. The amount outstanding is {BalanceDue} {Ccy.Code}.

Then this would appear on the PDF,

Remittance advice for invoice number 001 dated 01-Jul-02. The amount outstanding is 100 AUD.

Referencing Image Files

You can upload and reference image files in Saasu to add images to your documents. Follow these steps:

  1. Select View > Templates > Open the template you wish to add images to.
  2. Use the Upload link beside your logo file to load one or more images into your Saasu file.
  3. When you have finished uploading these files, change this back to your standard logo image before saving.
  4. In your HTML code template (or in your theme code), use the following merge field: {Image.Url} followed by your image name. For example:
    1
    	
    <img alt="" src="{Image.Url}MySecondImage.jpg" />
  5. Click Preview to check that your image file is displaying.

Merge Fields Rules

Dynamically displayed information

You are able to display information dynamically an example would be to show certain information based on the type of transaction. For example: you want to show a certain block of text when printing Quotes, but a different block of text when printing Invoices. This would be reflected as such:

<span class=”show-inline-{IsInvoice}”>invoice text</span>

<span class=”show-inline-{IsQuote}”>quote text</span>

This is achieved through the use of the standard CSS class (which is included in inbuilt Themes):

.show-inline-true, .hide-inline-false {
display: inline;
}

So if you add the above HTML within the tag it should display fine, but feel free to contact our service team if you have any issue with this.