You are here:
InsEnrollmentService:getMemberEnrollments
Use this service to retrieve current enrollments for a member so they can edit the benefits. This service also takes one or more census member Ids and returns enrolled plans for the member and their dependents.
-
Insurance Policy Flow: It’s triggered when the value of
isFscis true.-
Person Accounts flow is triggered when
isFscis true andGroupCensusMember__c.AccountId__cfield is populated. -
Non-Person Accounts flow is triggered when
GroupCensusMember__c.AccountId__cfield isn’t populated.
-
-
Asset Flow: It’s triggered when the value of
IsFscis false.
How It Works When Using Insurance Policy Records
The Insurance Policy flow is applicable when the value of isFsc
is true. The service does the following:
-
If no
effectiveDateis provided in the input, the service uses thecontractIdparameter to retrieveContract.EnrollmentStartDate__c. SeeeffectiveDateandcontractIdparameters in the Remote Options section for more information. -
Returns the policies as
InsurancePolicyrecords. For Insurance Policy, the service supports both the Person Accounts flow and the Non-Person Accounts flow explained as:Person Accounts Flow
This flow is applicable when census members are associated to person accounts.
-
If
groupAccountIdis the input, the service uses ACR to retrieve thepersonAccountIdsof the census members associated with thegroupAccountId. It returns all Insurance Policies wherenameInsuredIdmatches thesepersonAccountIdsandeffectiveDatematch theeffectiveDateprovided in the input. -
If
censusMemberIdsis the input, the service retrieves theGroupCensusMember__crecords. SeecensusMemberIdsparameter in Remote Options section for more information. If theAccountId__cfield of the census members is populated, then we use thesepersonAccountIds(GroupCensusMember__c.AccountId__c). It returns all Insurance Policies wherenameInsuredIdmatchespersonAccountIdsandeffectiveDatematch theeffectiveDateprovided in the input.
Non-Person Accounts Flow
This flow is applicable when census members are associated to contacts.
-
The service uses
accountIdto retrieve theInsurancePolicyobject for the census members. It’s a mandatory parameter for non-person accounts flow. -
If
censusMemberIdsfield is provided in the input, the service retrieves theGroupCensusMember__crecords. If theAccountId__cfield of the census members isn’t populated, then the service retrieves the policies of the members using theGroupCensusMember__c.ContactId__c,accountId, andeffectiveDate. The type of policy that gets retrieved depends on theisFscparameter, and the custom setting fordefaultIsFSCOptionas is described in this table:Custom Settings > Insurance Configuration Setup>defaultIsFSCOption
IsFsc Parameter
Policies Retrieved
True
NA
InsurancePolicy
False
True
InsurancePolicy
NA
True
InsurancePolicy
-
-
The service retrieves the parties,
InsurancePolicyParticipantorAssetPartyRelationship__cof theInsurancePolicyorAssetrecords, respectively. For FSC,AssetPartyRelationship__conly has records for the primary members' dependents.InsurancePolicyParticipanthas records for both the primary members and their dependents. -
If
omitChildProductsfield isfalse, then the service retrieves the coverages (AssetCoverage__c) of the policies and their corresponding product metadata. SeeomitChildProductsparameter in Remote Options section for more information. -
Each policy is then grouped by the primary member.
How It Works for Assets
Assets flow is applicable when the value of isFsc is false. For
assets records, we don't support Person Account.
The service does the following:
-
If no
effectiveDateis provided in the input, the service uses thecontractIdparameter to retrieveContract.EnrollmentStartDate__c. SeeeffectiveDateandcontractIdparameters in the Remote Options section for more information. -
The service uses
accountIdto retrieve the Asset object for the census members. It’s a mandatory parameter for Non-FSC accounts flow. -
The service uses
censusMemberIdsto retrieve theGroupCensusMember__crecords. SeecensusMemberIdsparameter in the Remote Options section for more information. -
If
AccountId__cfield of the census members isn’t populated, the service retrieves the policies of the members using theGroupCensusMember__c.ContactId__c,accountId, andeffectiveDatefields. The type of policy that gets retrieved depends on theisFscparameter, and the custom setting fordefaultIsFSCOptionas is described in this table.Custom Settings > Insurance Configuration Setup>defaultIsFSCOption
IsFsc Parameter
Policies Retrieved
False
False
Asset
NA
False
Asset
-
The service retrieves the parties. For Non-FSC, it retrieves
InsurancePolicyParticipantorAssetPartyRelationship__c, of theInsurancePolicyorAssetrecords.-
AssetPartyRelationship__conly has records for the primary members' dependents. -
InsurancePolicyParticipanthas records for both the primary members and their dependents.
-
-
If
omitChildProductsfield isfalse, the service retrieves the coverages (InsurancePolicyCoverageorAssetCoverage__c) of the policies and their corresponding product metadata. SeeomitChildProductsparameter in Remote Options section for more information. -
Each policy is then grouped by the primary member.
Remote Options
The service uses either the contractId to get the
effectiveDate from enrollmentStartDate or it uses
effectiveDate directly, which takes precedence over
contractId if both are used.
Option |
Description |
|---|---|
|
List of primary census member ids. |
|
The group Id this member belongs to. |
|
The group Id of the census members whose policies are to be retrieved. This parameter is applicable for FSC flow only. |
|
Required if contractId isn’t used Effective date of the policy. This date must always be the GMT date of the policy's effective date. |
|
Required if effectiveDate isn’t used. Can be used
instead of |
|
If true, service retrieves optional coverages of the enrollments. |
|
If false, service retrieves coverages of the enrollments. |
|
|
Output JSON
Here's the format of the output JSON:
-
The output JSON is a list of census members, with First Name, Last Name, Census Member Id, and Contact Id, with its enrollments.
-
The
Enrollmentsnode has product details andDependentsnodes if there are dependents. It also includes child Products and coverage details. -
The
Dependentsnode consists ofFirst Name,Last Name,Id,RelationshipType,ContactId, andPartyId.
{
"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"
}
]
}
}
]
}
}
]
}Here's an example of output 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"
}
]
}
}
]
}
}
]
}
