Every business rule has only a single condition, but a condition may contain multiple filters. By default, a business rule has only one filter: active contract. This means that upon enforcement, the rule will be applied to every currently imported Person with at least one contract set to 'active.' You can change this filter, as well as add or remove other filters based on Persons attributes, including custom attributes you've defined.
This article will walk you through modifying business rule conditions, in order to change which Persons are in scope. It will explain all the filters which are available to you.
Modify business rule conditions
While adding a new business rule or modifying an existing one, you can edit the rule's condition. To do so, select the relevant wrench button in the Condition section. You are taken to the Edit Condition page.
Using the three sections on the left side of the page, you can change the criteria that Persons must meet in order to qualify for the business rule. On the right, you can see a dynamically-updated list of qualifying Persons.
Here, you can choose whether the rule applies to Persons with active or inactive employment contracts. An active contract is one whose start date is before today, and whose end date is after today.
This section is only shown if the selected contract status is Active. You can modify the number of days before contract start, or after contract end, that the business rule will apply. For example, if you want a rule that applies five days before contract start, put the number "5" in the Days Before Start box.
Here, you can create additional filters to narrow down the list of qualifying Persons. Filters can be based on the following data from your source system:
- Person attributes
- Contract attributes
Person and Contract attributes include any custom fields you've defined for the source system.
Note: Multiple filters may be added for Person attributes and Contract attributes, whereas Departments and Titles can only have (and only ever require) one filter each. Filters are stacked with AND logic (e.g., person attribute X AND person attribute Y, or person attribute X AND department Z). However, within filters, values are evaluated with OR logic (e.g., person attribute X OR person attribute Y, or department X OR department Y).
Add a Person attribute filter
You may add as many Person attribute filters as you like. Each filter takes a single attribute, and any number of values for that attribute.
To add a Person attribute filter to the rule's condition, select its plus (+) sign button.
Select the filter to configure it:
- Selected Attribute
The Person attribute to filter on. Select an option from the drop down.
- Attribute Values
The value(s) to match against the Selected Attribute. Type a value and then select the plus (+) button. You may add multiple values.
- Mode (Equals / Contains)
The method by which to match your Attribute Value(s) against the Selected Attribute. Select either Equals (case-sensitive exact match) or Contains (case-insensitive string subset match).
- Invert Condition
Applies NOT logic to the filter results. Every Person which would normally be included is excluded, and vice versa.
The following animation shows how to add more than one value for an attribute.
Add a Contract attribute filter
The process for adding a Contract attribute filter is nearly identical to adding a Person attribute filter. Select the plus (+) sign button for Contract attribute and follow the same instructions provided above.
Add a Departments filter
Unlike Persons and Contracts attributes filters, you may only add one Departments filter.
To add a Departments filter to the rule's condition, select its plus (+) sign button.
Select the filter to start configuring it. You are presented with the Departments drop-down menu and the Selected Departments text box:
Select a department in the Departments drop-down menu, and then select the plus (+) button to add it to the Selected Departments list. Any person in one of these departments will qualify for the filter. To add additional departments, repeat this process.
The following animation shows how to add more than one department:
Add a Titles filter
The process for adding a Titles filter is nearly identical to adding a Departments filter. Select the plus (+) sign button for Titles and follow the same instructions provided above.
Person, Contract, Departments, and Titles filters all have Invert Condition toggles:
Turning on this toggle makes the respective attribute filter work in reverse, as a NOT condition. Persons who were previously in-scope become out-of-scope, and vice versa. This helps you exclude certain subsets of Persons from the rule's condition, so they won't receive its associated entitlement(s).
For example, if you have a rule that grants Active Directory accounts, but some of your Persons have external or volunteer contract types and therefore shouldn't receive AD accounts, you can exclude them from the rule with the appropriate inverted contract filter.
Note that inverted attribute filters for Contracts, Departments, and Titles operate on a "NOT only" basis. This is because a Person may have multiple entries for these attribute types. For example, if you create a department filter for "NOT department A", but a Person belongs to both department A and department B, then that Person won't be in scope of the inverted filter. On the other hand, if for example you create a filter for "NOT department A", and a Person has two separate contracts with department A, then that Person will be in scope of the inverted filter, as per its "NOT only" basis.
When you are finished editing the rule's condition, click the Apply button to save your changes.