Ti trovi qui:
InsProductService:getEligibleProducts
Utilizzare questo servizio per trovare e restituire un elenco di prodotti che soddisfano i criteri specificati.
Metodo: getEligibleProducts
Funzionamento
-
Il servizio esegue una ricerca in Salesforce per recuperare una serie di prodotti attivi che cadono alla data effettiva specificata o successiva. Nell'ambito della query, il servizio utilizza i criteri passati nell'opzione
filters,whereClauseeproductClassesper ottenere un insieme iniziale di prodotti. -
Se per i prodotti trovati sono impostate regole di idoneità, questo servizio li valuta ed elimina quelli che non sono considerati idonei.
-
Applica i filtri degli attributi se sono impostati sui prodotti rimanenti trovati ed elimina quelli esclusi.
-
Se
returnProductObjectè impostato sufalse, restituisce un elenco di ID prodotto dei prodotti idonei che soddisfano i criteri di filtro.Se
returnProductObjectè impostato sutrue, restituisce una matrice di oggetti prodotto.In entrambi i casi, se
includeFilterAttrValuesè impostato sutrue, il servizio restituisce anchefilterAttrValues.
Opzioni remote
Opzione |
Descrizione |
|---|---|
|
Una mappa di I servizi restituiscono solo i prodotti che soddisfano i valori degli attributi forniti in questo filtro. |
|
Per impostazione predefinita, la data odierna. Service estrae i prodotti con un' |
|
Utilizzare il nome API con i due punti seguiti da un valore o da una variabile. Ad esempio, in un OmniScript, una variabile può essere il nome di un elemento, ad esempio un elenco di selezione di input. Separare più parametri di filtro con virgole:
I filtri possono includere qualsiasi campo dell'oggetto |
|
Per impostazione predefinita, Nel JSON di output, insieme alla matrice di prodotti, viene aggiunto l'oggetto Gli attributi dei prodotti secondari non sono inclusi. |
|
Specifica l'ultimo ID prodotto inserito dal servizio nell'interfaccia utente. Utilizzare questa opzione con l'opzione |
|
Determinare quanti prodotti il servizio restituisce all'interfaccia utente in una sola chiamata. |
|
“ProductClassName1,ProductClassName2” Elenco separato da virgole dei nomi delle classi di prodotto. Limita l'elenco dei prodotti a queste classi di prodotti. |
|
L'impostazione predefinita è Se impostato su Se impostato su |
|
PartOfAProductName Se si utilizza questa opzione, il servizio ottiene solo i prodotti con nomi che contengono il valore specificato. |
|
productField1, productField2.. Ordina i prodotti ottenuti dal servizio nell'ordine specificato. Se non si specifica un valore per questa opzione, il servizio ordina i prodotti restituiti per nome in ordine alfabetico crescente. |
|
Immettere qualsiasi istruzione SOQL Salesforce valida come valore per questa opzione. Utilizzare questa opzione quando è necessario utilizzare il campo elenco a selezione multipla come filtro o utilizzare qualsiasi altra condizione di filtro complessa che l'opzione |
JSON di output
Il servizio restituisce un elenco di ID prodotto. Se includeFilterAttrValues è impostato su true, il servizio restituisce anche filterAttrValues.
Questo esempio include filterAttrValues.
{
"totalNumProducts": 6,
"effectiveDate": null,
"inputValues": {},
"filterAttrValues": {
"attri2": {
"listOfValues": [
{
"value": "test2",
"displayText": "test2"
}
],
"valueDataType": "Text",
"attributeLabel": "attri2",
"attributeName": "attri2",
"categoryName": "Test Attribute"
},
"AttntnDfctDsrdrs_Instrctn": {
"listOfValues": [
{
"value": "200",
"displayText": "200"
}
],
"valueDataType": "Percentage",
"attributeLabel": "Instruction",
"attributeName": "Instruction",
"categoryName": "ADD/ADHD"
},
"AbaThrpyOffProf_covered_oon": {
"listOfValues": [
{
"value": "100",
"displayText": "100"
}
],
"valueDataType": "Currency",
"attributeLabel": "Covered",
"attributeName": "Covered",
"categoryName": "ABA Therapy Office Professional"
},
"AddAdhd_select_oon": {
"listOfValues": [
{
"value": "9999999",
"displayText": "9999999"
}
],
"valueDataType": "Currency",
"attributeLabel": "Select",
"attributeName": "Select",
"categoryName": "ADD/ADHD"
},
"AlchlSbstnceAbseInptInst_Ded_oon": {
"listOfValues": [
{
"value": "null",
"displayText": "null"
}
],
"valueDataType": "Number",
"attributeLabel": "Deductible",
"attributeName": "Deductible",
"categoryName": "Alcohol/Substance Abuse - Inpatient Institutional"
},
"attri4": {
"listOfValues": [
{
"value": "56",
"displayText": "56"
}
],
"valueDataType": "Percentage",
"attributeLabel": "attri4",
"attributeName": "attri4",
"categoryName": "Test Attribute"
},
"attri1": {
"listOfValues": [
{
"value": "3000",
"displayText": "3000"
}
],
"valueDataType": "Currency",
"attributeLabel": "attri1",
"attributeName": "attri1",
"categoryName": "Test Attribute"
},
"AbaThrpyOutpProf_covered_oon": {
"listOfValues": [
{
"value": "null",
"displayText": "null"
}
],
"valueDataType": "Number",
"attributeLabel": "Covered",
"attributeName": "Covered",
"categoryName": "ABA Therapy Outpatient Professional"
},
"AcupOffProf_Ded_inn": {
"listOfValues": [
{
"value": "null",
"displayText": "null"
}
],
"valueDataType": "Number",
"attributeLabel": "Deductible",
"attributeName": "Deductible",
"categoryName": "Acupuncture Office Professional"
},
"COMPREHENSIVE": {
"listOfValues": [
{
"value": "2019",
"displayText": "2019"
}
],
"valueDataType": "Number",
"attributeLabel": "Comprehensive",
"attributeName": "Comprehensive",
"categoryName": "Auto Coverage"
},
"amountDeductible": {
"listOfValues": [
{
"value": "1000",
"displayText": "1000"
}
],
"valueDataType": "Currency",
"attributeLabel": "Property Deductible",
"attributeName": "Property Deductible",
"categoryName": "Coverages and Limits of Liability"
}
},
"products": [
"01t1U000000kZhdQAE",
"01t1U000003NOvbQAG",
"01t1U000002Jg6RQAS",
"01t1U000003NIDIQA4",
"01t1U000003NIDNQA4",
"01t1U000000kZiAQAU"
],
"error": "OK"
}
Quando returnProductObject è impostato su true, il servizio restituisce un elenco di prodotti.
Questo esempio include anche filterAttrValues.
{
"totalNumProducts": 6,
"effectiveDate": null,
"inputValues": {},
"filterAttrValues": {
"attri2": {
"listOfValues": [
{
"value": "test2",
"displayText": "test2"
}
],
"valueDataType": "Text",
"attributeLabel": "attri2",
"attributeName": "attri2",
"categoryName": "Test Attribute"
},
"AttntnDfctDsrdrs_Instrctn": {
"listOfValues": [
{
"value": "200",
"displayText": "200"
}
],
"valueDataType": "Percentage",
"attributeLabel": "Instruction",
"attributeName": "Instruction",
"categoryName": "ADD/ADHD"
},
"AbaThrpyOffProf_covered_oon": {
"listOfValues": [
{
"value": "100",
"displayText": "100"
}
],
"valueDataType": "Currency",
"attributeLabel": "Covered",
"attributeName": "Covered",
"categoryName": "ABA Therapy Office Professional"
},
"AddAdhd_select_oon": {
"listOfValues": [
{
"value": "9999999",
"displayText": "9999999"
}
],
"valueDataType": "Currency",
"attributeLabel": "Select",
"attributeName": "Select",
"categoryName": "ADD/ADHD"
},
"AlchlSbstnceAbseInptInst_Ded_oon": {
"listOfValues": [
{
"value": "null",
"displayText": "null"
}
],
"valueDataType": "Number",
"attributeLabel": "Deductible",
"attributeName": "Deductible",
"categoryName": "Alcohol/Substance Abuse - Inpatient Institutional"
},
"attri4": {
"listOfValues": [
{
"value": "56",
"displayText": "56"
}
],
"valueDataType": "Percentage",
"attributeLabel": "attri4",
"attributeName": "attri4",
"categoryName": "Test Attribute"
},
"attri1": {
"listOfValues": [
{
"value": "3000",
"displayText": "3000"
}
],
"valueDataType": "Currency",
"attributeLabel": "attri1",
"attributeName": "attri1",
"categoryName": "Test Attribute"
},
"AbaThrpyOutpProf_covered_oon": {
"listOfValues": [
{
"value": "null",
"displayText": "null"
}
],
"valueDataType": "Number",
"attributeLabel": "Covered",
"attributeName": "Covered",
"categoryName": "ABA Therapy Outpatient Professional"
},
"AcupOffProf_Ded_inn": {
"listOfValues": [
{
"value": "null",
"displayText": "null"
}
],
"valueDataType": "Number",
"attributeLabel": "Deductible",
"attributeName": "Deductible",
"categoryName": "Acupuncture Office Professional"
},
"COMPREHENSIVE": {
"listOfValues": [
{
"value": "2019",
"displayText": "2019"
}
],
"valueDataType": "Number",
"attributeLabel": "Comprehensive",
"attributeName": "Comprehensive",
"categoryName": "Auto Coverage"
},
"amountDeductible": {
"listOfValues": [
{
"value": "1000",
"displayText": "1000"
}
],
"valueDataType": "Currency",
"attributeLabel": "Property Deductible",
"attributeName": "Property Deductible",
"categoryName": "Coverages and Limits of Liability"
}
},
"products": [
{
"attributes": {
"type": "Product2",
"url": "/services/data/v47.0/sobjects/Product2/01t1U000000kZhdQAE"
},
"ProductCode": "Rent-ECO",
"Family": "Personal Lines",
"instest04__LineOfBusiness__c": "Property & Casualty",
"Id": "01t1U000000kZhdQAE",
"instest04__AttributeDefaultValues__c": "{\"amountDeductible\":1000}",
"RecordTypeId": "0121U000000iuvEQAQ"
},
{
"attributes": {
"type": "Product2",
"url": "/services/data/v47.0/sobjects/Product2/01t1U000003NOvbQAG"
},
"ProductCode": "Rent-ECOCLONEDCLONED",
"Family": "Personal Lines",
"instest04__LineOfBusiness__c": "Property & Casualty",
"Id": "01t1U000003NOvbQAG",
"instest04__AttributeDefaultValues__c": "{\"COMPREHENSIVE\":2019,\"AlchlSbstnceAbseInptInst_Ded_oon\":\"\",\"AttntnDfctDsrdrs_Instrctn\":\"200\",\"AddAdhd_select_oon\":9999999,\"AbaThrpyOffProf_covered_oon\":100,\"AbaThrpyOutpProf_covered_oon\":\"\",\"AcupOffProf_Ded_inn\":\"\",\"attri2\":\"test2\",\"attri4\":\"56\",\"attri1\":3000}",
"RecordTypeId": "0121U000000iuvEQAQ"
},
{
"attributes": {
"type": "Product2",
"url": "/services/data/v47.0/sobjects/Product2/01t1U000002Jg6RQAS"
},
"ProductCode": "Rent-ECOCLONED",
"Family": "Personal Lines",
"instest04__LineOfBusiness__c": "Property & Casualty",
"Id": "01t1U000002Jg6RQAS",
"instest04__AttributeDefaultValues__c": "{\"COMPREHENSIVE\":2019,\"AlchlSbstnceAbseInptInst_Ded_oon\":\"\",\"AttntnDfctDsrdrs_Instrctn\":\"200\",\"AddAdhd_select_oon\":9999999,\"AbaThrpyOffProf_covered_oon\":100,\"AbaThrpyOutpProf_covered_oon\":\"\",\"AcupOffProf_Ded_inn\":\"\",\"attri2\":\"test2\",\"attri4\":\"56\",\"attri1\":3000}",
"RecordTypeId": "0121U000000iuvEQAQ"
},
{
"attributes": {
"type": "Product2",
"url": "/services/data/v47.0/sobjects/Product2/01t1U000003NIDIQA4"
},
"ProductCode": "Rent-ECOCLONEDCLONEDCLONED",
"Family": "Personal Lines",
"instest04__LineOfBusiness__c": "Property & Casualty",
"Id": "01t1U000003NIDIQA4",
"instest04__AttributeDefaultValues__c": "{\"COMPREHENSIVE\":2019,\"AlchlSbstnceAbseInptInst_Ded_oon\":\"\",\"AttntnDfctDsrdrs_Instrctn\":\"200\",\"AddAdhd_select_oon\":9999999,\"AbaThrpyOffProf_covered_oon\":100,\"AbaThrpyOutpProf_covered_oon\":\"\",\"AcupOffProf_Ded_inn\":\"\",\"attri2\":\"test2\",\"attri4\":\"56\",\"attri1\":3000}",
"RecordTypeId": "0121U000000iuvEQAQ"
},
{
"attributes": {
"type": "Product2",
"url": "/services/data/v47.0/sobjects/Product2/01t1U000003NIDNQA4"
},
"ProductCode": "Rent-ECOCLONEDCLONEDCLONEDCLONED",
"Family": "Personal Lines",
"instest04__LineOfBusiness__c": "Property & Casualty",
"Id": "01t1U000003NIDNQA4",
"instest04__AttributeDefaultValues__c": "{\"COMPREHENSIVE\":2019,\"AlchlSbstnceAbseInptInst_Ded_oon\":\"\",\"AttntnDfctDsrdrs_Instrctn\":\"200\",\"AddAdhd_select_oon\":9999999,\"AbaThrpyOffProf_covered_oon\":100,\"AbaThrpyOutpProf_covered_oon\":\"\",\"AcupOffProf_Ded_inn\":\"\",\"attri2\":\"test2\",\"attri4\":\"56\",\"attri1\":3000}",
"RecordTypeId": "0121U000000iuvEQAQ"
},
{
"attributes": {
"type": "Product2",
"url": "/services/data/v47.0/sobjects/Product2/01t1U000000kZiAQAU"
},
"ProductCode": "Rent-SUPER",
"Family": "Personal Lines",
"instest04__LineOfBusiness__c": "Property & Casualty",
"Id": "01t1U000000kZiAQAU",
"instest04__AttributeDefaultValues__c": "{\"AbaThrpyOffProf_Instrctn\":null}",
"RecordTypeId": "0121U000000iuvEQAQ"
}
],
"error": "OK"
}