위치:
InsProductService:getEligibleProducts
이 서비스를 사용하여 지정한 기준과 일치하는 제품 목록을 찾아서 반환합니다.
방법: getEligibleProducts
작동 방법
-
서비스는 Salesforce를 검색하여 지정된 유효 일자 또는 이후에 속하는 활성 제품 집합을 검색합니다. 쿼리의 일부로 서비스는
filters,whereClause및productClasses옵션에서 전달된 기준을 사용하여 초기 제품 집합을 가져옵니다. -
검색된 제품에 적격성 규칙이 설정되어 있는 경우 이 서비스는 해당 제품을 평가하고 적격으로 평가되지 않는 제품을 제거합니다.
-
검색된 나머지 제품에 설정된 경우 특성 필터를 적용하고 필터링된 항목을 제거합니다.
-
returnProductObject가false로 설정된 경우 필터 기준과 일치하는 적격 제품의 제품 ID 목록을 반환합니다.returnProductObject이true로 설정된 경우 제품 개체의 배열을 반환합니다.두 경우 모두
includeFilterAttrValues가true로 설정된 경우 서비스에서filterAttrValues도 반환합니다.
원격 옵션
옵션 |
설명 |
|---|---|
|
서비스는 이 필터에 제공된 특성 값을 충족하는 제품만 반환합니다. |
|
기본값은 오늘 날짜입니다. 서비스는 |
|
API 이름을 콜론 뒤에 값 또는 변수로 사용합니다. 예를 들어, OmniScript에서 변수는 입력 선택 목록과 같은 요소의 이름일 수 있습니다. 여러 필터 매개 변수를 쉼표로 구분합니다.
필터는 |
|
기본값은 출력 JSON에서 제품 배열과 함께 하위 제품 특성은 포함되지 않습니다. |
|
서비스가 UI로 가져온 마지막 제품 ID를 지정합니다. 이 옵션을 |
|
단일 호출에서 서비스가 UI로 반환하는 제품의 수를 결정합니다. |
|
“ProductClassName1,ProductClassName2” 쉼표로 구분된 제품 클래스 이름 목록입니다. 제품 목록을 다음 제품 클래스로 제한합니다. |
|
기본값
|
|
PartOfAProductName 이 옵션을 사용하는 경우 서비스는 사용자가 입력한 값을 포함하는 이름이 있는 제품만 가져옵니다. |
|
productField1, productField2.. 서비스가 받는 제품을 지정한 순서대로 정렬합니다. 이 옵션에 대한 값을 지정하지 않으면 서비스에서 이름별로 반환된 제품을 사전순 오름차순으로 정렬합니다. |
|
이 옵션의 값으로 유효한 salesforce SOQL 문을 입력합니다. 다중 선택 목록 필드를 필터로 사용해야 하는 경우 또는 |
출력 JSON
서비스가 제품 ID 목록을 반환합니다. includeFilterAttrValues가 true로 설정된 경우 서비스에서 filterAttrValues도 반환합니다.
이 예에는 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"
}
returnProductObject가 true로 설정되면 서비스에서 제품 목록을 반환합니다.
이 예에는 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"
}