Loading
Salesforce now sends email only from verified domains. Read More
Help Agent Performance DegradationRead More
Insurance
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          InsPolicyService:removeInsuredItem

          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.

          Class: InsPolicyService

          Method: removeInsuredItem

          How It Works

          1. The service takes the insuredItemId and the effectiveDate.

          2. Removes the insured item from the policy JSON.

          3. 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/or totalFeeForTermDiff fields (whichever of these are used).

          Note
          Note

          All of the remote options used in the InsProductService:getRatedProducts service may also be used here.

          Remote Options

          Option

          Description

          aggByKey

          PRODUCT.instanceKey

          The service sends this option to a calculation procedure that includes an aggregation step, so that the calculation procedure returns the correct amount.

          For example, an auto insurance policy has multiple drivers attached to each insured vehicle. The insured vehicle has a separate instanceKey for each instance in the policy. The aggByKey takes the all the instance keys for the vehicles and creates an array of coverage premiums per instanceKey, and passes them to the calculation procedure so that premiums can be calculated correctly.

          calculateTaxesAndFees

          true or false

          Calculates taxes and fees on the target product.

          If set to true, recalculates the taxes and fees for the modified policy.

          If you use Salesforce FSC and you set this option to true, you must also specify getDataDRBundleName or getDataCustomClassName option.

          effectiveDate

          Required.

          “YYYY-MM-DD HH:MM:SS” or %OmniScriptDataElement%

          Defaults to today's date.

          The date the removal of this insured item will take effect.

          getDataDRBundleName

          The name of the Omnistudio Data Mapper this service uses to retrieve policy (asset) information.

          If you're using Salesforce FSC, you must specify either this option or getDataCustomClassName.

          getDataCustomClassName

          The name of the custom class this service uses to retrieve policy (asset) information.

          If you're using Salesforce FSC, you must specify either this option or getDataDRBundleName.

          includeInputKeys

          A string of comma-separated key/value pairs that the service passes into and out of the calculation procedure.

          These key/value pairs are included in the output product object within the CalculatedPriceData object. They're there to help you parse the calculation results.

          Only input keys used by the calculation procedure have a value in the results.

          insuredItemId

          Required.

          %theIdYouNeed%

          The Id of the insured item to be removed from the policy.

          policyId

          Required only if you use Salesforce FSC.

          The ID of the InsurancePolicy.

          ratingDate

          Determines the rating procedure for repricing the policy. If not provided, pricing is done based on the effective date of the modified policy.

          Note
          Note You can't pass a specific time for ratingField as the field type is Date. So, the rating date timestamp defaults to 12:00 am.

          Input JSON

          This service doesn't take an input JSON.

          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": {
                ...
              }
           
          Loading
          Salesforce Help | Article