Loading
The online Trailblazer Community becomes read-only Oct 30, 2026Read More
Insurance
InsContractService:createLargeSizeRenewQuoteInBatch

InsContractService:createLargeSizeRenewQuoteInBatch

Use this service to allow for the control of how many Apex jobs to initiate, and the number of batches to run per Apex job, for contracts with a large number of root line items.

The service breaks down contract line items by the jobSize and batchSize parameters and then calls the renewal Integration Procedure to generate a new quote.

Class: InsContractService

Method: createLargeSizeRenewQuoteInBatch

Remote Options

Option

Description

contractId

Required.

Id of the large contract to be renewed.

renewalIPName

Required.

Name of the Integration Procedure that retrieves contract detail and creates the renewal quote.

quoteName

New name for renewal quote.

Default = contract name.

jobSize

Number of root contract line items, inside the contract, to be processed per asynchronous Apex job.

This parameter determines how many Apex jobs are instantiated, given the number of root contract line items inside the contract.

IMPORTANT: Salesforce allows a maximum five Apex jobs to run in parallel.

batchSize

Number of root contract line items to be processed, per batch job.

This parameter determines how many batches need to run, as per the given number of root line items needed to process within one job.

Input JSON

This service does not require an input JSON.

Output JSON

Here is a sample output JSON where jobSize = 2.

{
"apexJob2": "[{"rootItemIds":["a0t1J00000GkwlYQAR"],"quoteId":"0Q01J000001D9GNSA0","contractId":"8001J000000MzMtQAK"}]",
"apexJob1": "[{"rootItemIds":["a0t1J00000GkwlWQAR"],"quoteId":"0Q01J000001D9GNSA0","contractId":"8001J000000MzMtQAK"},{"rootItemIds":["a0t1J00000GkwlXQAR"],"quoteId":"0Q01J000001D9GNSA0","contractId":"8001J000000MzMtQAK"}]"}  
 
Loading
Salesforce Help | Article