8.11.1 Configure the APEX Batch Size

Configure Feature Setting BatchSize

In order to improve the performance for business-critical jobs you can limit the batch size by configuring a Feature Setting BatchSize. This can also help to avoid CPU Time Limit error messages. 

If you come across CPU errors related to one of the batches, it's recommended that you reduce the batch size to avoid any issues:

  • For example, if the batch size is set at 100, we suggest you decrease it to 50 to ensure a smooth and error-free process.

  • Similarly, if the batch size is 50, we recommend reducing it to 25 for optimal results without any errors.

Navigate to the App Launcher and search for Feature Settings. Open the Record with the Feature Setting Name BatchSize and the Feature Name GenericBatch

Use {"GenerateInvoice":1,"InvoiceAutomaticDelivery":100,"BillingRun":5,"PublisherPayout":{"PublisherPayoutCreditNote":15,"PublisherPayoutCollect":15},"CommitmentsCounting":50,"Subscription":200}

Where:

  • GenerateInvoice controls how many Media Campaigns will be processed within one batch to generate PreInvoices

  • InvoiceAutomaticDelivery controls how many invoice items will be processed within one batch to update the delivery data invoice items related fields from revenue schedule records

  • BillingRun controls how many records related to the billing run phases will be processed within one batch to generate Invoices, create Pdfs and send out emails

  • PublisherPayout controls how many Media Campaigns will be processed within one batch to generate PreInvoices

    • PublisherPayoutCreditNote controls how many Published payout conditions will be processed within one batch to generate Credit notes

    • PublisherPayoutCollect controls how many Invoice items will be processed within one batch to generate Collection records

  • CommitmentsCounting controls how many Campaign items will be processed within one batch to update the counting fields on the commitment conditions

  • Subscription controls how many Subscription records will be processed within one batch to create Media Campaigns

Make sure to use the exact same syntax as above while modifying the values:

 The Values are comma-separated, should start with a { and enclose the feature name with ". 

This feature-setting record is a generic record that can currently be used for the following features.

Pre-invoice Scheduled Batch Job

We have improved the Pre-Invoice Scheduled Batch Job by allowing customers to limit the media campaigns included in the batch. The customers can now select which media campaigns are needed to process. More details are here.