You are here:
Guidelines for Invoice Runs
When you make an invoice scheduler and define parameters for its invoice runs, consider key guidelines. (Salesforce Billing Managed Package)
Required Editions
| Available in: Salesforce Billing Winter ’18 and later |
Invoice runs are subject to Salesforce governor limits. If your invoice runs process many order products, or many order products and usage summaries, you may encounter Apex errors. Customizations on processed objects may cause Apex errors as well. We recommend testing your invoice runs for scalability when the total number of records processed per invoice run exceeds 200,000, and when your invoice runs process objects that have customizations.
You can use target dates to generate invoices ahead of the actual invoice date. For example, you can generate an end-of-month invoice before the end of the month. This process is useful if you want to create an invoice for internal review before sending it to customers. If you wanted to generate your end-of-January invoices on January 29 but keep the invoice start date as January 31, you would set the following fields on the invoice scheduler:
- Start Date/Time: 1/29/xx xx:xx:xx
- Target Date: 1/31/xx
- Invoice Date: 1/31/xx
This setup causes the invoices to generate on January 29 while billing through January 31, with a start date of January 31 as well.
By default, invoice runs generate invoices in draft status. You can then post all the run's draft invoices by selecting the invoice run's Post All Invoices button. The Post All Invoices process doesn't affect canceled invoices. If you select the invoice scheduler's Automatically Post Invoices field, each invoice run automatically posts its invoices at the end of the run.
If you want your invoice run to evaluate only order products from a certain account or accounts, set your scheduler and account to have matching Invoice Batch values.
Daily invoice schedulers must use the record’s creation date for their target date and start date time. The start date time’s timestamp can be any time in the future.

