SAP Knowledge Base Article - Public

2079920 - Employee Central - How to Create a Business Rule

Symptom

  • How to create a Rule Object for Employee Central?
  • We would like to configure Employee Central to follow certain rules under certain conditions. One example would be that we want a field to be propagated based on the value of another field.

Environment

SAP SuccessFactors Employee Central

Resolution

Rules can be created via Admin Tools > Manage Rule Objects > click Create New Rule. Fill in the empty fields -:

  1. Code = same as Foundation Objects, this is the external code for the rule, this will be needed when associating the rule with a field/section in the Succession Data Model XML.
  2. Name = Give the rule and easy to recognize title, such as the task it is going to perform
  3. Base Object = Can be any Object type, in this example we are using Job Information, so we can associate Job Info fields with the rule
  4. Rule Type = Select the Rule Type from the list. If there is not a rule type that matches then you need to amend the MDF Picklist “RuleType” via Admin Tools > Configure Object Definitions.
  5. Then, create the rule with the actions you intend to happen. In the example below, the rule will work as follows -:
    If the Division = ACEDivision, and the Sub Division = null (no value set), Then Raise the following message as a Warning message      1.JPG
  6. Then, create the rule with the actions you intend to happen. In the example below, the rule will work as follows -: If the Division = ACEDivision, and the Sub Division = null (no value set), Then Raise the following message as a Warning message
  7. Once the rule has been created, you need to decide how the rule gets triggered. There are currently 3 options that decide when the rule is triggered -:
    • onSave = When clicking save, the system will action the rule
    • onChange = when changing the fields value, the rule will action
    • onInit = only applies to New Hire wizard process, and will trigger when the page is loaded
  8. These triggers will force the rule to action based on the trigger type defined above.
  9. Once you have decided on the trigger type, you will need to raise a case with Customer Success to get the rule linked to the area of Employee Central where you want the rule to trigger. Please be sure to provide the information to Customer Success as follows -:
  10. Rule External Code + Section or Field in EC that the rule should trigger under. In the example above, we would need to provide CS with the following information -:
          Rule External Code = “SET_SUB_DIV”
          Trigger = onSave
  11. For example if this was to set a default value to a field during the New Hire process, you would need to supply the External Code and also the trigger, which is “onInit”.

    CODE EXAMPLE:

    An example of the SDM XML triggers would be as follows -:

    <hris-element id="jobInfo">
        <label>Job Information</label>
         <trigger-rule event="onSave" rule="SET_SUB_DIV"/>
         <trigger-rule event="onInit" rule="SET_SUB_DIV"/>
    …….
    <hris-field max-length="128" id="division" visibility="both">
          <label>Division</label>
           <trigger-rule event="onChange" rule="SET_SUB_DIV"/>
    </hris-field>

Keywords

create business rule, how to, SuccessFactors, Employee Central, FAQ , KBA , create business rule , how to , sf employee central , LOD-SF-EC-JOB-RUL , Job Info Business Rules , LOD-SF-EC , Employee Central , How To

Product

SAP SuccessFactors Employee Central all versions ; SAP SuccessFactors HCM Suite all versions