You are here:
InsClaimItemService:update
Use this service to update a claim line item to a specified claim item object.
This service can update either a Loss type claim line item or an Expense type claim line item, depending on which options to get inputs.
If the service receives inputs for both Loss and Expense type claim line items, it updates the claim line item as a Loss.
Method: update
How It Works
The service uses object
interface field names as default input and output for common fields in both
Vlocity (ClaimLineItem__c) and Salesforce FSC
(ClaimCoveragePaymentDetail) data models.
-
Takes the
claimIdand theclaimItemIdand gets the claim line item record, claim record, the associated policy record, and attribute values for both the claim and the policy. -
If
type= Loss, calls the InsPolicyTermsService: process service.This service calculates all insured obligation amounts (copay/coinsurance, deductible, and out-of-pocket max.)
If
type= Expense, skip to step 3. -
Updates the claim line item.
If
type= Expense, it is the last step the service takes. -
Deletes old child Line Adjustments, if any.
-
Converts the list of insured obligation amounts returned in step 2 into child records of the claim line item as Line Adjustments record type.
NoteOut-of-pocket max isn’t saved as a line adjustment.
-
Saves the new Line Adjustments.
-
Saves the insured obligation amounts and out of pocket max as new AssetTermTrackingEntry records.
Remote Options
If the user interface field name isn't listed in the this table, use the fully qualified name of the field.
User Interface Field Name |
Common Fields in Vlocity |
|---|---|
|
Use for |
|
Use for |
|
Use for |
|
Use for |
|
Use for |
|
Use for |
|
Use for |
|
Use for |
|
Use for |
|
Use for |
|
Use for |
Input JSON
This service can take an optional additionalInput JSON that will
add additional data to the claim line item.
Here's the format of the input JSON:
{
"claimId: <Id>,
"claimCoverageId: <Id>,
"type": "Loss",
"additionalInput": {
"ClaimLineItem." + <fully qualified fieldname>: <values>,
"ClaimLineItem.claimAmount": <decimal> // example
"ClaimLineItem.recipientId": <id> // example
...
// other claim line item fields that need to be saved.
}
}Here's a sample input JSON:
{
"claimId": "01t000000000000001",
"claimCoverageId": "01t000000000000002",
"claimItemId": "01t000000000000004",
"type": "Loss",
"additionalInput": {
"ClaimLineItem.claimAmount": 500
"ClaimLineItem.description": "line item description"
"ClaimLineItem.recipientId": "01t000000000000003",
"ClaimLineItem.vlocity_ins__ProcedureCodeId__c": "01t000000000000004"
}
}Output JSON
Here's the format of the output JSON:
{
"adjustedAmount": <decimal>,
"claimItemId": <id>, // if add/update,
"claimItem" : {
"adjustedAmount" : <decimal>,
"description" : <string>,
...
}
"childClaimItems": [
{
"adjustedAmount" : <decimal>,
"adjustmentReason" : <string>
}
]
}
Here's a sample output JSON:
{
"adjustedAmount": 200,
"claimItemId": "01t000000000000004", // if add/update,
"claimItem" : {
"adjustedAmount" : 200,
"description" : <string>
},
"childClaimItems": [
{
"adjustedAmount" : 200,
"adjustmentReason" : "Deductible"
},
{
"adjustedAmount" : 100,
"adjustmentReason" : "Coinsurance"
}
]
}
