Loading
保險
InsClaimItemService:add

InsClaimItemService:add

使用此服務可將索賠條列項目新增至指定的索賠項目物件。

此服務可以建立「損失」類型的索賠條列項目或「費用」類型的索賠條列項目,視哪些選項會取得輸入。

備註
備註

如果服務接收「損失」與「費用」類型的索賠條列項目輸入,則會建立「損失」類型的索賠條列項目。

類別:InsClaimItemService

方法:add

運作方式

此服務使用物件介面欄位名稱作為 Vlocity (ClaimLineItem__c) 和 Salesforce FSC (ClaimCoveragePaymentDetail) 資料模型中常見欄位的預設輸入和輸出。

  • 取得索賠記錄、相關聯的原則記錄,以及索賠與原則的屬性值。claimId

  • 如果 type = 損失,則呼叫 InsPolicyTermsService:處理服務。

    此服務會計算所有投保義務金額 (copay/coinsurance、可扣除和現金上限)。

    如果 type = 費用,請跳到步驟 3。

  • 儲存索賠條列項目。

    如果 type = 費用,則此為服務所採取的最後一個步驟。

  • 將步驟 2 中退貨的保險責任金額清單轉換為索賠條列項目的子系記錄,作為「條列調整」記錄類型。

    備註
    備註

    現有最大值不會儲存為條列調整。

  • 儲存條列調整。

  • 以 AssetTermTrackingEntry 記錄儲存已投保的責任金額和現有最大值。

遠端選項

選項

描述

claimId

必要。

服務新增條列項目的索賠識別碼。

claimCoverageId

必要。

服務用來建立此索賠條列項目的涵蓋範圍識別碼。

type

Loss 或 Expense

要建立的索賠條列項目類型。

additionalInput

必要。

可能要儲存在「索賠條列項目」記錄中或用於涵蓋範圍/總涵蓋範圍計算公式中的其他輸入 JSON。它必須有下列輸入:

  • ClaimLineItem.claimAmount

  • ClaimLineItem.recipientId

針對 Vlocity ClaimLineItem__c 和 Salesforce FSC ClaimCoveragePaymentDetail 資料模型中的通用欄位,在輸入和輸出中使用介面欄位名稱。如需詳細資料,請參閱下表。

您針對此選項值輸入的任何 Vlocity 或客戶建立的自訂欄位必須遵循此格式,包括完全合格欄位 API 名稱:

{

"ClaimLineItem.<fully qualified name / field API name>": "some random value",

"ClaimLineItem.Customer_Custom_Field__c" : "some other random value" // customer added field

}

具有索賠條列項目 API 的 ClaimLineItem 字首屬性會儲存至建立的索賠條列項目。

如果新索賠條列項目為「損失」,則此 JSON 也可包含計算索賠條列項目涵蓋範圍金額的值。

如果在此 JSON 中傳遞涵蓋範圍金額或調整金額或索賠金額,則此服務會傳回這些金額。它不會重新計算這些項目。

如果未在此表格中列出,請使用欄位的完全合格名稱。

使用者介面欄位名稱

Vlocity ClaimLineItem__c 和 Salesforce FSC ClaimCoveragePaymentDetail 資料模型中的常用欄位

ClaimLineItem.name

用於 ClaimLineItem__c.Name and ClaimCoveragePaymentDetail.Name

ClaimLineItem.claimAmount

用於 ClaimLineItem__c.ClaimAmount__c  ClaimCoveragePaymentDetail.ClaimedAmount

ClaimLineItem.description

用於 ClaimLineItem__c.Description__c and ClaimCoveragePaymentDetail.Description

ClaimLineItem.recipientId

用於 ClaimLineItem__c.PayeeAcccountId__c、ClaimLineItem__c.PayeeContactId__c、ClaimLineItem.PayeeAccountId__c__c, and ClaimCoveragePaymentDetail.ClaimParticipantRecipientId

ClaimLineItem.benefitType

用於 ClaimLineItem__c.BenefitType__c and ClaimCoveragePaymentDetail.BenefitName

ClaimLineItem.reserveAmount

用於 ClaimLineItem__c.ReserveAmount__c  ClaimCoveragePaymentDetail.ClaimCoverageReserveDetailId.ReserveAmount

ClaimLineItem.status

用於 ClaimLineItem__c.Status__c and ClaimCoveragePaymentDetail.Status

ClaimLineItem.type

用於 ClaimLineItem__c.Type__c and ClaimCoveragePaymentDetail.Type

ClaimLineItem.unitCount

用於 ClaimLineItem__c.Quantity__c and ClaimCoveragePaymentDetail.LimitUnitCount

ClaimLineItem.uom

用於 ClaimCoveragePaymentDetail.LimitUnitOfMeasure

ClaimLineItem.currencyIsoCode

用於 ClaimLineItem__c.CurrencyIsoCode ClaimCoveragePaymentDetail.CurrencyIsoCode

輸入 JSON

此服務可以採用可將其他資料新增至索賠條列項目的選擇性 additionalInput JSON。

以下是輸入 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.
	}
}

以下是輸入 JSON 的範例:

{ 
	"claimId": "01t000000000000001",
	"claimCoverageId": "01t000000000000002",
	"type": "Loss",
	"additionalInput": {
		"ClaimLineItem.claimAmount": 500
		"ClaimLineItem.description": "line item description"
		"ClaimLineItem.recipientId": "01t000000000000003"
	}
}

輸出 JSON

以下是輸出 JSON 的格式:

{  
   	"adjustedAmount": <decimal>,
	"claimItemId": <id>, // if add/update,
	"claimItem" : {
		"adjustedAmount" : <decimal>,
		"description" : <string>,
		...
	}
	"childClaimItems": [
		{
			"adjustedAmount" : <decimal>,
			"adjustmentReason" : <string>
		}
	]
}
備註
備註

childClaimItems 節點僅在 type = Loss 時適用。

以下是輸出 JSON 的範例:

{  
   	"adjustedAmount": 200,
	"claimItemId": "01t000000000000004", // if add/update,
	"claimItem" : {
		"adjustedAmount" : 200,
		"description" : <string>
	},
	"childClaimItems": [
		{
			"adjustedAmount" : 200,
			"adjustmentReason" : "Deductible"
		},
		
		{
			"adjustedAmount" : 100,
			"adjustmentReason" : "Coinsurance"
		}
	]
}
 
正在載入
Salesforce Help | Article