You are here:
InsEnrollmentServiceStd:enrollFamily
Use this service to enroll one family within one root plan that includes a primary member and associated dependents with coverages.
Class: InsEnrollmentServiceStd
Method: enrollFamily
How it Works
- The service first validates input data to verify:
Required request data is provided.
The provided
flowNameand its version are valid and active.The provided
primaryMemberIdis valid and there is a record matching for a givenprimaryMemberIdandcensusId.The provided
contractIdorrootPlanIdis valid or thecontractGroupPlanof the providedrootPlanIdis associated with the providedcontractId.The enrollment status is completed for the provided
rootPlanIdandprimaryMemberIdin theGroupCensusMemberPlantable.There's a record associated with the specified
rootPlanIdandprimaryCensusMemberId.
-
If the input data is valid, the service calls the enrollment flow.
-
The enrollment flow creates Insurance Policies, Insurance Policy Participants, and Insurance Policy Coverages.
-
The service returns Policy ID in case of successful execution.
-
The service returns errors with error details in case of any validation or enrollment flow execution errors.
Remote Options
| OPTION | DESCRIPTION |
|---|---|
flowName
|
Required Name of the enrollment flow used for individual enrollment. |
groupCensusId
|
Required The ID of the group census that contains all census members of the family to be enrolled.. |
contractId
|
Required Id of the contract that the members belong to and the plans that they'll be enrolled in. |
primaryMemberId
|
Required Id of the primary member to be enrolled. |
rootPlanId
|
Required ID of the root contract group plan of the enrollment product. |
isProrated
|
Optional. If |
isSaveMemberPremium
|
Optional Indicates if the policy premium amount must be set for all InsurancePolicyParticipant records. If |
userInputs
|
Optional The set of input data the rating procedure uses to get the price of the product. |
additionalInputs
|
Optional Serialised key-value map of additional inputs used for product rating. |
matchingKeysList
|
Required A comma-separated fields of Account object to use for duplicate detection against existing Account records if personAccount is enabled in an org. A comma-separated fields of Contact object to use for duplicate detection against existing Contact records if personAccount is not enabled in an org. |
inputKeysList
|
Optional A comma-delimited list of input keys from the rating inputs to use to include in the individual rating results. |
emailEncodingKey
|
Required if create portal user invocable action is used. The email encoding key to use to create the user records. For example, ISO-8859-1 or UTF-8. |
languageLocaleKey
|
Optional Required if create portal user invocable action is used. |
localeSidKey
|
Required if create portal user invocable action is used. The SID key of the locale to use to create user records. |
timezoneSidKey
|
Required if create portal user invocable action is used. The time zone SID key to use to create the user records. |
profileId
|
Optional The Id of the Profile record that should be associated with the User record. |
Input JSON
Here's the sample input JSON:
{
'flowName': 'Individual_Enrollment',
'groupCensusId':'0rfSG00000003fRYAQ',
'contractId':'800RN000000jyCRYAY',
'primaryMemberId':'0r6SG0000000j1xYAA',
'rootPlanId':'0rgRN0000000320YAA',
'isProrated': true,
'isSaveMemberPremium':true,
'emailEncodingKey':'ISO-8859-1',
'languageLocaleKey':'en_US',
'localeSidKey':'en_US',
'timezoneSidKey':'America/Los_Angeles',
'profileId':'00eSG00000120ug',
'userInputs':{"ratingType": "Enrollment"},
'additionalInputs':{"mergeList": "true", "includeOptionalCovSelectFlag":true}
'matchingKeysList':'FirstName,LastName',
'inputKeysList':'aggByKey,primaryMember,groupCensusMemberId'
}Output JSON for Errors
Here's the sample error output JSON:
{
"errors":[
{
"error":"already enrolled",
"rootPlanId":"0rgRN0000000320YAA",
"censusMemberId":"0r6RN0000006HOJYA2"
},
]
}