Loading
Prepare for Email to Become the Default Login ExperienceRead More
The online Trailblazer Community becomes read-only Oct 30, 2026Read More
Important Advisory: iOS Update Impacting CG Mobile ApplicationRead More
Insurance
InsPolicyService:renewPoliciesInBatch

InsPolicyService:renewPoliciesInBatch

Use this service to control the number of Apex jobs to initiate, and the number of batches to run per Apex job, for a large number of policy renewals.

Class: InsPolicyService

Method: renewPoliciesInBatch

How it Works

This service initiates multiple Apex jobs and each job renews the policies in batches by invoking createRenewalPolicy service internally.

  1. The service takes a list of policyIds.

  2. The service breaks the list into the desired sub-list policies and sends those to the createRenewalPolicy service for creation of renewal policies.

Note
Note To understand the limitations and what isn't supported, see Considerations and Limitations for Insurance Policies.

Inputs

Input

Description

policyId

The ID of the policy that is to be renewed.

Remote Options

Remote Option

Description

renewalClassName

The service class name (InsPolicyService.createRenewalPolicy) for creation of renewal policies.

jobSize

Number of policies to be renewed, per asynchronous Apex job.

This parameter determines how many Apex jobs are instantiated, given the number of policies to be renewed.

Important
Important

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

batchSize

Number of policies to be renewed, per batch job.

This parameter determines how many batches to run, as per the number of policies needed to process within one job.

Input JSON

Here's an example of the input JSON:

"policyIds": [
     "0YT5w000000Y8MNGA0",
     "0YT5w000000Y8MIGA0",
     "0YT5w000000Y8MDGA0",
     "0YT5w000000Y8M8GAK"
   ]

Output JSON

There's no output JSON for this service.

 
Loading
Salesforce Help | Article