Issue policies in bulk for the specified insurance policy IDs.
API Version
67.0
Requires Chatter
No
Signature
public static ConnectApi.InsurancePolicyBulkOutputRepresentation bulkIssueInsurancePolicy(ConnectApi.InsurancePolicyBulkInputRepresentation insurancePolicyBulkInput)
Input representation of the request to issue policies in bulk. The JSON input includes a field value map of insurance policy fields and a list of insurance policy IDs to issue.
Use this method to issue insurance policies in bulk. The JSON input includes a field value map of insurance policy fields and a list of insurance policy IDs. After the request is successfully sent to the message queue, policies are issued asynchronously, and you receive either a success or failure notification after the completion of the request.
Example
The Apex example shows how to use the ConnectApi.InsuranceBrokerageFamily.bulkIssueInsurancePolicy() method to issue multiple insurance policies in bulk.
Class Definition
This Apex example shows how to issue multiple policies in bulk.
1global class BulkIssueConnectDriver{23 global static void callBulkIssueConnectAPI(){4 Map<String, Object>input = new Map<String, Object>();56 ConnectApi.InsurancePolicyBulkInputRepresentation bulkInput = new ConnectApi.InsurancePolicyBulkInputRepresentation();78 List<String>policyIds = new List<String>{9 '0YTxx000000001dGAA',10 '0YTxx000000002dGAA',11 '0YTxx000000003dGAA'12};13 bulkInput.insurancePolicyIds = policyIds;1415 input.put('bulkInput', bulkInput);1617 Map<String, Object>output = new Map<String, Object>();18 Map<String, Object>args = new Map<String, Object>();19 args.put('input', input);20 args.put('output', output);2122 BulkIssueTestConnectAPI callable = new BulkIssueTestConnectAPI();23 Object result = callable.call('bulkIssue', args);2425 ConnectApi.InsurancePolicyBulkOutputRepresentation bulkData =26(ConnectApi.InsurancePolicyBulkOutputRepresentation)result;27 System.debug('Bulk Issue Data: ' + JSON.serializePretty(bulkData));2829 if(output.containsKey('error')){30 System.debug('Error: ' + output.get('error'));31}32}33}
Usage Example
Use the BulkIssueTestConnectAPI class to execute the bulkIssue action and process the result.