Background Processes

As an administrator of Billing Central, you can choose whether some processes use Batch Apex or Queueable Apex to process records in the background. The Use Queueable options in the Background Settings custom setting determine which method a process uses. See Background Process Settings.

Background Processing Options Available for Each Process
Process Batch Apex Queueable Apex
Activate Contracts Tick Tick
Amend Prices Always runs using Queueable Apex.
Apply Change Requests Always runs using Queueable Apex.
Assign Proration Tick Tick
Billing Tick Tick
Complete Billing Document Tick Batch Apex is always used when completing from the list view.
Convert Invoice Tick Batch Apex is always used when converting from the list view.
Discard Billing Document Tick Tick
Expire Contract Tick Tick
Generate Schedules Tick
Renew Contracts Tick Tick
Tax Breakdown Creation Tick
Update Total Billed

Tick

Tick

Batch Apex

If using Batch Apex, a single Batch Apex job is created. If validation errors occur while that job is running, the job is retried once, however records that exceed Salesforce limits are not retried. For Billing Central processes that can use Batch Apex, you can set the Scope Size. See Background Process Settings. For more information, see the Salesforce Help.

Diagram representing the linear way in which records are processed using Batch Apex.

Queueable Apex

You can choose Queueable Apex if you want records to be processed in parallel chains. If you have a large number of contracts to be billed, using Queueable Apex may increase the number of contracts you can process per hour. This depends on Salesforce resource allocation and the way in which objects have been customized on your Salesforce Org. For Billing Central processes that can use Queueable Apex, you can set the Queue Size and the Scope Size. See Background Process Settings. For more information, see the Salesforce Help.

Diagram representing the way in which records are processed in parallel queues when processed using Queueable Apex.

Depending on your Salesforce Org, this might be the optimal method for processing large numbers of records in Billing Central. If you encounter performance problems, use Batch Apex.

Notes:

Enter a lower value for the queue size to create more parallel queueable jobs. Records might be processed more quickly up to the maximum number of jobs that Salesforce can process at the same time.

Entering a higher value for the scope size results in a larger number of documents being processed in one go. This is subject to the Salesforce Execution Governors and Limits. Errors may occur if you enter a value which causes the Salesforce limits to be exceeded. See the Salesforce Help for more information.

If you have a large number of contracts to be billed, using Queueable Apex may increase the number of contracts you can process per hour. This depends on Salesforce resource allocation and the way in which objects have been customized on your Salesforce Org. If you encounter performance problems use Batch Apex.

The Scope Size only has an effect if it is lower than the Queue Size.