Loading
メールアドレスがデフォルトのログイン方式となります 続きを読む
Insurance
InsProductService: runRules

InsProductService: runRules

このサービスを使用すると、商品を複製することなく、その商品に対してルールを実行できます。

クラス: InsProductService

方法: runRules

操作手順

  1. サービスは入力 JSON でselectedProductキーを検索します。

  2. selectedProductノードでルールを実行します。

    実行されるルールセットは、true に設定されているリモートオプションによって異なります。

  3. selectedProduct ノードにルールの結果が追加された JSON を返します。

リモートオプション

オプション

説明

ruleAttributeSetValues

true または false

デフォルトは true です。

true の場合、サービスは属性セット値ルールを実行します。

evalOptionalCoverageRelationship

true または false

デフォルトは false です。

このオプションを [true] に設定すると、サービスは使用可能なルールに対して省略可能な補償関係を評価し、影響を受ける省略可能な補償レコードのisSelectedフラグを更新します。

runDefaultSelected

true または false

true に設定すると、選択した商品に対してデフォルトで選択された補償範囲ルールが実行されます。

runEligibility

true または false

true に設定すると、選択した商品の対象資格ルールが実行されます。

ルールが false と評価されると、サービスは省略可能なカバレッジのisEligible ノードを false に設定します。

runRequiredCoverage

true または false

true に設定すると、省略可能な必須補償範囲ルールが実行されます。

validateCoverageSelection

true または false

デフォルトは false です。

このオプションが [true] に設定されている場合、サービスは使用可能なルールに対して省略可能な補償範囲の選択を検証します。

ルールが false と評価されると、影響を受ける省略可能な補償範囲レコードにメッセージノードが追加されます。

Input JSON

このサービスは、入力 JSON の selectedProduct キーから商品オブジェクトを検索します。このオブジェクトは、getRatedProducts などの他のサービスによって作成できます。ルート商品、子商品、孫商品が含まれます。

この例では、サービスがルールを実行する前に 1 つの入力ノードのみが含まれます。


"Name": "Accidental Death",
                    "Description": "An accidental death benefit rider also known as a double indemnity clause provides a higher death benefit to the beneficiaries of the policy in case the insured dies because of an accident. The death benefit is generally a multiple of the face value of the base coverage.",
                    "Family": "Individual Life",
                    "ProductCode": "ADDCOV",
                    "LineOfBusiness__c": "Individual Health",
                    "Type__c": "Coverages",
                    "IsRecommended__c": false,
                    "PricingSource__c": "premiumADD",
                    "RecordTypeName__c": "CoverageSpec",
                    "IsConfigurable__c": true,
                    "productId": "01t1U000000OEamQAG",
                    "pciId": "a2w1U0000001G4YQAU",
                    "selectValidationCriteria": "[{\"expression\":\"WOP.isSelected == true\",\"code\":\"code_0\"}]",
                    "selectValidationMessage": "[{\"message\":\"WOP must be true\",\"severity\":\"INFO\",\"code\":\"code_0\"}]",
                    "isOptional": true,
                    "isSelected": true,
                    "parentInstanceKey": "Jack Kirkland",
                    "Price": 358,
                    "pathFromRoot": "[0].childProducts.records[2].childProducts.records[2]",
                    "formattedParentInstanceKey": "jack-kirkland",
                    "parentProductName": "Jack Kirkland",
                    "originalIndex": 2,
                    "numberCategories": 18,
                    "numberAttributes": 18,
                    "popoverOpen": false,
                    "isOriginalOptional": true,
                    "isAddedOptional": true,
                    "showTypeHeader": true,
                    "displaySequence": 1                 

preTransformBundle Alternative

または、入力 JSON に渡されるデータをサービスに必要な形式にマッピングする OmniStudio データマッパー変換を定義できます。このデータマッパーの出力 JSON は、runRules に必要なselectedProductsノードです。このサービスを OmniScript に追加するときに、preTransformBundle をデータマッパーの名前に設定して、サービスでデータマッパーを使用できるようにします。

出力 JSON

サービスは、selectedProduct ノードと同じ JSON 構造とルールの実行結果を返します。このオブジェクトの内容と構造についての詳細は、「Product JSON Structure Model (製品 JSON 構造モデル)」を参照してください。

この例では、ルールの実行結果と共にサービスがルールを実行した後に 1 つの出力ノードのみが含まれます。

"messages": [
                    {
                      "code": "code_0",
                      "severity": "INFO",
                      "message": "WOP must be true"
                    }
                  ],
                  "displaySequence": 1,
                  "lastNonOptional": true,
                  "firstOptional": true,
                  "Id": "01t1U000000OEamQAG",
                  "Name": "Accidental Death",
                  "Description": "An accidental death benefit rider also known as a double indemnity clause provides a higher death benefit to the beneficiaries of the policy in case the insured dies because of an accident. The death benefit is generally a multiple of the face value of the base coverage.",
                  "Family": "Individual Life",
                  "ProductCode": "ADDCOV",
                  "LineOfBusiness__c": "Individual Health",
                  "Type__c": "Coverages",
                  "IsRecommended__c": false,
                  "PricingSource__c": "premiumADD",
                  "RecordTypeName__c": "CoverageSpec",
                  "IsConfigurable__c": true,
                  "productId": "01t1U000000OEamQAG",
                  "pciId": "a2w1U0000001G4YQAU",
                  "selectValidationCriteria": "[{\"expression\":\"WOP.isSelected == true\",\"code\":\"code_0\"}]",
                  "selectValidationMessage": "[{\"message\":\"WOP must be true\",\"severity\":\"INFO\",\"code\":\"code_0\"}]",
                  "isOptional": true,
                  "isSelected": true,
                  "parentInstanceKey": "Jack Kirkland",
                  "Price": 358,
                  "pathFromRoot": "[0].childProducts.records[2].childProducts.records[2]",
                  "formattedParentInstanceKey": "jack-kirkland",
                  "parentProductName": "Jack Kirkland",
                  "originalIndex": 2,
                  "numberCategories": 18,
                  "numberAttributes": 18,
                  "popoverOpen": false,
                  "isOriginalOptional": true,
                  "isAddedOptional": true,
                  "showTypeHeader": true,                                             
 
読み込み中
Salesforce Help | Article