Loading
保險
InsProductJSONService:getAttributes

InsProductJSONService:getAttributes

使用此服務取得 ProductJSON 的屬性節點。

類別:InsProductJSONService

方法:getAttributes

運作方式

  1. 服務會使用 inputKey 將具有一個根產品的標準產品 JSON 識別為輸入 JSON。
  2. 根據這些遠端選項篩選屬性:
    • instanceKey
    • productCode
    • attributeCode
  3. 傳回根據步驟 2 中的設定篩選的屬性節點:
    • 如果為 flatten = true,則服務會傳回格式為 (attributeCode, attributeDetails) 的屬性對應。
    • 如果為 flatten = false,則服務會以 (attributeDetails) 格式傳回屬性清單。
    • 如果是 flatten = true 和 valueOnly = true,則服務會傳回格式 (attributeCode, userValues) 的屬性。

遠端選項

選項

描述

inputKey

服務用來從輸入 JSON 取得 productJSONResult 的金鑰。

預設值為 inputKey。

productCode

根產品代碼或任何子系規格產品代碼。

此服務會從直接與 productCode 值集相關聯的屬性中取出。

attributeCode

傳回符合 attributeCode 值的屬性。

instanceKey

將直接與具有此 instanceKey 的產品相關聯的屬性,以及此 instanceKey 所指定產品下子系產品的屬性,解壓縮。

flatten

以 (attributeCode, attributeDetails) 的形式傳回屬性。

valueOnly

與 flatten = true 搭配使用時,會傳回格式 (attributeCode, userValues) 的屬性。

輸入 JSON

此服務會取得使用 instanceKey 識別的標準產品 JSON,並輸入一個根產品。

若要瞭解如何建構產品 JSON,請參閱 產品 JSON 結構模型。

輸出 JSON

輸出 JSON 會傳回使用 inputKey = configureProduct 選項找到之產品 JSON 的屬性節點,尋找具有 instanceKey = Jack Kirkland 和 attributeCode = lifeCoverageAmt 的屬性。由於 flatten = true 與 valueOnly = true,因此服務會以 attributeCode:userValues 格式傳回屬性。

{
	"Jack Kirkland": {
		"InsLife": {
			"lifeCoveageAmt": "500000"
		}
	},
	"error": "OK"
}

下一個範例使用與上一個範例相同的 inputKey。但其沒有設定篩選條件,因此服務會傳回每個 productCode 和 instanceKey 下的所有屬性。

{
	"CFACTCLONED": {
		"termLimit": 123
	},
	"Maria Kirkland": {
		"ABR": {
			"Limit-Agg": null,
			"Limit-PerOcc": "50",
			"ATTRIBUTE-074": 1200000
		},
		"ADDCOV": {
			"covBenefit": "2"
		},
		"WOP": {
			"claimWait": "90"
		},
		"InsLife": {
			"lifeCoveageAmt": "500000",
			"persSalutation": null,
			"persPhone": null,
			"persEmail": null,
			"persCountry": null,
			"persCity": null,
			"persState": null,
			"persPostalCode": null,
			"persStreet": null,
			"persAddress": null,
			"persGender": "Female",
			"persIncome": null,
			"persBMI": null,
			"persHeight": null,
			"persLastName": null,
			"persMiddleName": null,
			"persFirstName": null,
			"persWeight": null,
			"persSmoke": "N",
			"persName": null,
			"persBirthdate": "1970-09-09"
		}
	},
	"Jack Kirkland": {
		"ABR": {
			"Limit-Agg": null,
			"Limit-PerOcc": "50",
			"ATTRIBUTE-074": 1200000
		},
		"ADDCOV": {
			"covBenefit": "2"
		},
		"WOP": {
			"claimWait": "90"
		},
		"InsLife": {
			"lifeCoveageAmt": "500000",
			"persSalutation": null,
			"persPhone": null,
			"persEmail": null,
			"persCountry": null,
			"persCity": null,
			"persState": null,
			"persPostalCode": null,
			"persStreet": null,
			"persAddress": null,
			"persGender": "Male",
			"persIncome": null,
			"persBMI": null,
			"persHeight": null,
			"persLastName": null,
			"persMiddleName": null,
			"persFirstName": null,
			"persWeight": null,
			"persSmoke": "N",
			"persName": null,
			"persBirthdate": "1965-09-09"
		}
	},
	"WL-Base": {
		"covType": "10",
		"ProductCode": "WL",
		"termPayment": "check",
		"PART": "Participating",
		"termDivMeth": "reinvest",
		"payFrequency": "month",
		"featCashDividends": true,
		"featLevelPremium": true,
		"featGuaranteedBenefit": true,
		"featPolicyLoan": true,
		"featAccumCVLI": true
	},
	"error": "OK"
}
 
正在載入
Salesforce Help | Article