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