Skip to main content

Create custom HTML templates for invoices

Zuora

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.

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.