Loading
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
          One Rating Procedure per Product for repriceProduct

          One Rating Procedure per Product for repriceProduct

          Format InsProductService:repriceProduct userInputs for products that use a single rating procedure per root product.

          Note
          Note

          For most products that use multiple rating procedures in the product hierarchy or multiple specs in any level of the hierarchy, you format input JSON differently. See Multiple Rating Procedures per Product or Multiple Specs at Any Level for repriceProduct.

          Products configured before Winter '23 release 240.22 can have multiple child specs in a given level of the hierarchy, no grandchild specs, and only one rating procedure at the root level. For these products, use the same userInputs format as you did in earlier releases.

          To prevent errors, run the service with only one type of userInputs format at a time.

          Beginning in Summer '20, input JSON accepts an additionalInputs node. Use this node to set stage as an additional input so that the system evaluates stage correctly when the service runs.

          Note
          Note

          Eligibility rules are not supported.

          For any product, the target format for the userInputs object can be obtained from the service listing in the API tab of the product view. The object keys are in the form "<ProductCode>.<AttributeCode>" where the ProductCode is the code of the product or the product code of associated coverage specs, insured item specs, or rating facts.

          The <productCode>.isSelected of the coverage is also available for use in the expression set or calculation procedure.

          Note
          Note

          This service supports only one object in its records array.

          {
            "selectedProduct": {
              "records": [{
                "rootProductId": "01t1I000002fuBoQAI",
                "rootProductCode": "AUTOROOT",
                "timestamp": 1533948385704,
                "hasInstanceKeys": true,
                "childProductsCount": 8,
                "instanceKeyChildren": 2,
                "pathFromChild": "[0]",
                "pathFromRoot": "[0]",
                "attributeCategories": {
                  ...
                }
                "childProducts": {
                  ...
                }
                "Price": 80,
                "productId": "01t1I000002fuBoQAI",
                "Term__c": "Semi-Annual",
                "PricingFormula__c": "SUM(AutoPremium__autoPremium + rentalTotal + medicalTotal + roadsideTotal + dedWaiverTotal + uninsuredMotoristPDTotal + uninsuredMotoristBITotal)",
                "IsConfigurable__c": true,
                "RecordTypeName__c": "Product",
                "IsRecommended__c": false,
                "ProductCode": "AUTOROOT",
                "Name": "Auto Root",
                "Id": "01t1I000002fuBoQAI",
                "RawPriceData": [{
                    "aggregationResults": {},
                    "calculationResults": [{
                        "ID": "0",
                        "comprehensiveTotal": 500,
                        "rentalTotal": 40,
                        "medicalTotal": 10,
                        "roadsideTotal": 10,
                        "dedWaiverTotal": 10,
                        "uninsuredMotoristPDTotal": 0,
                        "uninsuredMotoristBITotal": 100,
                        "AUTO.instanceKey": "2015 Lexus LX250",
                        "DRIVER.FN": "Joan",
                        "DRIVER.LN": "Smith"
                      },
                      {
                        ...
                      }
                    ]
                  },
                  {
                    "aggregationResults": {},
                    "calculationResults": [{
                        "ID": "4",
                        "comprehensiveTotal": 500,
                        "rentalTotal": 40,
                        "medicalTotal": 10,
                        "roadsideTotal": 10,
                        "dedWaiverTotal": 10,
                        "uninsuredMotoristPDTotal": 0,
                        "uninsuredMotoristBITotal": 100,
                        "AUTO.instanceKey": "2006 Honda Odyssey",
                        "DRIVER.FN": "Joan",
                        "DRIVER.LN": "Smith"
                      },
                      {
                        ...
                      }
                    ]
                  }
                ],
                "CalculatedPriceData": {
                  "2006 Honda Odyssey": {
                    "ID": "4",
                    "comprehensiveTotal": 500,
                    "rentalTotal": 40,
                    "medicalTotal": 10,
                    "roadsideTotal": 10,
                    "dedWaiverTotal": 10,
                    "uninsuredMotoristPDTotal": 0,
                    "uninsuredMotoristBITotal": 100,
                    "AUTO.instanceKey": "2006 Honda Odyssey",
                    "DRIVER.FN": "Joan",
                    "DRIVER.LN": "Smith"
                  },
                  "2015 Lexus LX250": {
                    "ID": "0",
                    "comprehensiveTotal": 500,
                    "rentalTotal": 40,
                    "medicalTotal": 10,
                    "roadsideTotal": 10,
                    "dedWaiverTotal": 10,
                    "uninsuredMotoristPDTotal": 0,
                    "uninsuredMotoristBITotal": 100,
                    "AUTO.instanceKey": "2015 Lexus LX250",
                    "DRIVER.FN": "Joan",
                    "DRIVER.LN": "Smith"
                  }
                },
                "displaySequence": -1
              }]
            }
          }
          Note
          Note

          An alternate approach is to define an Omnistudio Data Mapper transform that maps the data that's passed into the input JSON into the form the service needs. This Data Mapper's output JSON is selectedProducts node required by repriceProduct, and the userInputs JSON defined in the product view API tab. To set up the service to use the Data Mapper, set the preTransformBundle option to the name of the Data Mapper.

           
          Loading
          Salesforce Help | Article