Create custom HTML templates for invoices
With Zuora Billing, you can easily create and manage your invoice templates. Invoice templates are used to generate PDF invoices for your bills. The HTML Templates feature allows you to use an online HTML template editor to flexibly manage HTML templates for invoices according to business demands.
With HTML Templates, you can customize your invoice templates to have your company's look and feel (including adding your company's logo), and use merge fields to display only the billing and payments information you want your customers to see. The design for the invoice template is focused on flexibility and ease of use for the business user.
Note that invoice templates are set at the customer level, not at the product level.
Custom invoice template workflow
Use the following instructions with the HTML template to start creating your own invoice template.
First, create HTML invoice templates.
You can customize the HTML templates by configuring the following components:
- Configure rows and columns in HTML invoice templates
- Configure text and merge fields in HTML invoice templates
- Configure barcodes in HTML invoice templates
- Configure fonts in HTML invoice templates
- Configure summary tables in HTML invoice templates
- Configure data tables in HTML invoice templates
- Configure images in HTML invoice templates
- Configure HTML codes in HTML invoice templates
- Define date and numeric formats in HTML invoice templates
- Use custom objects in HTML invoice templates
- Configure headers and footers in HTML invoice templates
- Configure overall style for HTML invoice templates
Manage invoice templates
After you have created an invoice template, you can conduct the following operations:
Use cases for custom invoice templates
- Add watermarks to HTML invoice templates
- Configure open invoice tables in HTML invoice templates
- Configure payment tables in HTML invoice templates
- Configure subscription tables in HTML invoice templates
- Configure to display order line item information on invoices
- Configure to display payment sequences on invoices
- Configure to display prepaid balance fund information on invoices
- Configure to display subscription notes on invoices
- Configure to display subscription owner information on invoices
- Configure taxation details tables in HTML invoice templates
- Configure to display shipping contacts on invoices
- Use GroupBy function
- Use Group By configuration in data tables
- Use JavaScript in HTML invoice templates
System default template
To see the system default template, click your username at the top right and navigate to Billing > Manage Billing Document Configuration. In the Manage Invoice Rules and Templates tab (If you have the Invoice Settlement feature enabled, the Manage Invoice, Credit/Debit Memo Templates tab is displayed), a template called System Default Template is the system default one and its template format is HTML. The template can be renamed, but unlike other templates, it cannot be deleted.
The template file and settings for the system default template depend on whether you have uploaded any custom invoice templates.
If you have not uploaded any custom invoice templates, the template called System Default Template is set as the standard Zuora template file, which is available to download in the Manage Invoice Rules and Templates tab.
Relationship with the default custom invoice template
If you have uploaded a custom invoice template and set it as the default template (by clicking make default in the Actions column), the template called System Default Template will be linked to this template. Texts will be displayed next to the system default template name to indicate it is copied from another custom template.
The system default template will have the same file as the custom template, and also have the same settings.
Switch the default custom invoice template
You can make another uploaded template the default template by clicking make default in the Actions column. This copies the new default template file and settings to the template called System Default Template and overwrites its existing contents.
Edit system default template or copied default template
Clicking make default for an uploaded template does two things:
- It copies the template file and all settings from the uploaded template into the template called System Default Template.
- It creates a relationship between the uploaded template and the system default template.
For as long as the system default template and the copied default custom invoice template remain unchanged, the relationship is preserved. Texts are displayed next to the system default template name to indicate two templates are the same.
If you click edit on either template and change the contents in the HTML online editor, the relationship is broken. After the relationship is broken, the system message will no longer be displayed whenever there might be a difference in the results of invoice generation between the two templates. Renaming either template does not affect the relationship between templates.
Select default invoice template for Customer Accounts
The invoice template that is used for a particular customer is defined in that customer's profile. If you set a customer's profile to use the system default template, you can ensure that invoices sent to that customer will always use whichever template is linked to the system default template. This allows you to easily change the default template without having to update all your customer profiles each time.
Configure invoice templates for customers via Zuora UI
For instructions on changing a customer's invoice template, see Create a customer account. To ensure the customer always uses the default template, in the Billing and Payment Info section on the account details page, select System Default Template for the Invoice Template field.
Configure invoice templates for customers via API
The system default template has its own unique unchangeable ID value. The invoice template that is used for a particular customer is defined by the Account.InvoiceTemplateId
field. If you set this field to the ID of the system default template, you can ensure that invoices sent to that customer always use the default template that System Default Template is linked to.
To find the ID of the system default template, click your username at the top right and navigate to Billing > Manage Billing Document Configuration. In the Manage Invoice Rules and Templates tab, click show id in the Actions column on the system default template line. The ID is a long hexadecimal number, such as1028e262478a476401478a5034110c2b
.
You can set Account.InvoiceTemplateId
with a SOAP API update() call. In the following example, Id
is the customer account ID, and InvoiceTemplateId
is the ID of the System Default Template.
Merge fields for invoice templates
See Merge field syntax for HTML invoice templates for more information.
Merge field mapping for invoices
See Merge field mapping between Word templates and HTML templates for invoices for more information.