Loading
Insurance
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          InsEnrollmentService:findEnrollees

          InsEnrollmentService:findEnrollees

          Use this service to allow a user to search for a list of enrolled clients.

          Class:InsEnrollmentService

          Method:findEnrollees

          How It Works

          1. The service receives the parsed JSON.

          2. If the parsed object has a searchKey parameter, it retrieves a list for Contacts with First Name, Last Name, or Member ID that starts with the given searchKey.

            • By default, the service does not return contacts with expired policies.

            • If the parsed object has a productType parameter, the list of Contacts retrieved are filtered further by policy product type.

            • If the parsed object has an includeExpiredPolicies parameter, Contacts are retrieved regardless of their policy’s expiry date

          3. The service retrieves a list of policies and maps them to each contact retrieved, as long as their group is the given account id.

            • If the input contains an effectiveDate, only policies with the same effective date are retrieved.

            • If the input contains a productType, only policies with the same productType are retrieved.

            • If the input sets includeExpiredPolicies to true, even expired policies are retrieved.

          4. The retrieved enrollee list with all assigned policy details is returned in the data node.

          Inputs

          Input

          Description

          searchKey

          Optional

          String

          Used to check FirstName, LastName, or MemberId of the contacts

          productType

          Optional

          String

          Product type used to filter the list of members by their policies’ types

          includeExpiredPolicies

          Optional

          Boolean

          Used to determine if the service should include contacts with expired policies

          Input JSON

          JSON input formatted as follows:

          {
            "searchKey": String,
            "productType": productType,
            "includeExpiredPolicies": Boolean
          }

          Sample JSON input with data:

          {
              "searchKey": "Adam",
              "productType": "Medical",
              "includeExpiredPolicies": true
          }

          Output JSON

          The JSON output is a list of enrollees, with the following properties under the fields node:

          {
            "data": {
              "records": [
                {
                  "fields": {
                    "Id": "0035w000039SsoSAAS",
          		  "AccountId": "0015w00002ADHiPAAX",
                    "LastName": "C2P1",
                    "FirstName": "P1",
          		  "Name": "C2P1 P1"
                  }
                }
              ]
            }
          }

          Sample JSON output with data:

          {
            "data": [
              {
                "AccountId": "0013h00000Gx5UqAAJ",
                "Id": "0033h00000BBybMAAT",
                "LastName": "C1P1",
                "FirstName": "D1",
                "Name": "D1 C1P1"
              },
              {
                "AccountId": "0013h00000Gx5UqAAJ",
                "Id": "0033h00000BBybPAAT",
                "LastName": "C1P2",
                "FirstName": "D1",
                "Name": "D1 C1P2"
              },
              {
                "AccountId": "0013h00000Gx5UrAAJ",
                "Id": "0033h00000BBybSAAT",
                "LastName": "C2P1",
                "FirstName": "D1",
                "Name": "D1 C2P1"
              }
            ],
            "error": "OK"
          }
           
          Loading
          Salesforce Help | Article