Logo

How can we help you?

Search our knowledge base to get answers to your questions, access video training & more!

Recurring Billing

Speed Up Invoice Processing with Multiple Batch Jobs

Updated 2 days ago

If you’re managing a high-volume subscription business, you know how crucial speed and efficiency are when it comes to invoice processing. The great news? You can now reduce processing time by using Multiple Batch Jobs in your recurring billing setup!

Let’s walk through what this enhancement means for you, how it works, and how to set it up.

Why Use Multiple Batch Jobs?

Previously, the system could only run one batch job at a time to create and collect invoices. That works fine for smaller volumes, but if you’re processing tens of thousands of subscription records, a single batch job can take hours.

With the new enhancement, you can split the workload into multiple parallel batches (up to 5), drastically reducing processing time.

How to Set It Up

Setting up multiple batch jobs is simple:

  1. Go to Payment Center Settings.

  2. Scroll down to the Recurring Scheduler section.

  3. Enter the desired number of batch jobs (maximum is 5).

  4. Click the Start button.Note: If the field is left blank, the system will default to a single batch job.

Image

How It Works Behind the Scenes

When you enter a number and click Start, the system will:

  • Spawn multiple jobs to create invoices.

  • Spawn multiple jobs to collect auto-pay invoices.

  • Spawn multiple jobs to collect installment payments.

Each batch job is allocated a portion of the workload using the LIMIT and OFFSET SQL clauses. For example:

If you have 100 recurring invoices and choose 3 batches, each batch will handle approximately 33 records:

  • Batch 1LIMIT 33 OFFSET 0

  • Batch 2LIMIT 33 OFFSET 33

  • Batch 3LIMIT 33 OFFSET 66

This helps distribute the processing load evenly.

Need to Restart

If a batch job is already running and you want to update the number of batches:

  1. Stop the current job.

  2. Enter the new number of batch jobs.

  3. Click Start again.

Things to Keep in Mind

Be aware of Salesforce governor limits:

  • Only 1 batch job can be actively starting at any given time.

  • You can have a maximum of 5 concurrent batch jobs queued or active.

Trying to schedule more than this may result in the error:
"Attempted to schedule too many concurrent batch jobs in this org."

Visual Example

Here’s a clean example of what the Multiple Batch Job on Apex section might look like:

Image

Final Thoughts

This update is especially helpful for large franchisee businesses or anyone dealing with a heavy load of recurring billing. Taking just a minute to adjust your batch job settings can save hours in processing time.

Give it a try and speed up your workflow today!

 

Availability: Spring '25

Previous

Performance Optimization for Recurring Invoice Batch Job

Next