Loading
保險
InsEnrollmentService:getMemberEnrollments

InsEnrollmentService:getMemberEnrollments

使用此服務來針對成員提取目前的註冊,讓成員可以編輯福利。此服務也會取得一或多個普查成員識別碼,並為成員及其下屬傳回註冊的計畫。

重要
重要 自 Winter '23 起,我們已啟用 InsEnrollmentServiceStd:getMemberEnrollments 服務以使用 Financial Services Cloud 和 Health Cloud 的 Salesforce 標準資料模型。現有客戶可以繼續使用此服務,但保險受管理封裝中不會提供進一步的增強功能。

類別:InsEnrollmentService

方法:getMemberEnrollments

有兩種流程可叫用 getMemberEnrollments 服務:

  • 保單流程:當 isFsc 的值為 true 時觸發。

    • 當 isFsc 為 true 且已填入 GroupCensusMember__c.AccountId__c 欄位時,系統會觸發「個人帳戶」流程。

    • 未填入 GroupCensusMember__c.AccountId__c 欄位時,會觸發非個人帳戶流程。

  • 資產流程:當 IsFsc 的值為 false 時觸發。

使用保單記錄時的運作方式

「保單」流程在 isFsc 的值為 true 時適用。服務會執行下列動作:

  1. 若輸入中未提供任何 effectiveDate,則服務會使用 contractId 參數來檢取 Contract.EnrollmentStartDate__c。 如需詳細資訊,請參閱「遠端選項」區段中的 effectiveDate 和 contractId 參數。

  2. 將原則傳回為 InsurancePolicy 記錄。針對「保單」,此服務支援「個人帳戶」流程和解釋為:

    個人帳戶流程

    當普查成員與個人帳戶相關聯時,此流程適用。

    1. 若 groupAccountId 是輸入,則服務會使用 ACR 提取與 groupAccountId 相關聯之普查成員的 personAccountIds。它會傳回所有「保單」,其中 nameInsuredId 符合這些 personAccountIds,且 effectiveDate 符合輸入中提供的 effectiveDate。

    2. 如果 censusMemberIds 是輸入,則服務會提取 GroupCensusMember__c 記錄。 如需詳細資訊,請參閱「遠端選項」區段中的 censusMemberIds 參數。 如果已填入普查成員的 AccountId__c 欄位,則我們會使用這些 personAccountIds (GroupCensusMember__c.AccountId__c)。它會傳回所有「保單」,其中 nameInsuredId 符合 personAccountIds,而 effectiveDate 符合輸入中提供的 effectiveDate。

    非個人帳戶流程

    當普查成員與連絡人相關聯時,此流程適用。

    1. 此服務使用 accountId 來針對普查成員來取得 InsurancePolicy 物件。這是非個人帳戶流程的必要參數。

    2. 如果在輸入中提供 censusMemberIds 欄位,則服務會提取 GroupCensusMember__c 記錄。 如果未填入人口普查成員的 AccountId__c 欄位,則服務會使用 GroupCensusMember__c.ContactId__c、accountId 和 effectiveDate 提取成員的原則。系統會根據 isFsc 參數以及 defaultIsFSCOption 的自訂設定,以取得的原則類型,如此表格中所述:

      自訂設定 > 保險組態設定>defaultIsFSCOption

      IsFsc 參數

      已取得原則

      True

      NA

      InsurancePolicy

      False

      True

      InsurancePolicy

      NA

      True

      InsurancePolicy

  3. 此服務會分別取用 InsurancePolicy 或 Asset 記錄的對象、InsurancePolicyParticipant 或 AssetPartyRelationship__c。針對 FSC,AssetPartyRelationship__c 僅有主要成員的相依性記錄。InsurancePolicyParticipant 有主要成員和其下屬的記錄。

  4. 若 omitChildProducts 欄位為 false,則服務會提取原則的涵蓋範圍 (AssetCoverage__c) 及其對應的產品中繼資料。 如需詳細資訊,請參閱「遠端選項」區段中的 omitChildProducts 參數。

  5. 接著,每個原則都會依主要成員分組。

資產的運作方式

資產流程在 isFsc 值為 false 時適用。針對資產記錄,我們不支援「個人帳戶」。

服務會執行下列動作:

  1. 若輸入中未提供任何 effectiveDate,則服務會使用 contractId 參數來檢取 Contract.EnrollmentStartDate__c。 如需詳細資訊,請參閱「遠端選項」區段中的 effectiveDate 和 contractId 參數。

  2. 此服務使用 accountId 來針對普查成員來取用「資產」物件。這是非 FSC 帳戶流程的必要參數。

  3. 此服務會使用 censusMemberIds 取得 GroupCensusMember__c 記錄。如需詳細資訊,請參閱「遠端選項」區段中的 censusMemberIds 參數。

  4. 若未填入普查成員的 AccountId__c 欄位,則服務會使用 GroupCensusMember__c.ContactId__c、accountId 和 effectiveDate 欄位來提取成員的原則。所取用的原則類型取決於 isFsc 參數,以及 defaultIsFSCOption 的自訂設定,如此表格中所述。

    自訂設定 > 保險組態設定>defaultIsFSCOption

    IsFsc 參數

    已取得原則

    False

    False

    資產

    NA

    False

    資產

  5. 服務會取用對象。若為非 FSC,則其會從 InsurancePolicy 或 Asset 記錄中提取 InsurancePolicyParticipant 或 AssetPartyRelationship__c。

    • AssetPartyRelationship__c 僅有主要成員的親屬記錄。

    • InsurancePolicyParticipant 有主要成員和其下屬的記錄。

  6. 若 omitChildProducts 欄位為 false,則服務會提取原則的涵蓋範圍 (InsurancePolicyCoverage 或 AssetCoverage__c) 及其對應的產品中繼資料。 如需詳細資訊,請參閱「遠端選項」區段中的 omitChildProducts 參數。

  7. 接著,每個原則都會依主要成員分組。

遠端選項

服務使用 contractId 來從 enrollmentStartDate 取得 effectiveDate,或直接使用 effectiveDate,這在使用兩者時優先於 contractId。

選項

描述

censusMemberIds

主要普查成員識別碼清單。

accountId

此成員所屬的群組識別碼。

groupAccountId

所要取用保單的普查成員群組識別碼。此參數僅適用於 FSC 流程。

effectiveDate

如果未使用 contractId,則為必要

原則生效日期。

此日期必須一律為保單生效日期的 GMT 日期。

contractId

如果未使用 effectiveDate,則為必要。

可以使用 effectiveDate 取代,以將登記開始日期作為原則的生效日期。

includeOptionalCoverages

若為 true,則服務會提取註冊的選擇性涵蓋範圍。

omitChildProducts

若為 false,則服務會提取註冊的涵蓋範圍。

isFsc

  • 決定要從「資產」記錄或 InsurancePolicy 記錄提取保單。

  • 如果 Custom Settings > Insurance Configuration Setup 的 defaultIsFSCOption 設為 false,或如果沒有 defaultIsFSCOption,則會遵守此參數的值。

輸入 JSON

此服務不會取得輸入 JSON。

輸出 JSON

以下是輸出 JSON 的格式:

  • 輸出 JSON 是普查成員清單,其中包含「名字」、「姓氏」、「普查成員識別碼」和「連絡人識別碼」,以及其註冊。

  • Enrollments 節點具有產品詳細資料,如果有相依項目,則具有 Dependents 節點。其中也包含子系產品和涵蓋範圍詳細資料。

  • Dependents 節點包含 First Name、Last Name、Id、RelationshipType、ContactId 和 PartyId。

{
  "totalSize": numberOfPrimaryMembersRetrievedWithEnrollments,
  "records": [
    {
      "FirstName": "primaryMemberFirstName",
      "LastName": "primaryMemberLastName",
      "Id": "primaryMemberGroupCensusMemberId",
      "contactId": "primaryMemberContactId",
      "enrollments": {
        "totalSize": primary member's number of enrollments,
        "records": [
          {
            "policyNumber": "policy number",
            "Id": "policy Id",
            "productId": "policy's product id",
            "accountId": "policy's account id",
            "primaryMemberContactId": "primaryMemberContactId",
            "productName": "policy's product name",
            "Name": "policy's product name",
            "EffectiveStart": "policy effective date",
            "EffectiveEnd": "policy expiration date",
            "Price": 0,
            "planId": "policy product's plan id",
            "contractId": "contract id",
            "ProductCode": "product code",
            "RecordTypeName__c": "Product",
            "attributeCategories": {},
            "Term": "policy term",
            "attributeSelectedValues": "{}",
            "childProducts": {
              "totalSize": numberOfChildProductsOfThePolicyProduct,
              "records": [
                {
                  "productId": "productIdOfTheChildProduct",
                  "productName": "productNameOfTheChildProduct",
                  "ProductCode": "productCodeOfTheChildProduct",
                  "Name": "productNameOfTheChildProduct",
                  "pciId": "productChildItemIdOfTheChildProduct",
                  "isOptional": ifThisIsAnOptionalCoverage,
                  "attributeSelectedValues": "{}",
                  "isSelected": true,
                  "Id": "coverageId",
                  "PricingSource": "pricingSource",
                  "attributeCategories": {}
                }
              ]
            },
            "dependents": {
              "totalSize": primary member's number of dependents,
              "records": [
                {
                  "Id": "record id",
                  "FirstName": "dependentsFirstName",
                  "LastName": "dependentsLastName",
                  "relationshipType": "relationshipType",
                  "partyId": "contact's party id",
                  "contactId": "dependent's contact Id"
                }
              ]
            }
          }
        ]
      }
    }
  ]
}

以下是輸出 JSON 的範例:

{
  "totalSize": 1,
  "records": [
    {
      "FirstName": "Scott",
      "LastName": "Matthews",
      "Id": "a386F000000yq5LQAQ",
      "contactId": "0036F00002Q4wlSQAR",
      "enrollments": {
        "totalSize": 1,
        "records": [
          {
            "policyNumber": "AA232SDTJ",
            "Id": "02i6F000004XE2jQAG",
            "productId": "01t6F000007sLsaQAE",
            "accountId": "0016F00002GIY4mQAH",
            "primaryMemberContactId": "0036F00002Q4wlSQAR",
            "productName": "BoMedicalProduct",
            "Name": "BoMedicalProduct",
            "EffectiveStart": "2018-04-12",
            "EffectiveEnd": "2019-02-09",
            "Price": 0,
            "planId": "a1u6F0000035QYxQAM",
            "contractId": "8006F000001GhodQAC",
            "ProductCode": "BMP",
            "RecordTypeName__c": "Product",
            "attributeCategories": {
              "totalSize": 1,
              "records": [
                {
                  "productAttributes": {
                    "records": [
                      {
                        "userValues": null,
                        "values": [
                          {
                            "disabled": true,
                            "readonly": true
                          }
                        ],
                        "isNotTranslatable": false,
                        "cloneable": true,
                        "hidden": false,
                        "hasRules": false,
                        "displaySequence": 0,
                        "label": "TestAttribute_2.2",
                        "attributeId": "a1R6F00000FNrpDUAT",
                        "filterable": true,
                        "disabled": true,
                        "readonly": true,
                        "required": false,
                        "multiselect": false,
                        "inputType": "number",
                        "dataType": "currency",
                        "code": "bfb83baa-662e-674e-9c04-2bad2dc545e1"
                      }
                    ],
                    "totalSize": 1
                  },
                  "id": "a1Q6F000009rHU0UAM",
                  "Name": "AlvinProdCattegory2",
                  "Code__c": "d7539648-3485-0218-802c-c493e727fa67"
                }
              ]
            },
            "Term": "Custom",
            "attributeSelectedValues": "{}",
            "childProducts": {
              "totalSize": 1,
              "records": [
                {
                  "productId": "01t6F00000Akx48QAB",
                  "productName": "Serious Illness",
                  "ProductCode": "SERILL",
                  "Name": "Serious Illness",
                  "pciId": "a2Q6F000001JiqHUAS",
                  "isOptional": false,
                  "attributeSelectedValues": "{}",
                  "isSelected": true,
                  "Id": "01t6F00000Akx48QAU",
                  "PricingSource": "SIPremSelected",
                  "attributeCategories": {
                    "totalSize": 1,
                    "records": [
                      {
                        "productAttributes": {
                          "records": [
                            {
                              "userValues": null,
                              "values": [
                                {
                                  "disabled": false,
                                  "readonly": false
                                }
                              ],
                              "isNotTranslatable": false,
                              "cloneable": true,
                              "hidden": false,
                              "hasRules": false,
                              "displaySequence": 1,
                              "label": "SI Amount Override",
                              "attributeId": "a1R6F00000LE7ESUA1",
                              "filterable": true,
                              "disabled": false,
                              "readonly": false,
                              "required": false,
                              "multiselect": false,
                              "inputType": "number",
                              "dataType": "currency",
                              "code": "SIOVER"
                            },
                            {
                              "rules": [
                                {
                                  "actions": {
                                    "Hide": {
                                      "client": {
                                        "params": {}
                                      },
                                      "remote": {
                                        "params": {}
                                      },
                                      "rest": {
                                        "link": null,
                                        "method": null,
                                        "params": {}
                                      }
                                    }
                                  },
                                  "expression": "%SERILL.SIOVER% > 0",
                                  "ruleType": "Hide"
                                }
                              ],
                              "userValues": null,
                              "values": [
                                {
                                  "disabled": false,
                                  "readonly": false
                                }
                              ],
                              "isNotTranslatable": false,
                              "cloneable": true,
                              "hidden": false,
                              "hasRules": true,
                              "displaySequence": 9,
                              "label": "SIB Multiplier",
                              "attributeId": "a1R6F00000LE7ERUA1",
                              "filterable": true,
                              "disabled": false,
                              "readonly": false,
                              "required": false,
                              "multiselect": false,
                              "inputType": "number",
                              "dataType": "number",
                              "code": "SIB"
                            },
                            {
                              "rules": [
                                {
                                  "actions": {
                                    "Hide": {
                                      "client": {
                                        "params": {}
                                      },
                                      "remote": {
                                        "params": {}
                                      },
                                      "rest": {
                                        "link": null,
                                        "method": null,
                                        "params": {}
                                      }
                                    }
                                  },
                                  "expression": "%SERILL.SIOVER% > 0",
                                  "ruleType": "Hide"
                                }
                              ],
                              "userValues": null,
                              "values": [
                                {
                                  "disabled": false,
                                  "readonly": false
                                }
                              ],
                              "isNotTranslatable": false,
                              "cloneable": true,
                              "hidden": false,
                              "hasRules": true,
                              "displaySequence": 10,
                              "label": "SIB Max",
                              "attributeId": "a1R6F00000LE7EQUA1",
                              "filterable": true,
                              "disabled": false,
                              "readonly": false,
                              "required": false,
                              "multiselect": false,
                              "inputType": "number",
                              "dataType": "currency",
                              "code": "SI"
                            }
                          ],
                          "totalSize": 3
                        },
                        "id": "a1Q6F00000ATYVIUA5",
                        "Name": "Benefit Calculation",
                        "Code__c": "11c2dcbf-500e-1180-4581-ff5000cb0ca6",
                        "displaySequence": 12
                      }
                    ]
                  }
                }
              ]
            },
            "dependents": {
              "totalSize": 2,
              "records": [
                {
                  "Id": "a0o6F00000WsgPtQAJ",
                  "FirstName": "Joan",
                  "LastName": "Robbins",
                  "relationshipType": "Child",
                  "partyId": "a376F000008BJIvQAJ",
                  "contactId": "a376F000008BJIvQAO"
                },
                {
                  "partyId": "a0o6F00000Wsh8QQAF",
                  "Id": "a0o6F00000Wsh8QQAR",
                  "First Name": "Max",
                  "Last Name": "Robbins",
                  "relationshipType": "Spouse",
                  "contactId": "a376F000008BJIwQAO"
                }
              ]
            }
          }
        ]
      }
    }
  ]
}
 
正在載入
Salesforce Help | Article