Loading
Feature Disruption - Service Cloud VoiceRead More
Feature degradation | Gmail Email delivery failureRead 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
          InsContractService:createUpdateContract

          InsContractService:createUpdateContract

          Use this service to create or update a contract using the output of the InsQuoteService:getQuoteDetail service.

          Important
          Important From Winter '23 onward, we have InsContractServiceStd:createUpdateContract service enabled to work with Salesforce Standard Data Model for Financial Services Cloud and Health Cloud. Existing customers can continue to use this service, but no further enhancements will be provided in the Insurance Managed Package.
          Note
          Note

          The same quote used to create the contract is also used in the update.

          The service is typically used to add replacement products to an existing contract, for small groups.

          Class: InsContractService

          Method: createUpdateContract

          How It Works

          1. This service looks for the inputKey value in the product JSON of a quote, which also contains the productConfigurationDetail map.

          2. If a contractId is specified, the contract is updated using the output of the getContractDetails service as its input.

          3. If a contractId is not specified, a new contractId is created.

          Remote Options

          Options

          Description

          contractId

          Id of target contract.

          pricebook

          Optional.

          The name of the pricebook to use on the created or updated contract.

          If you don't provide a value, the service defaults to Standard.

          Input JSON

          When creating a new contract, the input JSON is similar to the output of the InsQuoteService:getQuoteDetail service. When updating an existing contract, the input JSON remains the same.

          This sample shows a new contract input JSON, where contractJson is the input key and productConfigurationDetail contains the product JSON returned via InsQuoteService:getQuoteDetail:

          {
            "productConfigurationDetail": {
              "records": [...]
              "totalSize": 1
            },
            "insuredItems": {
              "Driver": [{
                  "instanceKey": "Joan Smith",
                  "isPrimary": false,
                  "isParent": false,
                  "LN": "Smith",
                  "AGE": 20,
                  "FN": "Joan",
                  "GENDER": "Female",
                  "FirstName": "Joan",
                  "LastName": "Smith"
                },
                {
                  ...
                }
              ],
              "Auto": [{
                  "instanceKey": "2015 Lexus LX250",
                  "autoAntiTheft": true,
                  "est_annual_mileage": "1-10000",
                  "autoLicNum": "Lexus",
                  "autoModel": "LX250",
                  "autoYear": 2015,
                  "BodyClass": "Sedan/Saloon",
                  "VehicleType": "PASSENGER CAR",
                  "isPrimary": true
                  "isParent": false,
                },
                {
                  ...
                }
              ]
            },
            "quoteDetail": {
              "attributes": {
                "type": "Quote",
                "url": "/services/data/v43.0/sobjects/Quote/0Q01I000000qeWLSAY"
              },
              "ins_daily4__EffectiveDate__c": "2018-07-27",
              "ins_daily4__TotalSumInsured__c": 0,
              "AccountId": "0011I00000QknfjQAB",
              "ins_daily4__RootItemTotal__c": 0,
              "Id": "0Q01I000000qeWLSAY"
            },
            "error": "OK"
          }

          Output JSON

          When creating a new contract, the contractId of the new contract is returned in the output JSON ('{"contractId": "idOfNewContract"}'), as shown below. When updating an existing contract, no output JSON is returned.

          [{
          	'Name': 'Current Product'
          }, {
          	'Name': 'Replacement Product',
          	'isReplacementProduct': true
          }]
           
          Loading
          Salesforce Help | Article