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
- Allow PDF generation for billing documents being posted
- Allow PDF generation for billing documents when Payments, Refunds, etc. are applied
To understand the behavior, hover on the tooltip. It's necessary to have access to My Tenant, which includes this feature.
The following table lists the expected behaviors upon trigger events after automatically generating files for billing documents is enabled.
Triggers | Expected results when: Enable Billing Document Generation = False |
Expected results when: Enable Billing Document Generation = True Upon Billing Document Posting = true only |
Expected results when: Enable Billing Document Generation = True Upon Billing Document applied with Payments, etc = true only |
Expected results when: Enable Billing Document Generation = True Upon Draft Billing Document Creation = true only |
---|---|---|---|---|
Event: changes on invoice & invoice item Payment/credit applied Payment refunded Split invoice Adjustments Invoice adjustment Invoice item adjustment Credit balance adjustment |
No file generated. | No file generated. | PDF file generated. | No file generated. |
Click the View Invoice PDF or the Regenerate Invoice PDF button of the draft invoices. |
No file generated. | No file generated. | No file generated. | PDF file generated. |
Invoice posted | No file generated. | PDF file generated. | No file generated. | No file generated. |
UI: regenerate invoice | Hide the menu. | Return a msg “The request cannot be done because billing document generation for Draft documents is disabled“ when the Invoice is in Draft status. Generate a new PDF file when the Invoice is Posted status. |
Return a msg “The request cannot be done because billing document generation for Draft documents is disabled“ when the Invoice is in Draft status. Generate a new PDF file when the Invoice is Posted status. |
Return a msg: “The request cannot be done because billing document generation for Posted documents is disabled“ when the Invoice is in Posted status. Generate a new PDF file when Invoice is in Draft status. |
API: regenerate invoice | Return a msg that “The request cannot be done because billing document generation is disabled”. | Same as above | Same as above | Same as above |
API (Sync/Async) Create Order with Billing = True | No file generated. | Should not trigger PDF generation when invoice is draft. Trigger PDF generation when invoice is posted. |
Should not trigger PDF generation when invoice is draft or posted. | Should not trigger PDF generation when invoice is Posted. Trigger PDF generation when invoice is Draft. |
UI: view PDF invoice | Download the latest PDF file if any. Otherwise, hide the menu. | Download the latest PDF file if any. | Download the latest PDF file if any. | Download the latest PDF file if any. |
UI: view Word invoice | Hide the menu. | Hide if HTML template is being used. Download the Word file, if any. |
Hide if an HTML template is being used. Download the Word file, if any. |
Hide if an HTML template is being used. Download the Word file if any. |
API: query invoice body | Download the latest file, if any. Otherwise, return null. | Download the latest file, if any. If the latest file doesn’t exist, Return null if the invoice is in Draft status. Generate a PDF if the invoice is in Posted status. |
Download the latest file, if any. If the latest file doesn’t exist, Return null if the invoice is in Draft status. Generate a PDF if the invoice is in Posted status. |
Download the latest file if any. If the latest file doesn’t exist, Generate PDF regardless the status. |
API: get invoice file from 360 package in SFDC | Download the latest PDF file, if any. Otherwise, show a message informing the user that “No invoice was found”. | Same as above. | Same as above. | Same as above. |
Export invoice | Download the latest file if any. Otherwise, return null. | Same as above. | Same as above. | Same as above. |
UI/API: email invoice | If the latest file exists and notification is defined to include an invoice file, attach the latest file. Otherwise, return a msg that “The invoice cannot be emailed”. | If the latest file exists and notification is defined to include an invoice file, attach the latest file. If the latest file doesn’t exist and a notification is defined to include an invoice file, Return a msg that “The invoice can’t be emailed.” if the invoice is in Draft status. Generate a PDF if the invoice is in Posted status. |
If the latest file exists and notification is defined to include an invoice file, attach the latest file. If the latest file doesn’t exist and a notification is defined to include an invoice file, Return a msg that “The invoice can’t be emailed.” if the invoice is in Draft. Generate a PDF if the invoice is in Posted status. |
If the latest file exists and notification is defined to include an invoice file, attach the latest file. If the latest file doesn’t exist and a notification is defined to include an invoice file, Generate PDF regardless of the status. |
Email notifications w/ invoice/payment attachment | If the latest file exists and notification is defined to include an invoice file, attach the latest file. Otherwise, return a msg that “The notification cannot be sent”. | If the latest file exists and notification is defined to include an invoice file, attach the latest file. If the latest file doesn’t exist and notification is defined to include an invoice file, Return a msg that “The notification can’t be sent.” if the invoice is in Draft status. Generate a PDF if the invoice is in Posted status. |
If the latest file exists and notification is defined to include an invoice file, attach the latest file. If the latest file doesn’t exist and notification is defined to include an invoice file, Return a msg that “The notification can’t be sent.” if the invoice is in Draft status. Generate a PDF if the invoice is in Posted status. |
If the latest file exists and notification is defined to include an invoice file, attach the latest file. If the latest file doesn’t exist and notification is defined to include an invoice file, Generate PDF regardless of the status. |
Credit memo: same triggers as invoice View Credit Memo PDF via UI View Credit Memo Word via UI Regenerate Credit Memo PDF via UI Regenerate Credit Memo PDF via API Email Credit Memo via UI/API Email Notification of Credit Memo |
Same as the invoice. | Same as the invoice. | Same as the invoice. | Same as the invoice. |
Debit memo: same triggers as invoice View Debit Memo PDF via UI View Debit Memo Word via UI Regenerate Debit Memo PDF via UI Regenerate Debit Memo PDF via API Email Debit Memo via UI/API Email Notification of Debit Memo |
Same as the invoice. | Same as the invoice. | Same as the invoice. | Same as the invoice. |
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.