Loading
保險
InsClaimService:createUpdateClaim

InsClaimService:createUpdateClaim

使用此服務建立或更新索賠。

類別:InsClaimService

方法:createUpdateClaim

運作方式

Salesforce 索賠產品支援現有的 Vlocity 物件模型 (受管理封裝中的自訂物件) 和新的 Salesforce 物件模型 (標準 Salesforce 物件)。Vlocity 模型支援保單與索賠之間的「資產 → InsuranceClaim」關係。Salesforce 模型支援保單與索賠之間的 InsurancePolicy → Claim 關係。

  1. 取得由 inputKey 呼叫的預先轉換 JSON。接著,服務會檢查輸入 JSON 中的 policyId 元素,以判斷服務是否建立 Vlocity 或 Salesforce FSC 宣告:

    • 如果 policyId 屬於「資產」記錄,則服務會建立 Vlocity 宣告物件 - InsuranceClaim__c、InsuranceClaimInvolvedInjury__c、InsuranceClaimInvolvedProperty__c 和 InsuranceClaimPartyRelationship__c。

    • 如果 policyId 屬於 InsurancePolicy 記錄,則服務會建立以下 Salesforce FSC 宣告物件:Claim、ClaimItem 和 ClaimParticipant。

    • 如果輸入 JSON 中沒有 policyId 元素,或其值為空白,則會勾選遠端選項 isAssetInsuranceClaim。如果值為 true,則服務會建立 Vlocity 宣告物件,否則會建立 FSC 宣告物件。如果 policyId 沒有值且未設定 isAssetInsuranceClaim,則 isAssetInsuranceClaim 的預設值為 false。

  2. 如果未傳入任何 claimId,則服務會建立索賠物件。

    如果傳入 claimId,則服務會更新索賠物件。

  3. 如果已設定 generateClaimNumber 或 uniqueIdGeneratorObjectSetting 或兩個選項,則服務會使用這些選項建立 claimNumber (「名稱」 欄位)。

    最佳作法是,將唯一索賠編號指派給每個索賠。使用遠端選項以符合此建議,並確定任何自訂工作流程都會產生唯一的 claimNumber 值。如果未設定唯一值,則系統會將所有索賠的索賠編號設定為相同值。

  4. 傳回 claimId、policyHolderClaimantId (如果是 FSC 宣告,則為 policyholderClaimParticipantId),以及輸出 JSON 中的 involvedItems 節點。

遠端選項

選項

描述

inputKey

必要。

取得預先轉換的 JSON 結構清單,其中包含服務需要的資訊。視policyId而定,claimJson會使用下列其中一個索賠物件模型:

  • Salesforce FSC 索賠物件模型

  • Vlocity 宣告物件模型

claimId

選擇性。

如果傳入 claimId,則服務會更新索賠。

如果未傳入 claimId,則服務會建立索賠。

generateClaimNumber

選擇性。

如果為 true,則服務會使用 UniqueIdGeneratorService 產生唯一金鑰,並將 Name 欄位設定為該唯一金鑰。

uniqueIdGeneratorObjectSetting

選擇性。

如果 generateClaimNumber 為 true 且此參數為 =null,則服務會找到具有 Object Type = Claim 的 Vlocity UniqueId 產生器設定。

如果服務找到多個設定,則服務會傳回錯誤。

如果服務找到一個設定,則服務會使用該設定。

如果 generateClaimNumber 為 true 且此參數不是 = null,則服務會尋找具有 Name = < this parameter value > 和 Object Type = Claim 的 Vlocity UniqueId 產生器設定。接著使用該設定產生唯一金鑰。

isAssetInsuranceClaim

選擇性。

決定服務是否建立 Vlocity 宣告或 Salesforce FSC 宣告。

  • 如果值為 true,則服務會建立 Vlocity 宣告。

  • 如果值為 false,則服務會建立 Salesforce FSC 宣告。

輸入 JSON (Salesforce FSC 索賠物件模型)

此模型適用於下列兩種情況:

  • claimJson 中的 policyID 屬於 InsuranceClaim 物件。

  • isAssetInsuranceClaim 遠端選項的值為 false。

    備註
    備註

    isAssetInsuranceClaim 遠端選項只會在輸入 JSON 中沒有 policyId 或其值為空白時套用。此外,當 policyId 沒有值且未設定 isAssetInsuranceClaim 時,isAssetInsuranceClaim 的預設值為 false。

服務會使用 inputKey 取得預先轉換的 JSON 作為輸入使用。此服務也可以直接從產品取得投保項目規格,並建立投保對象或財產。

在此範例中,inputKey = claimJson。

輸入

描述

inputKey = claimJson

claimJSON

JSON 結構內的輸入元素:

  • policyholderInsurancePolicyParticipantId:保單持有人保險參與者的識別碼。

  • policyholderClaimParticipantRole:保單持有人索賠參與者的角色清單。在每個值之間插入分號分隔符號。

    範例:"Insured;Claimant"

  • lossDate:當使用如「累計」和「行事曆年度」等時敏感時間屬性類別設定宣告時為必要。如果未提供日期,則不會建立持續期間類型為「累計」與「行事曆年度」的「保單條款」。

claimPropertyItems 或 claimPartyItems

財產和傷害輸入清單。此輸入參數是 claimJSON 的一部分。

  • insurancePolicyParticipantId:受損或遺產遺失的保單參與者識別碼。如果您提供此識別碼,則服務會使用來自 InsurancePolicyParticipant 記錄的適當 ContactId 和 AccountId。如果您提供 insurancePolicyParticipantId,則可以省略 contactId 和 accountId。

  • contactId:受傷或遺失財產的連絡人識別碼。如果索賠者沒有保單參與者識別碼,請提供 contactId。如果您提供此識別碼,則服務會使用「連絡人」記錄中的適當 AccountId。如果您提供 contactId,則可以省略 accountId。

  • accountId:帳戶的識別碼。如果索賠者沒有「保單參與者識別碼」,而您未提供 contactId,請提供 accountId。

  • claimParticipantRoles:保單持有人索賠參與者的角色清單。在每個值之間插入分號分隔符號。

    範例:"Insured;Claimant"

  • insuredItemId:此輸入接受 InsurancePolicyAsset 記錄的識別碼。

additionalClaimParticipants

其他索賠參與者的清單。此輸入參數是 claimJSON 的一部分。

指定至少一個識別碼欄位:insurancePolicyParticipantId、contactId, 或 accountId。

  • insurancePolicyParticipantId:此索賠的其他參與者識別碼。如果您提供此識別碼,則服務會使用來自 InsurancePolicyParticipant 記錄的適當 ContactId 和 AccountId。如果您提供 insurancePolicyParticipantId,則可以省略 contactId 和 accountId。

  • contactId:作為此索賠其他參與者的連絡人識別碼。如果您提供此識別碼但未提供 insurancePolicyParticipantId,則服務會使用「連絡人」記錄中的適當 AccountId。如果您提供 contactId,則可以省略 accountId。

  • accountId:帳戶的識別碼。

  • claimParticipantRoles:索賠參與者的角色清單。在每個值之間插入分號分隔符號。

    範例:"Claimant;Payee;Witness"

以下是 Salesforce FSC 宣告的輸入 JSON 範例:

{ 
 "claimJson": {
  "claimAttributes": {
     "amountDeductible": "500.00"
  },
  "claimPropertyItems": { 
   "autoClaimInvolvedVehicle": [ 
     {
      "claimParticipantRoles": "First Party Claimant; Insured",          
      "insurancePolicyParticipantId": "0ao5w0000000Cl7AAE",          
      "contactId": null,          
      "accountId": null,
      "insuredItemId": "0YW5w0000000HLKGA2",          
      "additionalFields": {},          
      "productCode": "autoClaimInvolvedVehicle",           
      "avMake": "Jeep",           
      "avModel": "Wrangler",          
      "avLicNum": "49J9384",           
      "avLicState": "CA",          
      "avYear": "2019",           
      "avColor": "Red",          
      "claimInsuredProp": true,          
      "claimEstimate": null,          
      "claimPropertyLoc": null,          
      "claimSeverity": null,          
      "claimDamage": "Front End Damage",          
      "claimDamageLoc": null,          
      "claimDrivable": false
     },        
      {          
       "claimParticipantRoles": "Third Party Claimant",          
       "insurancePolicyParticipantId": null,          
       "contactId": "0ao5w0000000J47AX5",          
       "accountId": null,          
       "insuredItemId": null,          
       "additionalFields": {},          
       "productCode": "autoClaimInvolvedVehicle",
       "avMake": "Audi",          
       "avModel": "A5",          
       "avLicNum": "48H03949",          
       "avLicState": "WA",          
       "avYear": "2015",          
       "avColor": "Blue",          
       "claimInsuredProp": false,          
       "claimEstimate": null,          
       "claimPropertyLoc": null,           
       "claimSeverity": null,          
       "claimDamage": "Rear End Damage",          
       "claimDamageLoc": null,          
       "claimDrivable": false
      }      
     ]    
    },    
    "claimPartyItems": {      
    "claimInjuredPerson": [        
    {          
     "claimParticipantRoles": "Third Party Claimant",          
     "contactId": "0ao5w0000000J47AX5",          
     "accountId": null,          
     "insurancePolicyParticipantId": null,          
     "additionalFields": {},          
     "productCode": "claimParticipantPerson",          
     "injDescription": "Whiplash"        
    }      
   ],    
    "additionalClaimParticipants": [
     {
      "Id": null,
      "insurancePolicyParticipantId":  null,
      "contactId": null,
      "accountId": "0015g00000H480EAAR",
      "claimParticipantRoles": "Witness", 
      "additionalFields": {}
     }
    ]
   },
  "additionalFields": {},    
  "policyholderClaimParticipantRole": "Insured",    
  "policyholderInsurancePolicyParticipantId": "0ao5w0000000Cl7AAE",    
  "policyId": "0YT5w0000000ieyGAA",    
  "lossDate": "2021-03-29T16:00:00.000Z",    
  "productCode": "autoClaimProduct"  
 } 
} 

輸出 JSON

以下是 Salesforce FSC 宣告的輸出 JSON 範例:

{  
 "CreateUpdateClaimRemoteAction": {    
  "involvedItems": [      
    {       
     "insuredItemId": "0YW5w0000000HLKGA2",     
     "claimItemId": "0dq5w0000008PrNAAU",    
     "accountId": "0035w000034fL4YAK",    
     "contactId": "0035w000039cfL2AAI",   
     "insurancePolicyParticipantId": "0ao5w0000000Cl7AAE",      
     "claimParticipantRoles": "First Party Claimant; Insured",   
     "claimParticipantId": "0aS5w00000007r3EAA"    
    },      
    {
     "insuredItemId": null,    
     "claimItemId": "0dq5w0000008PrNAAU",    
     "accountId": null,   
     "contactId": "0035w000039cfL2AAI",   
     "insurancePolicyParticipantId": "0ao5w0000000Cl7AAE",  
     "claimParticipantRoles": "Third Party Claimant", 
     "claimParticipantId": "0aS5w00000004K59dD"      
    }    
   ],
   "policyholderClaimParticipantId": "0ao5w0000000Cl7AAE",    
   "claimId": "0Zk5w0000000IOVCA2"  
  },
  "policyTermIds": [     
   "a6Q5w0000002x6oEAA", 
   "a6Q5w0000002x6pEAA", 
   "a6Q5w0000002x6qEAA", 
   "a6Q5w0000002x6rEAA", 
   "a6Q5w0000002x6sEAA", 
   "a6Q5w0000002x6tEAA"  
  ]
 }

輸入 JSON (Vlocity 宣告物件模型)

此模型適用於下列兩種情況:

  • claimJson 中的 policyID 屬於「資產」物件。

  • isAssetInsuranceClaim 遠端選項的值為 true。

    備註
    備註

    isAssetInsuranceClaim 遠端選項只會在輸入 JSON 中沒有 policyId 或其值為空白時套用。此外,當 policyId 沒有值且未設定 isAssetInsuranceClaim 時,isAssetInsuranceClaim 的預設值為 false。

服務會使用 inputKey 取得預先轉換的 JSON 作為輸入使用。此服務也可以直接從產品取得投保項目規格,並建立投保對象或財產。

在此範例中,inputKey = claimJson。

輸入

描述

inputKey = claimJson.

claimJSON

JSON 結構內的輸入元素:

  • policyHolderPartyId:以「對象」物件 (Party__c) 的識別碼為基礎的「對象識別碼」。

  • policyHolderPartyName:以「對象」物件 (Party__c) 的名稱為基礎的對象名稱。這必須是現有 Party__c 記錄的名稱。

  • policyHolderPartyRelationshipTypeId:根據 Vlocity 當事人關係類型物件 (PartyRelationshipType__c) 的識別碼的關係類型識別碼。

  • policyHolderPartyRelationshipType:以「Vlocity 當事人關係類型」物件 (PartyRelationshipType__c)) 的名稱為基礎的關係類型名稱。這必須是現有 PartyRelationshipType__c 記錄的名稱。

claimPropertyItems 或 claimPartyItems

財產和傷害輸入清單。此輸入參數是 claimJSON 一部分。

內容

  • claimantPartyId

  • claimantPartyName

  • claimantPartyRelationshipTypeId

  • claimantPartyRelationshipTypeName

  • insuredItemId

傷害

  • partyId

  • partyName

  • claimPartyRelationshipTypeId

  • claimPartyRelationshipTypeName

針對 claimantPartyRelationshipTypeID 和 claimantPartyRelationshipTypeName,您只需要這兩個元素之一。

針對 claimantPartyName 和 claimantPartyID,您只需要這兩個元素之一。

您必須擁有每個符合這些輸入的封裝。

如果是新的組合,則會插入記錄。如果不是新的組合,則會使用組合的現有記錄。

輸出為 claimantId (非 partyId)。

以下是 Vlocity 宣告的輸入 JSON 格式:

{
  "input": {
    "claimJson": {
      "claimAttributes": {
        "amountDeductible": <Decimal>
      },
      "claimPropertyItems": {
        "homeUnit": [
          {
            "Id": <Id>,
            "claimantPartyRelationshipTypeName": <String>,
            "claimantPartyRelationshipTypeId": <Id>,
            "claimantPartyName": <String>,
            "claimantPartyId": <Id>,
            "insuredItemId": <Id>,
            "additionalFields": {},
            "productCode": <String>,
            "productName": <String>,
            "productId": <Id>
          }
        ],
  		"claimClaimantPerson": [
    		"additionalFields": {
      		"Name": <String>
    		},
    		"productCode": <String>,
    		"persPhone": <String>,
    		"persLastName": <String>,
    		"persName": <String>,
    		"persFirstName": <String>,
    		"persEmail": <String>,
    		"claimInjury": <String>,
    		"claimPartyRelationshipTypeName": <String>,
			"claimPartyRelationshipTypeId": <Id>,
			"partyName": <String>
    		"partyId": <Id>
  		]
      },
      "additionalFields": {},
      "policyHolderPartyRelationshipType": <String>,
      "policyHolderPartyRelationshipTypeId": <Id>,
      "policyHolderPartyName": <String>,
      "policyHolderPartyId": <Id>,
      "policyId": <Id>,
      "policyNumber": <String>,
      "lossDate": <Date>,
      "productCode": "deluxeHomeowners",
      "productName": "Deluxe Homeowners",
      "productId": <Id>
    	}
	}
}

輸出 JSON

以下是 Vlocity 宣告的輸出 JSON 格式:

{  
   "output": {
    "claimId": <String>,
    "policyHolderClaimantId": <Id>,
    "involvedItems": [
      {
        "insuredItemId": <Id>,
        "claimantPartyAccountName": <String>,
        "claimantPartyContactName": <String>,
        "claimantPartyId": <Id>,
        "claimantId": <Id>,
        "involvedItemId": <Id>
      },
      {
        "heldProductRelationshipId": <Id>,
        "claimantPartyAccountName": <String>,
        "claimantPartyContactName": <String>,
        "claimantPartyId": <Id>,
        "claimantId": <Id>,
        "involvedInjuryId": <Id>
      }
    ]
  }
}

範例介面 (Vlocity 宣告物件模型)

{
  "input": {
    "claimJson": {
      "claimPropertyItems": {
        "claimVehicle": [
          {
            "insuredItemId": null,
            "claimantPartyId":null,
            "claimantPartyName":null,
            "claimantPartyRelationshipTypeId":null,
            "claimantPartyRelationshipTypeName":null,
            "additionalFields": {},
            "productCode": "claimVehicle",
            "productName": "Damaged Vehicle",
            "productId": "01t3i0000001cWAAAY",
            "autoBodyType": null,
            "autoColor": null,
            "autoLicNum": null,
            "autoLicState": null,
            "autoMake": null,
            "autoModel": null,
            "autoVIN": null,
            "autoYear": null,
            "claimDamage": null,
            "claimDamageLoc": null,
            "claimDrivable": false,
            "claimImage": null,
            "claimInsuredProp": false,
            "claimEstimate": null,
            "claimPropertyLoc": null,
            "claimSeverity": null
          }
        ]
      },
      "claimPartyItems": {
        "claimWitness": [
          {
            "heldProductRelationshipId": null,
            "partyId": null,
            "partyName": null,
            "claimPartyRelationshipTypeId":null,
            "claimPartyRelationshipTypeName":null,
            "additionalFields": {},
            "productCode": "claimWitness",
            "productName": "Witness",
            "productId": "01t3i0000001cWCAAY",
            "claimRel": null,
            "claimStatement": null,
            "claimTestify": false,
            "persPhone": null,
            "persSalutation": null,
            "persAddress": null,
            "persBirthdate": null,
            "persEmail": null,
            "persFirstName": null,
            "persLastName": null,
            "persMiddleName": null,
            "persName": null
          }
        ],
        "claimInjuredPerson": [
          {
            "heldProductRelationshipId": null,
            "partyId": null,
            "partyName": null,
            "claimPartyRelationshipTypeId":null,
            "claimPartyRelationshipTypeName":null,
            "additionalFields": {},
            "productCode": "claimInjuredPerson",
            "productName": "Injured Person",
            "productId": "01t3i0000001cWEAAY",
            "claimCarrier": null,
            "claimInjury": null,
            "claimPhysician": null,
            "claimPolicyNumber": null,
            "claimRel": null,
            "claimStatement": null,
            "claimTreatLoc": null,
            "claimInsuredProp": false,
            "claimEstimate": null,
            "claimSeverity": null,
            "persAddress": null,
            "persBirthdate": null,
            "persEmail": null,
            "persFirstName": null,
            "persLastName": null,
            "persMiddleName": null,
            "persName": null,
            "persPhone": null,
            "persSalutation": null,
            "claimantPartyRelationshipTypeId":null
          }
        ],
        "claimDriver": [
          {
            "heldProductRelationshipId": null,
            "partyId": null,
            "partyName": null,
            "claimPartyRelationshipTypeId":null,
            "claimPartyRelationshipTypeName":null,
            "additionalFields": {},
            "productCode": "claimDriver",
            "productName": "Driver",
            "productId": "01t3i0000001cWBAAY",
            "persAddress": null,
            "Birthdate": null,
            "persEmail": null,
            "First Name": null,
            "persIDJuris": null,
            "perIDNumber": null,
            "persIDType": null,
            "LastName": null,
            "MiddleName": null,
            "NAME": null,
            "persPhone": null,
            "persSalutation": null,
            "claimCarrier": null,
            "claimInjury": null,
            "claimInsured": false,
            "claimPhysician": null,
            "claimPolicyNumber": null,
            "claimRel": null,
            "claimStatement": null,
            "claimTestify": false,
            "claimTreatLoc": null
          }
        ]
      },
      "additionalFields": {},
      "policyHolderPartyId": null,
      "policyHolderPartyName": null,
      "policyHolderPartyRelationshipTypeId": null,
      "policyHolderPartyRelationshipType": null,
      "policyId": null,
      "policyNumber": null,
      "lossDate": null,
      "productCode": "claimPerilAutoCollision",
      "productName": "Auto Collision",
      "productId": null
    }
  }
}
 
正在載入
Salesforce Help | Article