詳細情報:
InsProductService:getEligibleProducts
このサービスを使用して、指定した条件に一致する商品のリストを見つけて返します。
方法: getEligibleProducts
操作手順
-
このサービスは、Salesforce を検索して、指定された発効日以降の有効な商品のセットを取得します。クエリの一部として、サービスは [
filters]、[whereClause]、および [productClasses] オプションで渡された条件を使用して商品の初期セットを取得します。 -
見つかった商品に対象資格ルールが設定されている場合、このサービスは商品を評価し、対象として評価されなかった商品を除外します。
-
検出された残りの商品に属性検索条件が設定されている場合は、その検索条件を適用し、除外されている商品は除外します。
-
[
returnProductObject] が [false] に設定されている場合、検索条件に一致する対象商品の商品 ID のリストを返します。returnProductObjectがtrueに設定されている場合、商品オブジェクトの配列を返します。どちらの場合も、[
includeFilterAttrValues] がtrueに設定されている場合、サービスはfilterAttrValuesも返します。
リモートオプション
オプション |
説明 |
|---|---|
|
サービスは、この検索条件で指定された属性値を満たす商品のみを返します。 |
|
デフォルトは今日の日付です。 サービスは、 |
|
API 参照名にはコロンを入力し、その後に値または変数を指定します。たとえば、OmniScript では、入力選択リストなどの要素の名前を変数にできます。 複数の検索条件パラメーターはカンマで区切ります。
検索条件には、 |
|
デフォルトは 出力 JSON で、商品の配列と共に 子商品属性は含まれません。 |
|
サービスが UI に取り込んだ最後の商品 ID を指定します。 このオプションは |
|
1 回のコールでサービスが 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"
}