# Filtering SuccessFactors Account Aggregation

Use account aggregation filters to limit the employee and user records that the source aggregates.

## Filtering Employment Based on assignment\_class

The SuccessFactors connector supports filtering specific employment records during employee and user aggregation based on the assignment\_class attribute. To apply a filter based on assignment\_class, submit the change to the VA using the SailPoint V3 Sources REST API.

```text
PATCH  https://<orgName>.api.cloud.sailpoint.com/v3/sources/<SuccessFactorSourceId>
```

> [!NOTE]
>
> For more information on SailPoint's REST APIs, refer to [Best Practices: REST API Authentication](<https://developer.sailpoint.com/docs/api/authentication/>) and [REST API - Update Source (Partial)](<https://developer.sailpoint.com/docs/api/update-source-v-1/>) in the SailPoint Developer Community.

### assignment\_class Filter

**Description:** This attribute is used to filter specific employment records during employee and user aggregation.

**Resolution:** Use this filter to pull only those employment records that match the desired assignment\_class value.

**Example:** If you want to fetch employment records where the assignment\_class is "ST", use the following format:

```json
[
 {
  "op": "add",
  "path": "/connectorAttributes/employmentFilter",
  "value": {
      "employment.assignment_class": "ST"
  }
 }
]
```

## Aggregation Query Filter

The Aggregation Query Filter is used to filter employees when the **Account Type to Manage** setting is set to **Employees**.

> [!NOTE]
>
> The Aggregation Query Filter is only applicable for the `EmpJob` entity and only property names with a `sap:filterable` value of `true` can be used in the filter query.

### Viewing the EmpJob Entity

To view the EmpJob entity in your SuccessFactors tenant:

1. Go to **Admin Center \> ODATA API DATA dictionary \> Entity**.
2. In the **Name** field, search for `EmpJob`.

   [![EmpJob](<https://documentation.sailpoint.com/connectors/successfactors/va/help/img/empjob.png>)](<https://documentation.sailpoint.com/connectors/successfactors/va/help/img/empjob.png>)

### Query Examples

Use the following examples to configure your own aggregation queries.

> [!NOTE]
>
> All values in a query should be enclosed in quotation marks. For example, `"value"`.

For more information on the available operators, refer to the **$filter** section of the [SAP SuccessFactors API Reference guide](<https://help.sap.com/docs/SAP_SUCCESSFACTORS_PLATFORM/d599f15995d348a1b45ba5603e2aba9b/ded5808b5edb4bc9a8acfb5e9fe1b025.html>).

- To filter employees from a specific department and division:

  ```text
  department eq "50000300" and division eq "EXEC"
  ```
- To filter employees from company A and company B:

  ```text
  company in "A", "B"
  ```
- To filter employees based on their start date:

  ```text
  startDate gt datetime"2023-06-06T00:00:00"
  startDate lt datetime"2023-06-06T00:00:00"
  ```

  > **Note**
  >
  > The date format is the two-letter timezone abbreviation datetime:
  >
  > ```text
  > yyyy-MM-dd-THH:MM:SS
  > ```

### Finding Proper Values (externalCode) for Query Filter Parameters

In the ODATA API, some properties require external code values to fetch the data.

For example:

```text
company eq "8500"
```

In this example, `8500` is an external code for the BestRun Australia company.

To get external codes for any property from your SuccessFactors tenant:

1. Go to the **Admin Center**.
2. Go to **Manage Data**.
3. Search for the property name. For example, `Division`, `Department`, or `Position`.
4. The adjacent dropdown list contains all the associated values with labels and their codes in parentheses.

   For example, in the following screenshot, **Corporate** is the label and **CORP** is its associated code so the filter query would be `businessUnit eq "CORP"`

   [![Code Search](<https://documentation.sailpoint.com/connectors/successfactors/va/help/img/code_search.png>)](<https://documentation.sailpoint.com/connectors/successfactors/va/help/img/code_search.png>)

#### Property Names and Navigation Path for the External Code

The following table lists property names and their associated navigation path to get the external code:

| Property Name | Navigation Path for External Code |
| --- | --- |
| jobCode | Admin Center \> Tools \> Manage Data \> Job Classification |
| company | Admin Center \> Tools \> Manage Data \> Legal Entity |
| division | Admin Center \> Tools \> Manage Data \> Division |
| department | Admin Center \> Tools \> Manage Data \> Department |
| countryOfCompany | Admin Center \> Tools \> Manage Data \> Country/Region |
| position | Admin Center \> Tools \> Manage Data \> Position |
| payGrade | Admin Center \> Tools \> Manage Data \> Pay Grade |
| location | Admin Center \> Tools \> Manage Organization, Pay and Job Structures \> Location |
| eventReason | Admin Center \> Tools \> Manage Organization, Pay and Job Structures \> Event Reason |
| businessUnit | Admin Center \> Tools \> Manage Data \> Business Unit |
| costCenter | Admin Center \> Tools \> Manage Data \> Cost Center |
| payScaleArea | Admin Center \> Tools \> Manage Data \> Pay Scale Area |
| payScaleGroup | Admin Center \> Tools \> Manage Data \> Pay Scale Group |
| payScaleType | Admin Center \> Tools \> Manage Data \> Pay Scale Type |

#### Property Names and Navigation Path for the External Code from Picklist Center

The following table lists the properties and their associated navigation path for the external code from the Picklist Center:

| Property Name | Navigation Path for External Code |
| --- | --- |
| employeeClass | Admin Center \> Tools \> Picklist Center \> EmployeeClass \> Option ID of one of the picklist values |
| employmentType | Admin Center \> Tools \> Picklist Center \> employmentType \> Option ID of one of the picklist values |
| event | Admin Center \> Tools \> Picklist Center \> event. Option ID of one of the picklist values |
| emplStatus | Admin Center \> Tools \> Picklist Center \> employee-status \> Option ID of one of the picklist values |

### Validating Query Filters

To validate query filters during test connection processes:

1. In the SailPoint SuccessFactors SaaS connector configuration page, go to **Aggregation Settings \> Filter Criteria For Employees**.
2. Enter the query filter statement you want to validate in the **Aggregation Query Filter** field.
3. Select **Validate Aggregation Query Filter**.

   The query validation occurs when the test connection operation is performed.

## Additional Parameters

The parameters listed on this page enable you to further customize the account aggregation process.

### excludePendingHires

Controls whether the connector aggregates onboarding and future hires during account aggregation.

- `true` (default) - Onboarding and future hire accounts are included in account aggregation
- `false` - Onboarding and future hire accounts are excluded from account aggregation
