You are here:
InsEnrollmentServiceStd:getMemberEnrollments
Use this service to retrieve current enrollments for a member. This service takes one or more census member Ids and returns enrolled plans for the member and associated dependents.
Class: InsEnrollmentServiceStd
Method: getMemberEnrollments
How It Works
The Insurance Policy flow is applicable when the value of isFsc is true:
-
If no
effectiveDate is provided in the input, the service uses the contractIdparameter to retrieve the contract enrollment start date. See effectiveDate andcontractId parameters in the Remote Options section for more information. -
Returns the policies as
InsurancePolicy records. 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 with person accounts.
-
If
groupAccountId is the input, the service uses ACR to retrieve the personAccountIds of the census members associated with thegroupAccountId. It returns all Insurance Policies where nameInsuredIdmatches the given personAccountIds andeffectiveDate matches the effectiveDateprovided in the input. -
If
censusMemberIdsis the input, the service retrieves the GroupCensusMember records. See censusMemberIds parameter in the Remote Options section for more information. If the AccountIdfield of the census members is populated, then we use these personAccountIds (GroupCensusMember.AccountId). It returns all Insurance Policies where nameInsuredIdmatches personAccountIdsand effectiveDate matches theeffectiveDate provided in the input.
-
-
Non-Person Accounts Flow
This flow is applicable when census members are associated with contacts.
-
The service uses
accountId to retrieve theInsurancePolicy object for the census members. It's a mandatory parameter for non-person accounts flow. -
If
censusMemberIdsis provided in the input, the service retrieves the GroupCensusMemberrecords. If the AccountId field of the census members isn't populated, then the service retrieves the policies of the members using the GroupCensusMember.ContactId, accountId, and effectiveDate.
-
-
-
The service retrieves the parties and
InsurancePolicyParticipant of the InsurancePolicy records. InsurancePolicyParticipant has records for both the primary members and their dependents. -
If
omitChildProducts field is false, then the service retrieves the coverages (InsurancePolicyCoverage) of the policies and their corresponding product metadata. See omitChildProducts parameter 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. |
|
Required if The effective date of the policy. This date must always be the GMT date of the policy's effective date. |
|
Required if Retrieves the enrollment start date as the effective date of the policy. |
|
If true, the service retrieves optional coverage of the enrollments. |
|
If false, the service retrieves coverage of the enrollments. |
Input JSON
This service doesn't take an input JSON.
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 Enrollments node has product details and Dependents nodes when there are dependents. It also includes child products and coverage details.
The Dependents node consists of First Name, Last Name, Id, Relationship Type, Contact Id, and Party Id.
Here's the format of the output JSON:
{
"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"
}
]
}
}
]
}
}
]
}
