You are here:
InsClaimItemService:add
Use this service to add a claim line item to a specified claim item object.
This service can create either a Loss type claim line item or an Expense type claim line item, depending on which options get inputs.
If the service receives inputs for both Loss and Expense type claim line items, it creates a Loss type claim line item.
Method: add
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 gets the 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, skips to step 3. -
Saves the claim line item.
If
type= Expense, it is the last step the service takes. -
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 is not saved as a line adjustment.
-
Saves the line adjustments.
-
Saves the insured obligation amounts and out-of-pocket max as AssetTermTrackingEntry records.
Remote Options
If not listed in 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 adds
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.
}
}And here's an example of an input JSON:
{
"claimId": "01t000000000000001",
"claimCoverageId": "01t000000000000002",
"type": "Loss",
"additionalInput": {
"ClaimLineItem.claimAmount": 500
"ClaimLineItem.description": "line item description"
"ClaimLineItem.recipientId": "01t000000000000003"
}
}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 an example of an output JSON:
{
"adjustedAmount": 200,
"claimItemId": "01t000000000000004", // if add/update,
"claimItem" : {
"adjustedAmount" : 200,
"description" : <string>
},
"childClaimItems": [
{
"adjustedAmount" : 200,
"adjustmentReason" : "Deductible"
},
{
"adjustedAmount" : 100,
"adjustmentReason" : "Coinsurance"
}
]
}
