Loading
Försäkring
InsProductJSONService:getAttributes

InsProductJSONService:getAttributes

Använd denna tjänst för att hämta attributnoderna för ProductJSON.

Klass: InsProductJSONService

Metod: getAttributes

Så här fungerar det

  1. Tjänsten använder inputKey för att identifiera en standardprodukt-JSON med en rotprodukt som indata-JSON.
  2. Filtrerar attributen baserat på dessa fjärralternativ:
    • instanceKey
    • productCode
    • attributeCode
  3. Returnerar en attributnod som filtreras enligt inställningarna i steg 2:
    • Om flatten = true returnerar tjänsten en karta med attribut i formatet (attributeCode, attributeDetails).
    • Om flatten = false returnerar tjänsten en lista över attribut i formuläret (attributeDetails).
    • Om flatten = true och valueOnly = true returnerar tjänsten attribut i formatet (attributeCode, userValues).

Fjärralternativ

Alternativ

Beskrivning

inputKey

Nyckeln som tjänsten använder för att hämta productJSONResult från indata-JSON.

Standardvärdet är inputKey.

productCode

Rotproduktkoden eller en underordnad produktkod.

Tjänsten extraherar attribut som är direkt associerade med productCode.

attributeCode

Returnerar attributet som matchar attributeCode.

instanceKey

Extraherar attribut som är direkt associerade med produkten som har denna instanceKey och attribut för underordnade produkter under produkten som specificeras av denna instanceKey.

flatten

Returnerar attribut som en karta i form av (attributeCode, attributeDetails).

valueOnly

Vid användning med flatten = true returneras attribut i formatet (attributeCode, userValues).

Indata-JSON

Denna tjänst tar en typisk produkt-JSON som den identifierar med instanceKey, med en rotprodukt som indata.

Mer information om hur JSON för produkter är strukturerade finns i Strukturmodell för JSON för produkter.

JSON för utdata

JSON för utdata returnerar en attributnod för JSON för produkten som hittades med alternativet inputKey = configureProduct och letar efter attribut med instanceKey = Jack Kirkland och attributeCode = lifeCoverageAmt. Eftersom både flatten = true och valueOnly = true returnerar tjänsten attributen i attributeCode:userValues.

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

Nästa exempel använder samma inputKey som föregående exempel. Men det finns inga filter angivna, så tjänsten returnerar alla attribut under varje productCode och 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"
}
 
Laddar
Salesforce Help | Article