You are here:
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.
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.
-
The service takes the
quoteIdto find the target quote. -
Uses the
inputKeyto locate the input data (coverages, attributes). -
Modifies coverages or attributes in a quote, based on
operationScope(coverages or attributes) andoperationType(insert, updates, upserts).
-
If
operationScopeis coverages, the input coverages on the target plans are inserted, updated, or upserted in the target quote, based on theoperationType. -
If
operationScopeis 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: 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.
Remote Options
Option |
Description |
|---|---|
|
Required. Id of target Quote. |
|
Required. Key for where in the inputs map the input data (such as coverages) is specified. |
|
Required. Scope of what is updated on the plans. Possible values are coverages and attributes (that is, either coverages or attributes can be updated). |
|
Required when the operationScope is coverages and ignored when the Type of operation performed: insert, update, or upsert. |
|
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.

