Loading
Salesforce now sends email only from verified domains. Read 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
          InsQuoteService:updateQuotePlans

          InsQuoteService:updateQuotePlans

          Use this service in an OmniScript to add, update, or upsert (add and update) either coverages or attributes for one or more Group Benefit plans across a quote. This service is designed to process only coverages under root products.

          Note
          Note

          This service isn't supported for guest users.

          If a guest user tries to run an OmniScript or Integration Procedure or UI function that uses this service, the service will not run and the guest user will see an error message.

          Class: InsQuoteService

          Method: updateQuotePlans

          How It Works

          For example, if a coverage has an attribute with the attribute code cat1_copay_inn, and the input data map contains a partial attribute code copay, there would be a match, since cat1_copay_inn contains the string copay, and the attributes on this coverage would be updated.

          1. The service takes the quoteId to find the target quote.

          2. Uses the inputKey to locate the input data (coverages, attributes).

          3. Modifies coverages or attributes in a quote, based on operationScope (coverages or attributes) and operationType (insert, updates, upserts).

          • If operationScope is coverages, the input coverages on the target plans are inserted, updated, or upserted in the target quote, based on the operationType.

          • If operationScope is attributes, the coverage attributes in the target quote are updated, based on which coverages contain attributes whose code contains one of the partial attribute codes as listed in the input data map.

          Note
          Note

          NOTE: If planIds are provided, the coverage will be updated only if it belongs to one of the planIds in the list, even if there is a match.

          Note
          Note

          NOTE: To insert a new root product coverage, you need at least one child quote line item under the root product.

          Remote Options

          Option

          Description

          quoteId

          Required.

          Id of target Quote.

          inputKey

          Required.

          Key for where in the inputs map the input data (such as coverages) is specified.

          operationScope

          Required.

          Scope of what is updated on the plans. Possible values are coverages and attributes (that is, either coverages or attributes can be updated).

          operationType

          Required when the operationScope is coverages and ignored when the operationScope is attributes.

          Type of operation performed: insert, update, or upsert.

          identifiers

          String value list of planIds.

          Required when operationScope is coverages, optional when operationScope is attributes.

          Options MAP

          Here are sample options map variables, as used in a card, when the operationScope is coverages:

          {
            'quoteId': '0Q0000000000000000',
            'inputKey': 'inputJson',
            'operationScope': 'coverages',
            'operationType': 'insert',
            'identifiers': planId1, planId2'
          }
          

          Here are sample options map variables, as used in a card, when the operationScope is attributes:

          
          {
            'quoteId': '0Q0000000000000000',
            'inputKey': 'inputJson',
            'operationScope': 'attributes',
            'identifiers': '0QLf4000000SX3tGAG, 0QLf4000000SX3rGAG'
          }
          

          Input JSON

          If the operationScope is coverages, input data must contain a JSONResult object (or a map that can be parsed as a JSONResult object) which contains the coverages to insert or update (Coverage 1, Coverage 2, etc.):

          
          {
            'inputJson': {
              'records': [{
                'productName': 'Coverage 1',
                'attributeCategories': [...],
                ...
              }, {
                'productName': 'Coverage 2',
                'attributeCategories': [...],
                ...
              }]
            }
          }
          

          If the operationScope is attributes, the input data must contain a map of partial attribute codes and their updated values, as shown in this example:

          {
            'inputJson': {
              'copay': 20,
              'covered': '90%'
            }
          }
          

          Example Usage

          Let’s say you wanted to change the copay attribute value across the attribute category ChirOffiProf.

          Assuming a standard naming convention of:

          attributeCategory_attributeCode_inNetwork/outOfNetwork

          With the following in-network and out-of-network copay attributes:

          • ChirOffiProf_copay_inn

          • ChirOffiProf_copay_oon

          You would configure the updateQuotePlans service with the following inputs and options:

          Inputs

          Map of partial codes and their values (i.e., copay returns any attribute name with copay in the string.) The partial code in this case would be the attributeCode portion of the template:

          {
              'copay': 20,
              'covered': 75
          }
          

          Options

          • quoteId

          • planId (QuoteLineItem Id)

          The service will search for all of the coverages within the specified planIds that have an attribute which contains the partial attribute code (in this case, copay) and update those attributes with the new value (in this case, 20).

          If no planId is specified, all coverages that have an attribute which contains the attributeCode partial being passed are updated.

           
          Loading
          Salesforce Help | Article