Loading
Manage Your Billing Processes with Salesforce Billing
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          Invoice Schedulers for Automating Invoice Creation

          Invoice Schedulers for Automating Invoice Creation

          Set up an invoice scheduler for your billable order products so invoices can be generated automatically. (Salesforce Billing Managed Package)

          Required Editions

          Available in: Salesforce Billing Winter ’18 and later

          Invoice Schedulers

          An invoice scheduler uses an invoice run to evaluate whether and when an order product gets invoiced. The invoice scheduler's Type field defines the time frame for your invoice run: Daily, Weekly, Monthly, or Once. After selecting the type, choose a date and time for the invoicing process to begin, such as the starting date of a subscription or service. Then set your target dates as follows:

          • Target Date: Set a date for a one-time invoice run.
          • Target Day of Week: Choose a number corresponding with a day of the week (1=Saturday) for weekly invoice runs.
          • Target Day of Month: Choose the day of the month for monthly invoice runs.

          Use your scheduler’s invoice date fields to define the start date of the invoices that your invoice run creates. These dates must also match the time frame you set with the Type field.

          • Invoice Date: Use this field if your invoice run is a one-time event.
          • Invoice Day of Week: Choose a number for the day of the week (1=Saturday) if your invoice runs every week.
          • Invoice Day of Month: Use this field if your invoice run is a monthly event.
          Note
          Note If the invoice day of month isn’t in a certain month, the scheduler can’t launch an invoice run. For example, if the invoice day of month was 31, the scheduler can’t launch a run in months with 30, 29, or 28 days. You must add the Run at End of Month field to the invoice scheduler’s page layout, then create an invoice schedule and select Run at End of Month. Select a Start Date Time that's on the last day of the current month. As long as the invoice scheduler is active, future invoice runs launch on the last day of the month.

          Select one or more invoice batches using the multi-select picklist to include those batches in the run. If this field is set to null, only those orders with null in the batch are picked up.

          The invoice scheduler kicks off invoice runs when it hits the start time that you specify. For example, if you set up a monthly invoice scheduler to run on the 15th of every month, it runs on the next occurrence of the 15th of the month. You can’t start a monthly invoice scheduler on the same day of the month for a future month, unless the date in your current month has passed. For example, if today is August 15, you can't set up a monthly invoice schedule to start on September 20.

          Important
          Important The Invoice Scheduler creator must have all the permissions to create and post invoices in addition to the permission to author Apex. See Salesforce Billing Permission Requirements. 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 point in the future up to 11:59:59 PM.

          Invoice Runs

          When your invoice scheduler hits its target, it creates an invoice run. An invoice run is like a net that trawls for eligible order products. When an unbilled order product matches the invoice run’s criteria, it’s included in the next invoice. Salesforce Billing stores Invoice Run criteria as a record in the Invoice Scheduler’s Invoice Run Related List.

          The invoice run inherits its Target Date from one of these values.

          • Invoice scheduler’s Target Date value
          • A specific date based on your Target Day of Week field or Target Day of Month field values

          The invoice run also inherits its Invoice Date from your scheduler’s Invoice Date, or a date based on the target day of week or month. All invoices generated from an invoice run inherit their start dates from the Invoice Run’s Invoice Date.

          Invoice Run Criteria

          All Order Products

          • Activated checkbox is selected.
          • The order’s invoice batch must match the invoice scheduler’s invoice batch.
          • Next Billing Date or Override Next Billing Date must be before or on your invoice run’s Target Date.
          • In multicurrency orgs, the currency matches your invoice run’s currency, or the invoice scheduler’s Include All Currencies field is selected.
          • Hold Billing is set to No.
          • Invoice Run Processing Status has a value of Pending Billing. If a billing rule’s Generate Invoice field has a value of Yes, all the rule’s order products are created with an invoice run processing status set to Pending Billing. Otherwise, order products are created with an invoice run process status of Will Not Invoice. We recommend using Generate Invoice to control invoice run processing status on your order products. If an invoice run ignores an uninvoiced order product with a Will Not Invoice status, and a user changes the status to Pending Billing, Salesforce Billing won’t invoice the order product until the next invoice run or Bill Now process.

          Order Products with Usage Summaries

          • All of the previously listed order product criteria, and the following:
          • The invoice run’s parent invoice scheduler has the Bill Usage Charges field selected.
          • Invoice Run Processing Status has a value of Pending Billing. When the charge type is Usage, this field’s value is also controlled by the same billing rule that controls the usage summary’s parent order product. Otherwise, it's controlled by the Billing Rule on the Consumption Schedule.
          • The Next Billing Date of any usage summaries that you want to invoice must be before the invoice run's target date.
          • Usage Summaries are picked up only for invoicing if both the invoice run’s Bill Usage Charges field is True and the Next Billing Date on the Usage Summary is before the invoice run’s Target Date value.

          After your invoice run has evaluated its available order products, it generates an invoice based on the billing data of the invoiceable order products.

          Important
          Important Invoice schedulers update several order product fields during an invoice run. If you added triggers, process builders, flows, or workflow rules to orders, order products, invoices, or invoice lines, we recommend testing them during an invoice run in a development org.
          Example
          Example You want a one-time invoice scheduler that begins immediately on August 1 and picks up all your unbilled order products. Create an invoice scheduler record as follows.
          • Target Date: 08/01/2018
          • Start Date Time: 08/01/2018 sometime before 11:59:59 PM
          • Invoice Date: 08/01/2018
          Your org contains the following product and its related order product:

          Product

          • Standard Price: $1000
          • Billing Frequency: Monthly
          • Charge Type: Recurring
          • Billing Type: Advance
          • Active: True

          Order Product

          • Quantity: 20
          • Start Date: 08/01/2018
          • End Date: 07/31/2019

          On August 1, your invoice schedule launches your invoice run, which creates the following invoice:

          Invoice

          • Invoice Date: 08/01/2018
          • Subtotal: $200,000

          Your order product also updates its billed amount to $200,000.

          • Guidelines for Invoice Runs
            When you make an invoice scheduler and define parameters for its invoice runs, consider key guidelines. (Salesforce Billing Managed Package)
          • Clean Up Invoice Runs
            Clean-up invoice runs to correct any system errors, and reset order products and usage summaries. After an invoice run clean-up, another invoice run picks up eligible order products and usage summaries. (Salesforce Billing Managed Package)
          • Cancel Upcoming Invoice Runs
            Cancel upcoming invoice runs by deleting the Scheduled Job record of the parent invoice scheduler. (Salesforce Billing Managed Package)
           
          Loading
          Salesforce Help | Article