Manage billing document configuration
Zuora offers the ability to configure whether to automatically generate files for billing documents through the Zuora UI. Billing documents include invoices, credit memos, and debit memos. Credit and debit memos are available only if you have the Invoice Settlement feature enabled.
To generate files for billing documents, you can select the Enable the billing document generation check box after navigating to Billing > Manage Billing Document Configuration. By default, this check box is selected, indicating Zuora generates files for billing documents.
If the function of automatically generate files for billing documents is enabled, you can easily create and manage your billing document templates. The billing document templates are used to generate PDF invoices for your bills. You can also customize the format of the numbers for billing documents.
Navigation: click your username at the top right and navigate to Billing > Manage Billing Document Configuration.
Disable billing document file generation
To disable the function of automatically generating files for billing documents, perform the following steps:
- Click your username at the top right and navigate to Billing > Manage Billing Document Configuration.
- On the displayed page, clear the Enable the billing document generation check box.
Only the Document Filename Patterns tab is displayed on the page.
The following table lists the expected behaviors upon trigger events after the function of automatically generating files for billing documents is disabled.
Trigger | Expected behavior |
---|---|
Invoice events: changes on invoices or invoice items
|
No files are generated for invoices. |
UI: view invoice PDF files |
|
UI: view invoice Word files | On the invoice details page, view > Invoice Word is unavailable, indicating that no Word files can be downloaded for the invoice. |
UI: regenerate PDF file for an invoice | On the invoice details page, more > Regenerate Invoice PDF is unavailable, indicating that no PDF files can be generated for the invoice. |
API: Synchronously or asynchronously create orders with Billing = True | No files are generated for invoices. |
UI/API: email invoice files |
If any files exist for an invoice and a notification is defined to include an invoice file, the last existing file is attached in the notification email. Otherwise, email invoice and more > Email Invoice are unavailable on the invoice details page. The emailing action fails with the API option for emailing invoice files. |
API: regenerate files for invoices | If you call the corresponding API operation, a message “The request cannot be done because billing document generation is disabled”. is returned. |
API: query invoice body | The last existing file for the invoice is downloaded if any. Otherwise, null is returned. |
API: get invoice file from Zuora 360 package in SFDC | The last existing PDF file for the invoice is downloaded if any. Otherwise, a message "No invoice was found" is returned. |
Export invoices | The last existing file for the invoice is downloaded if any. Otherwise, null is returned. |
Email notifications with invoice or payment attachments | If any files exist for an invoice and a notification is defined to include an invoice file, the last existing file is attached in the notification email. Otherwise, the “The notification cannot be sent” message is returned. |
Credit memos: same triggers as invoice
|
Same as invoices. |
Debit memos: same triggers as invoice
|
Same as invoices. |
Enable billing document file generation
To enable the function of automatically generating files for billing documents, perform the following steps:
- Click your username at the top right and navigate to Billing > Manage Billing Document Configuration.
- Click the Enable the billing document generation check box on the displayed page. If you want to configure specifically when PDFs are generated, then there are 3 cases that you can select,
- Allow PDF generation for draft billing documents.
- When Allow PDF generation for draft billing documents is disabled, PDFs cannot be generated manually or automatically while the document is in Draft status.
- When Allow PDF generation for draft billing documents is enabled, an additional option, Auto-generate PDF for draft billing documents, is available which is disabled by default.
- Auto-generate PDF for draft billing documents — When disabled, PDFs will not be automatically generated for all billing documents that are created or in Draft status. However, you can manually trigger regeneration from the UI or API to generate PDFs for billing documents in Draft status. When enabled, this field automatically generates PDFs for all billing documents that are created or in Draft status. However, it is visible only when the Allow PDF generation for draft billing documents option is enabled.
- Allow PDF generation for billing documents being posted — When the setting is enabled, PDF generation occurs automatically. However, if the setting is disabled, PDFs will not be generated automatically when billing documents move to the Posted status. Nevertheless, you can manually generate PDFs through the UI, API, or Email, regardless of the status of the settings, even when the billing document is in the Posted status.
- Allow PDF generation for billing documents when Payments and Refunds are applied — This setting serves multiple purposes; one involves the background generation of PDFs, and the other involves triggering the UI via the View PDF via UI button. You can configure the setting to one of the following:
- When this setting is enabled, accessing the PDF through the user interface will trigger its generation if it's not already available.
- When this setting is disabled, attempting to view the PDF via the UI will not generate it, regardless of its availability.
- Allow PDF generation for draft billing documents.
To understand the behavior, hover on the tooltip.
This configuration only applies to accounts that use HTML Templates and does not affect accounts that use Word Templates.
The following table lists the expected behaviours upon trigger events after automatically generating files for billing documents is enabled. Each column operates on the assumption that enabling one sub-configuration automatically disables the others.
Triggers | When: Enable Billing Document Generation = True and Allow PDF generation for draft billing documents = true Is the PDF file generated? (Yes/No) |
When: Enable Billing Document Generation = True and Allow PDF generation for billing documents being posted = true Is the PDF file generated? (Yes/No) |
When: Enable Billing Document Generation = True and Allow PDF generation for billing documents when Payments, Refunds, etc. are applied = true Is the PDF file generated? (Yes/No) |
---|---|---|---|
Invoice Generated in Draft status |
No Note: If the auto-generate PDF for draft billing documents option is enabled, PDFs are automatically generated. |
No | No |
Invoice Posted | No | Yes | No |
Invoice is applied by payments, credit memos. | No | No | Yes |
Re-generate PDF via UI or API |
Yes If the setting is disabled, a message, The request cannot be done because billing document generation for Draft documents is disabled, is displayed. |
Yes | Yes |
View Invoice PDF via UI | A PDF file will be generated if it does not already exist. | A PDF file will be generated if it does not already exist. | A PDF file will be generated if it does not already exist. |
Manage billing document templates
From the Manage Invoice Rules and Templates tab, you can view your list of existing invoice templates and create new templates. If you have the Invoice Settlement feature enabled, the Manage Invoice, Credit/Debit Memo Templates tab is displayed. You can also manage credit and debit memo templates in this setting.
You can use template Actions to set a template as your default, edit, preview, or remove a template. You can also show the ID of a template. Template IDs are used with the Zuora API. Billing document templates are set at the customer level, not at the product level.
System default template
The format of default billing document template is HTML. You can see that a template called System Default Template as the system default one the Manage Invoice, Credit/Debit Memo Templates tab. After understanding the relationship between the system default template and default custom invoice template, you might either change the default custom invoice template, or edit the system default template or the copied one.
Set system default template
You can select the default invoice template for Customer Accounts in the following ways:
- Configure invoice templates for customers via Zuora UI
- Configure invoice templates for customers via API
For more information about custom invoice templates, see Create custom HTML templates for invoices.
For more information about managing memo templates, see Generate memo PDFs with custom memo template.
Enable JavaScript for HTML templates
From the Settings tab, you can activate a security setting by selecting the Enable JavaScript for HTML templates check box after navigating to Billing > Manage Billing Document Configuration.
This setting applies to all existing and subsequently created HTML templates. With this setting enabled, XSS vulnerabilities can be effectively prevented.
Limitation
When this setting enabled, existing HTML templates that were previously error-free may be disrupted and require remediation of new errors if existing templates are to be used to generate documents.
Prefix & Numbering
See Prefix and Numbering Configuration for Billing Documents for more information.