Every business rule may contain one or more conditions. By default, a new business rule has only one condition: an 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 condition, as well as add or remove other conditions based on Persons attributes, including custom attributes.
This article will walk you through modifying business rule conditions, in order to change which Persons are in-scope.
Modify business rule conditions
While adding a new business rule or modifying an existing one (see Add and manage business rules), edit the rule's conditions on the Conditions tab.
Using the three sections on the left side of the page, you can change the criteria that Persons must meet in order to be in-scope of the business rule. On the right, you can see a dynamically-updated list of in-scope Persons.
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 conditions to narrow down the list of qualifying Persons. Conditions 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 conditions may be added for Person attributes and Contract attributes, whereas Departments and Titles can only have (and only ever require) one condition each. Conditions are stacked with AND logic (e.g., person attribute X AND person attribute Y, or person attribute X AND department Z). However, within conditions, 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 condition
You may add as many Person attribute conditions as you like. Each condition takes a single attribute, and any number of values for that attribute.
To add a Person attribute condition to the rule, select its plus (+) sign button.
Select the condition to expand and configure it:
- Invert Condition
Applies NOT logic to the results. Every Person which would normally be included is excluded, and vice versa.
- 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).
- 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.
The following animation shows how to add more than one value for an attribute.
Add a Contract attribute condition
The process for adding a Contract attribute condition is nearly identical to adding a Person attribute condition. Select the plus (+) sign button for Contract attribute and follow the same instructions provided above.
Add a Departments condition
Unlike Persons and Contracts attributes conditions, you may only add one Departments condition.
To add a Departments condition to the rule, select its plus (+) sign button.
Select the condition 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 condition. To add additional departments, repeat this process.
The following animation shows how to add more than one department:
Add a Titles condition
The process for adding a Titles condition is nearly identical to adding a Departments condition. Select the plus (+) sign button for Titles and follow the same instructions provided above.
Person, Contract, Departments, and Titles conditions all have Invert Condition toggles:
Turning on this toggle makes the respective attribute condition 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, 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 condition.
Note that inverted attribute conditions 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 condition 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 condition. On the other hand, if for example you create a condition for "NOT department A", and a Person has two separate contracts with department A, then that Person will be in scope of the inverted condition, as per its "NOT only" basis.
All changes you make are auto-saved, and the rule is put into a Draft state. To save your changes, see Publish a business rule.