You are here:
InsClaimCoverageService:createUpdateCoverage
Use this service to create a claim coverage or update an existing claim coverage.
Class: InsClaimCoverageService
Method: createUpdateCoverage
How It Works
-
The following inputs, which can be passed as remote options, must be passed to the service for creating a claim coverage:
ImportantThe user can’t create a claim coverage when an existing claim coverage has equal values for the following fields: claimId, claimantId, involvedId, insuredId, and assetCoverageId.
-
claimId
NoteDepending on the claimID input, the service creates either a Vlocity Claim Coverage (ClaimCoverage__c) or a Salesforce Claim Coverage (ClaimCoverage). If the claimID is an ID of the InsuranceClaim__c object, the Claim Coverage is Vlocity Claim Coverage, else the service creates a Salesforce Claim Coverage.
-
claimCoverageId
-
claimantId
-
involvedId
-
insuredId
-
assetCoverageId
-
reserveAmount
-
reserveProcessingMode
NoteWhen updating an existing claim coverage, the only required inputs are claimCoverageId and reserveAmount. You can leave the other fields blank.
-
-
The service processes this information and creates a coverage if the claimCoverageId is blank. Otherwise, the service updates the existing claim coverage with the Id equal to claimCoverageId.
The claim coverage reserve amount won’t be set if you set reserveProcessingMode to ReserveWorksheet.
If you want to require the claim coverage reserve amount, you can set reserveProcessingMode as CoverageReserve.
Remote Options
Input JSON
Here's the format of input JSON:
{
"claimId": <Id>,
"claimCoverageId": <Id>,
"claimantId": <Id>,
"involvedId": <Id>,
"insuredId": <Id>,
"assetCoverageId": <Id>,
"reserveAmount": <Decimal>,
"reserveProcessingMode": <String>
}Here's the sample of input JSON.
{
"claimId": "a4X3j0000001iTcEAI",
"claimCoverageId": null,
"claimantId": "a4U3j000000LjtQEAS",
"involvedId": "a4S3j000000QXjTEAW",
"insuredId": "a3v3j000000d5UsAAI",
"assetCoverageId": "a3u3j00000Pvx5hAAB",
"reserveAmount": 300,
"reserveProcessingMode": "CoverageReserve"
} Output JSON
Here's the format of output JSON:
{
"claimCoverage": [
{
"reserveProcessingMode": <String>,
"lossReserveAmount": <Decimal>,
"name": <String>,
"involvedName": <String>,
"claimItemId": <Id>,
"description": <String>,
"claimParticipantName": <String>,
"claimParticipantId": <Id>,
"claimId": <Id>,
"status": <String>,
"insurancePolicyAssetId": <Id>,
"insurancePolicyCoverageName": <String>,
"insurancePolicyCoverageId": <Id>,
"createdDate": <Date>
}
],
"claimCoverageId": <Id>,
"errorCode": <String>,
"error": <String>
}Here's the sample of output JSON.
{
"claimCoverage": [
{
"reserveProcessingMode": "CoverageReserve",
"lossReserveAmount": 300,
"name": "Jewelry",
"involvedName": null,
"claimItemId": "a4S3j000000QXjTEAW",
"description": null,
"claimParticipantName": null,
"claimParticipantId": "a4U3j000000LjtQEAS",
"claimId": "a4X3j0000001iTcEAI",
"status": null,
"insurancePolicyAssetId": "a3v3j000000d5UsAAI",
"insurancePolicyCoverageName": null,
"insurancePolicyCoverageId": "a3u3j00000Pvx5hAAB",
"createdDate": null
}
],
"claimCoverageId": "a5G3j000000YEhDEAW",
"errorCode": "INVOKE-200",
"error": "OK"
}
