You are here:
InsPolicyService:removeInsuredItem
Use this service to remove an insured item from an existing policy.
This service can be a part of modify policy OmniScripts and Integration Procedures. It works best with other services that form complete policy modification flows. For example, it can come after getInsuredItems, and before createPolicyVersion.
This service works with Salesforce Financial Services Cloud.
Method: removeInsuredItem
How It Works
-
The service takes the
insuredItemIdand theeffectiveDate. -
Removes the insured item from the policy JSON.
-
Recalculates the premium for the policy and returns the price difference and the modified policy JSON.
If the policy JSON includes taxes and/or fees, the policy JSON includes and updates the
taxesAndFees,taxAmount,feeAmount,totalTaxForTermDiff, and/ortotalFeeForTermDifffields (whichever of these are used).
All of the remote options used in the InsProductService:getRatedProducts service may also be used here.
Remote Options
Output JSON
The service returns an output JSON without the removed item records and the recalculated premium information.
For taxes and fees, in particular, the totalTaxForTermDiff and totalFeeForTermDiff fields are returned and only appear when calculating taxes and fees. They represent the difference between the prorated tax/fee of the target policy and the prorated tax/fee of the modified policy (similar to the totalPremiumForTermDiff field).
The following keys and their values are included in the output:
-
priceDiff -
totalPremiumForTermDiff
"totalSize": 0,
"records": [{
"displaySequence": -1,
"Id": "02i1I000001jL2WQAU",
"productId": "01t1I000002fuBoQAI",
"accountId": "0011I00000QknfjQAB",
"policyNumber": "AUTOROOT-000154-2019-",
"productName": "Auto Root",
"EffectiveStart": "2018-08-15",
"EffectiveEnd": "2019-01-29",
"Price": 440,
"PricingFormula__c": "SUM(AutoPremium__autoPremium + rentalTotal + medicalTotal + roadsideTotal + dedWaiverTotal + uninsuredMotoristPDTotal + uninsuredMotoristBITotal)",
"ProductCode": "AUTOROOT",
"term": "Semi-Annual",
"TotalPremiumForTerm__c": 1661.74,
"CalculatedPriceData": {
"2015 Lexus LX250": {
"DRIVER.LN": null,
"DRIVER.FN": null,
"AUTO.instanceKey": "2015 Lexus LX250",
"uninsuredMotoristBITotal": 100,
"uninsuredMotoristPDTotal": 0,
"dedWaiverTotal": 10,
"roadsideTotal": 10,
"medicalTotal": 10,
"rentalTotal": 40,
"comprehensiveTotal": 500,
"ID": "0"
},
"2006 Honda Odyssey": {
...
},
"2018 530 BMW": {
...
},
"2016 Camry Toyota": {
...
}
},
"priceDiff": -1380,
"totalPremiumForTermDiff": -904.32,
"attributeCategories": {
...
}
"childProducts": {
...
}
