Business rules are used to add application logic to the system. Business rules can be applied to any application of SAP SuccessFactors. In this unit, we will only cover the rules for Employee Central Data.
Process Overview of Configuring Business Rules
Configuring business rules is a two-step process that consists of creating and assigning the business rule. The general steps are as follows:
- Business Rule Creation
- Define the IF statement – The IF statement in the rule refers to what conditions must be met for the system to react.
- Define the THEN statement – The THEN statement in the rule refers to the action the system will take once the conditions are met.
- Assignment of Rule
- To determine how rules must be assigned, first, determine what user action must trigger the rule. Is it when the user is saving the data, when they are opening the page, or when changing a field?
- Depending on the trigger, the rule can be assigned at the field or object levels.
The Rule Logic
Most business rules are comprised of IF and THEN statements.
IF Logic
IF statements are the conditions in the rule that must be validated. The IF logic uses "and"/"or" statements to determine when the THEN logic should be executed. The following list provides examples of when IF logic is used:
- If a particular option is chosen from a picklist
- If specific text or numbers are entered into a field (or if they are greater than or less than the values stated)
- If a field value has changed
Some rules are created without an IF statement, also known as, Always True, which means there are no conditions for the system to check. Once the rule is triggered, the system will always react the way it was configured in the THEN statement.
Else If statements allow you to combine several conditions in the same rule.
THEN Logic
The THEN statement determines the system action once the condition is met. Depending on the use case, these are the actions the system can execute with Then logic:
- SET: This automatically propagates information based on existing information or a specific value chosen.
- Raise message: This brings a pop-up box up on the screen that provides additional information to the user filling in the information or an error message that something was done incorrectly.
- Create: This creates a child object. Examples include adding a new pay component to an employee or creating another child object attached to the parent object.
- Delete: Delete data from the database when a rule is triggered. For example, you can remove a pay component when the employee moves away from London.
- Execute: Carry out specified action when the rule is triggered.
- Add to: Add items to a collection when a rule is triggered. For example, you can create a single rule to assign multiple learning courses to new hires.
ELSE statements can also be added. These actions occur when THEN statements are not applicable because the IF condition is NOT true.