Loading
Assicurazioni
InsProductJSONService:getAttributes

InsProductJSONService:getAttributes

Utilizzare questo servizio per ottenere i nodi attributi del ProductJSON.

Classe: InsProductJSONService

Metodo: getAttributes

Funzionamento

  1. Il servizio utilizza il inputKey per identificare un JSON prodotto standard con un prodotto radice come JSON di input.
  2. Filtra gli attributi in base alle seguenti opzioni remote:
    • instanceKey
    • productCode
    • attributeCode
  3. Restituisce un nodo attributo filtrato in base alle impostazioni del passaggio 2:
    • Se flatten = true, il servizio restituisce una mappa di attributi nel formato (attributeCode, attributeDetails).
    • Se flatten = false, il servizio restituisce un elenco di attributi nel formato (attributeDetails).
    • Se flatten = true e valueOnly = true, il servizio restituisce attributi nel formato (attributeCode, userValues).

Opzioni remote

Opzione

Descrizione

inputKey

Chiave utilizzata dal servizio per ottenere i productJSONResult dal JSON di input.

Il valore predefinito è inputKey.

productCode

Codice prodotto radice o qualsiasi codice prodotto specifico secondario.

Il servizio estrae gli attributi direttamente associati all'insieme di valori productCode.

attributeCode

Restituisce l'attributo che corrisponde al valore attributeCode.

instanceKey

Estrae gli attributi direttamente associati al prodotto con questo instanceKey e gli attributi dei prodotti secondari sotto il prodotto specificato da questo instanceKey.

flatten

Restituisce gli attributi come mappa sotto forma di (attributeCode, attributeDetails).

valueOnly

Se utilizzato con flatten = true, restituisce attributi nel formato (attributeCode, userValues).

Input JSON

Questo servizio accetta un JSON tipico del prodotto che identifica utilizzando il instanceKey, con un prodotto radice come input.

Per informazioni sulla struttura dei JSON dei prodotti, vedere Modello di struttura JSON dei prodotti.

JSON di output

Il JSON di output restituisce un nodo attributo del JSON del prodotto trovato utilizzando l'opzione inputKey = configureProduct, cercando gli attributi con instanceKey = Jack Kirkland e attributeCode = lifeCoverageAmt. Poiché sia flatten = true che valueOnly = true, il servizio restituisce gli attributi in formato attributeCode:userValues.

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

L'esempio seguente utilizza lo stesso inputKey dell'esempio precedente. Tuttavia, non ha filtri impostati, quindi il servizio restituisce tutti gli attributi in ogni productCode e 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"
}
 
Caricamento
Salesforce Help | Article