Loading
Salesforce now sends email only from verified domains. Read More
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
          Clean Up Invoice Runs

          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)

          Required Editions

          Available in: Salesforce Classic and Lightning Experience
          Available in: Professional, Enterprise, Unlimited, and Developer Editions

          Most invoice runs are successful but some invoice runs encounter problems that are out of your control. An invoice run can fail because of permission issues, connectivity issues, system failures, row lock issues, or exceeding a governor limit. When such errors occur, the order products and usage summaries in the run aren’t processed.

          To clean up invoice runs, click Clean Up on the Invoice Run page. In Salesforce Classic, add Clean Up as a custom button on the Invoice Run page.

          Invoice run clean-up makes these changes.

          • Changes the status of invoices from Error, Initiated, or Draft to Canceled.
          • Changes the status of invoice lines from Error or Draft to Canceled.
          • Changes the status of order products from Error or In Progress to Pending Billing.
          • Changes the status of usage summaries from Error or In Progress to Pending Billing.
          • Removes the invoice run and invoice run start date of order products and usage summaries.

          These actions ensure that all the data from a failed invoice run is added to a new invoice run. Batch Apex Error Events generate detailed error logs and support multiple clean-up scenarios.

          The Completed with errors value in the CleanUp Status field of the Invoice Run object helps identify the processed invoice run clean-up errors correctly. Add this value to the CleanUp Status field from Object Manager or from the Picklist Value Sets setup page.

          You can also clean-up completed invoice runs without errors by changing the run’s status from Completed to Completed with errors. This clean-up runs on all affected records, except for invoices that have already been posted.

           
          Loading
          Salesforce Help | Article