Newer Version Available

This content describes an older version of this product. View Latest

Process Member Enrollment Action

Create insurance policies for specified group census members as per their selected plans.

The action retrieves member-specific coverage selections, validates them against the plan selection and checks for duplicate policies if specified in action parameter, and generates insurance policies, coverages, participants and related objects. The action returns list of insurance policy IDs that are generated or error if they occur during the processing.

This action is available in API version 65.0 and later.

Supported REST HTTP Methods

URI
/services/data/v66.0/actions/standard/processMemberEnrollment
Formats
JSON, XML
HTTP Methods
POST
Authentication
Authorization: Bearertoken

Inputs

Input Details
contractGroupPlanId
Type

string

Description
Required
ID of the Contract Group Plan that's used to retrieve associated product and coverage details.
createRelatedObjectRecords
Type

boolean

Description
Indicates whether to create related records for each insurance policy participant (true) or not (false).
If set to true, two insurance policy participant related object records are created per participant. The first record maps the participant to the associated Group Census Member, and the second record links the participant to either a Person Account or a Contact, based on their participant type.
duplicateCheckRequired
Type

boolean

Description
Indicates whether to check for duplicate policies (true) or not (false).
The default value is true.
If set to true and a policy already exists for the same member and product category, this invocable action shows an error.
groupCensusMembers
Type

sobject

Description
Collection of group census member records that represent the members that must be enrolled.
pricingResult
Type

Apex-defined

Description
Collection of Apex ConnectApi.MembersPlansRatingOutput records that contain pricing results for the requested members.

Outputs

Output Details
insurancePolicyIds
Type

string

Description
IDs of the insurance policy records that are created.

Example

Sample Request
1{
2  "inputs": [
3    {
4      "groupCensusMembers": [
5        {
6          "Id": "0r6SG00000093MrYAI",
7          "Name": "John Doe",
8          "FirstName": "John",
9          "LastName": "Doe",
10          "Email": "john.doe@example.com",
11          "BirthDate": "1998-03-15"
12        }
13      ],
14      "contractGroupPlanId": "0rgSG0000000iaXYAQ",
15      "pricingResult": {
16        "pricingResults": [
17          {
18            "plans": [
19              {
20                "rates": [
21                  {
22                    "value": 60,
23                    "key": "NetUnitPrice"
24                  },
25                  {
26                    "value": 0,
27                    "key": "StandardQLITaxAmount"
28                  }
29                ],
30                "proratedRates": [
31                  {
32                    "value": 60,
33                    "key": "NetUnitPrice"
34                  },
35                  {
36                    "value": 0,
37                    "key": "StandardQLITaxAmount"
38                  }
39                ],
40                "planId": "0rgSG0000000iaXYAQ",
41                "errors": [],
42                "coverages": [
43                  {
44                    "rates": [
45                      {
46                        "value": 0,
47                        "key": "StandardQLITaxAmount"
48                      },
49                      {
50                        "value": 20,
51                        "key": "NetUnitPrice"
52                      }
53                    ],
54                    "proratedRates": [
55                      {
56                        "value": 0,
57                        "key": "StandardQLITaxAmount"
58                      },
59                      {
60                        "value": 20,
61                        "key": "NetUnitPrice"
62                      }
63                    ],
64                    "errors": [],
65                    "coverageId": "0rgSG0000000iaZYAQ",
66                    "contributions": {
67                      "groupClassContributionId": "0rFSG0000000Beb2AE",
68                      "errors": [],
69                      "employerPremiumAmount": 2,
70                      "employeePremiumAmount": 18
71                    }
72                  },
73                  {
74                    "rates": [
75                      {
76                        "value": 0,
77                        "key": "StandardQLITaxAmount"
78                      },
79                      {
80                        "value": 40,
81                        "key": "NetUnitPrice"
82                      }
83                    ],
84                    "proratedRates": [
85                      {
86                        "value": 0,
87                        "key": "StandardQLITaxAmount"
88                      },
89                      {
90                        "value": 40,
91                        "key": "NetUnitPrice"
92                      }
93                    ],
94                    "errors": [],
95                    "coverageId": "0rgSG0000000iaaYAA",
96                    "contributions": {
97                      "groupClassContributionId": null,
98                      "errors": [],
99                      "employerPremiumAmount": 0,
100                      "employeePremiumAmount": 40
101                    }
102                  }
103                ],
104                "contributions": {
105                  "groupClassContributionId": null,
106                  "errors": [],
107                  "employerPremiumAmount": 2,
108                  "employeePremiumAmount": 58
109                }
110              }
111            ],
112            "memberId": "0r6SG00000093MrYAI",
113            "errors": []
114          }
115        ],
116        "errors": []
117      }
118    }
119  ]
120}
Sample Response
1[
2  {
3    "actionName": "processMemberEnrollment",
4    "errors": null,
5    "invocationId": null,
6    "isSuccess": true,
7    "outcome": null,
8    "outputValues": {
9      "insurancePolicyIds": ["0YTSG000000QzO14AK"]
10    },
11    "sortOrder": -1,
12    "version": 1
13  }
14]