Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.
Reinstate Insurance Policy Action
This action is available in API version 65.0 and later.
Supported REST HTTP Methods
- URI
- /services/data/v68.0/actions/standard/reinstateInsurancePolicy
- Formats
- JSON
- HTTP Methods
- POST
- Authentication
- Authorization: Bearer token
Inputs
| Input | Details |
|---|---|
| reinstatePolicyInputRep |
|
Outputs
| Output | Details |
|---|---|
| reinstatedPolicyId |
|
Example
- POST
-
This is a sample request to call this invocable action.
1{ 2 "inputs": [ 3 { 4 "ReinstatePolicyInputRep": { 5 "policyId": "0YTxx0000004CdeFGH", 6 "effectiveDate": "2024-12-30", 7 "insurancePolicy": { 8 "policyName": "Auto Insurance", 9 "policyNumber": "PLC5678987", 10 "effectiveFromDate": "2024-01-01", 11 "effectiveToDate": "2024-12-31", 12 "referencePolicyNumber": "PLC56011213" 13 }, 14 "transactionRecord": { 15 "name": "Cancel Policy Transaction" 16 }, 17 "billingRecord": { 18 "billDayOfMonth": 15, 19 "billToContact": "003xx000000001aEAA" 20 }, 21 "additionalInput": [ 22 { 23 "instanceKey": "AutoBundle2", 24 "additionalFieldsList": [ 25 { 26 "key": "AssetDescription__c", 27 "value": "Test_AssetDescription__c" 28 }, 29 { 30 "key": "SourceSystem", 31 "value": "Test_SourceSystem" 32 } 33 ] 34 }, 35 { 36 "instanceKey": "AutoDriver", 37 "additionalFieldsList": [ 38 { 39 "key": "ParticipantName", 40 "value": "Test_ParticipantName" 41 }, 42 { 43 "key": "Participant_Hometown__c", 44 "value": "Test_Participant_Hometown__c" 45 } 46 ] 47 }, 48 { 49 "instanceKey": "AutoRoot", 50 "additionalFieldsList": [ 51 { 52 "key": "Primary_Policy_Holder__c", 53 "value": "Test_Primary_Policy_Holder__c" 54 }, 55 { 56 "key": "PolicyDescription", 57 "value": "Test_PolicyDescription" 58 } 59 ] 60 }, 61 { 62 "instanceKey": "AutoBundle2_AutoComp1", 63 "additionalFieldsList": [ 64 { 65 "key": "Coverage_Description__c", 66 "value": "Test_Coverage_Description__c" 67 }, 68 { 69 "key": "Description", 70 "value": "Test_Description" 71 } 72 ] 73 } 74 ] 75 } 76 } 77 ] 78} -
This is a sample request to call this invocable action from Apex code.
1// Create the standard Invocable Action for policy reinstatement 2Invocable.Action action = Invocable.Action.createStandardAction('reinstateInsurancePolicy'); 3 4// Instantiate the input object for the policy reinstatement 5ConnectApi.ReinstatePolicyInputRep policyInput = new ConnectApi.ReinstatePolicyInputRep(); 6 7// Required: Set the Policy ID of the policy to be reinstated 8policyInput.policyId = '0YTxx00000000PpGAI'; 9 10// Optional: Populate Insurance Policy details 11ConnectApi.InsPolicyIAInputRep insurancePolicy = new ConnectApi.InsPolicyIAInputRep(); 12insurancePolicy.policyName = 'Health Insurance Policy Reinstated'; 13insurancePolicy.policyNumber = 'HIPE12'; 14 15// Assign the insurance policy input to the main input object 16policyInput.insurancePolicy = insurancePolicy; 17 18// Optional: Add additional input fields (custom fields, etc.) 19List<ConnectApi.AdditionalFieldIARep> additionalFields = new List<ConnectApi.AdditionalFieldIARep>(); 20 21ConnectApi.AdditionalFieldIARep additionalFieldElement = new ConnectApi.AdditionalFieldIARep(); 22additionalFieldElement.key = 'Currency__c'; 23additionalFieldElement.value = '6700'; 24 25additionalFields.add(additionalFieldElement); 26 27// Create a wrapper for the additional input fields per policy instance 28 29List<ConnectApi.InsPolicyAddlInputIARep> addlInputIARep = new List<ConnectApi.InsPolicyAddlInputIARep>(); 30 31ConnectApi.InsPolicyAddlInputIARep addlInputIARepElement = new ConnectApi.InsPolicyAddlInputIARep(); 32addlInputIARepElement.instanceKey = 'AutoSilver'; // Logical key representing the policy instance 33addlInputIARepElement.additionalFieldsList = additionalFields; 34 35addlInputIARep.add(addlInputIARepElement); 36 37// Assign additional input to the main input object 38policyInput.additionalInput = addlInputIARep; 39 40// Optional: Populate Transaction record information 41ConnectApi.InsPolicyTrxnIAInputRep transactionRecord = new ConnectApi.InsPolicyTrxnIAInputRep(); 42transactionRecord.name = 'Apex IA Transaction'; // A label for the transaction 43policyInput.transactionRecord = transactionRecord; 44 45 46action.setInvocationParameter('ReinstatePolicyInputRep', policyInput); 47List<Invocable.Action.Result> results = action.invoke(); 48 49System.debug('Reinstate Invocable Action result = ' + results); -
This is a sample response when you call this action.
1[ 2 { 3 "actionName": "reinstateInsurancePolicy", 4 "errors": null, 5 "invocationId": null, 6 "isSuccess": true, 7 "outcome": null, 8 "outputValues": { 9 "reinstatedPolicyId": "15Uxx0000004CUWEA2" 10 }, 11 "sortOrder": -1, 12 "version": 1 13 } 14]