You are here:
InsProductJSONService:getCoverageChanges
Use this service for renewals, to get the coverage changes between two product JSONs. You can use the resulting difference map for display in the UI, or in a generated document.
Method: getCoverageChanges
The service returns changed coverages as well as added and removed coverages, and highlights changes in attributes.
How It Works
-
Uses the value of
inputKey1to find one product JSON that contains coverages for comparison. -
Uses the value of
inputKey2to find another product JSON that contains the coverages for comparison. -
Returns a change map that highlights selected optional coverages, unselected optional coverages, and changes in attribute
userValues.
Remote Options
Option |
Description |
|---|---|
|
Identifies the first product JSON for comparison. Default = |
|
Identifies the second product JSON for comparison. Default = |
Input JSON
This service takes two typical product JSONs.
To learn how product JSONs are structured, see Product JSON Structure Model.
Output JSON
The service returns a difference map that includes coverages added and removed from the policy and coverages with different attribute values.
If the policy includes grandchild-level coverage differences, these appear in
the difference map under the productCode or
instanceKey.
These are the different keys in the difference map:
Key |
Description |
|---|---|
|
List of coverages in the first product JSON but not in the second product JSON. |
|
List of coverages not in the first product JSON but in the second product JSON. |
|
List of selected coverages in the first product JSON but not selected in the second product JSON. |
|
List of selected coverages not in the first product JSON but selected in the second product JSON. |
|
List of coverages in the first product JSON with different attribute userValues in the second product JSON. |
{
"result": {
"root": {
"addedCoverages": [{
"displaySequence": 8,
"Id": "01t1J00000AvEx5QAF",
"Name": "BoCovNoAttr1",
"ProductCode": "BCNA1",
"IsRecommended__c": false,
"RecordTypeName__c": "CoverageSpec",
"IsConfigurable__c": false,
"productId": "01t1J00000AvEx5QAF",
"pciId": "a1x1J0000043KKDQA2",
"isOptional": false,
"isSelected": true,
"attributeCategories": {
"totalSize": 0
}
}],
"unselectedCoverages": [{
"attributeCategories": {
...
}
"isSelected": true,
"isOptional": false,
"ImageId": "/sfc/servlet.shepherd/version/renditionDownload?rendition=ORIGINAL_Png&versionId=0681J000002tD9wQAE",
"pciId": "a1x1J000002FPmwQAG",
"productId": "01t1J000009rd2ZQAQ",
"IsConfigurable__c": true,
"RecordTypeName__c": "CoverageSpec",
"PricingSource__c": "premiumCamera__premiumCamera",
"IsRecommended__c": false,
"LineOfBusiness__c": "Property & Casualty",
"ProductCode": "C",
"Family": "Personal Lines",
"Name": "Camera",
"Id": "01t1J000009rd2ZQAQ",
"displaySequence": 7
}],
"selectedCoverages": [{
"displaySequence": 2,
"Id": "01t1J000009rd2VQAQ",
"Name": "Jewelry",
"Family": "Personal Lines",
"ProductCode": "J",
"IsRecommended__c": false,
"PricingSource__c": "premiumJewelry__premiumJewelry",
"RecordTypeName__c": "CoverageSpec",
"IsConfigurable__c": true,
"productId": "01t1J000009rd2VQAQ",
"pciId": "a1x1J000002bVjvQAE",
"ImageId": "/servlet/servlet.FileDownload?file=00P1J00000YMFBZUA5",
"eligibilityCriteria": "X.limitCovX > 3000",
"isOptional": true,
"isSelected": true,
"attributeCategories": {
...
}
}],
"changedCoverages": [{
"changedAttributes": {
"limitCoverageC": {
"newValue": "200000",
"oldValue": "100000"
}
}
