Automating Tasks with SAP SuccessFactors Recruiting

Objectives
After completing this lesson, you will be able to:

After completing this lesson, you will be able to:

  • Enable business rules for SAP SuccessFactors Recruiting
  • Configure the components of a business rule
  • Configure business rules
  • Manage rules in SAP SuccessFactors Recruiting

Business Rules Configuration

The rules engine is a tool that enables you to create customer-specific rules. At its most basic, for Recruiting, the Rules Engine provides a way to add if/then logic into requisition and offer creation processes.

For example, you can use a rule to specify:

  • All requisition that are created for full time employees in the Sales organization should include a potential calculated commission of 15% of the base salary

  • All offer approvals should have a set expiration date of 30 days after the creation date of the offer approval

  • Set the Currency field on the requisition based on the derived Country field (Action: Default value)

  • Add a warning message to the Currency rule: "Validate all financial fields when the country/ currency fields are changed." (Action: Raise message)

  • On the offer, calculate the Target Bonus as 10% of the Base Salary. (Action: Calculation)

Other business rules are useful for Recruiting. Review the following examples:

  • If the employee is eligible for stock (and the company is SAP_USA), then the initial stock grant is set to 200.

  • Create a rule that allows master data (foundation object/generic objects) to be passed from Recruiting Management to Onboarding.

  • Post job requisitions, either immediately or at a predetermined time in the future.

  • In the case of a replacement position, ensure that the name of the employee being replaced is provided. To do this, make the field required, and if a value of Addition to Staff is entered, then N/A is populated. Otherwise, the user must enter the exiting employee's name. Include a separate rule that will present a warning message to the user to remind them about what needs to happen.

  • When a requisition is cancelled, require that a valid cancellation reason is provided. For any of the statuses on the requisition that do NOT equal to Cancelled then N/A is populated. If the reason is changed to Cancelled, then the field is set to null and the user needs to enter a value. Include a separate rule that will present a warning message to the user to remind them about what needs to happen.

Business rules can be leveraged to make the following:

  • Calculation; for example, a calculation of Salary Mid field on a job requisition as an average of the Salary Max and Salary Min fields

  • Default values into fields; for example, default current user as recruiter on job requisition

  • Validate entries based on conditions raising a custom message if conditions are met; for example, if country of the job has changed also the currency has to be change on the job requisition

Business rules are written using the Metadata Framework (MDF) within the Admin Center and can be applied to job requisitions, offers, and candidate profile.

Employee Central is not required to create business rules, though some sophisticated rules also require Employee Central, for example, to automatically populate the Hiring Manager’s org structure (Legal Entity, Division, Department, Business Unit, Location, and Country).

Components of a Business Rule

When building the business rule, these are the major components that need to be defined:

  • Information about the rule object itself (Rule ID, Rule Name, Rule Type)

  • Objects and fields that determine what can be defined in the rule (defined by Base Object, Manage Parameters)

  • IF/THEN statements

Base Objects

A base object is the starting point when building the business rule. The base object defines what kind of input you can use for the rule. You can use the fields, attributes, and related data objects of the base object as input.

For example, if you want to create a rule that is triggered when the Status for a requisition is changed, you can choose Job Requisition (ALL) as a base object, as the requisition status field is stored on the requisition object.

Note
Rules can be created under the Job Requisition (All) as the base object or under each individual template. Job Requisition (ALL) combines all template fields into one view, where if you choose individual templates then only those fields on those templates are available. Same applies to Offer Approval (All).

Managing Rules in Recruiting

When developing a rule in recruiting, the rule is organized in the Admin Center under Managing Rules in Recruiting. Recruiters and administrators are now able to write rules for all major areas of Recruiting: Job Requisition, Offer Details, Candidate Profile, and Job Application.

Configuration and Testing of a Business Rule on a Job Requisition or Offer

The steps to configure and test a business rule on a job requisition or offer are as follows:

  1. Enable settings rules in Provisioning.

    • ProvisioningCompany SettingsEnable Generic Objects

    • ProvisioningCompany SettingsRole-based Permission.

  2. Assign permissions in the Admin Center to create and maintain business rules.

    • Admin CenterManage Permission RolesAdmin PermissionMetadata Framework, and then select all the checkboxes.

    • Admin CenterManage Permission RolesAdmin PermissionManage MDF Recruiting Objects: Recruiting Rules Assignment Configuration

  3. Write the business rule in the Admin Center by selecting Company SettingsConfigure Business Rules and entering the basic scenario screen information.

    1. Rule Name: Best practice is to start the name with "RCM" followed by "Req" or "Offer".

    2. Rule ID: Best practice is to start the name with "RCM" followed by "Req" or "Offer".

    3. Start Date: Enter the start date of the business rules. Best practice is 01/01/1900.

    4. Rule Type: A way to sort the rules into different groups. It is not mandatory for Recruiting.

    5. Description: You can enter the rule description.

    6. Base Object: Best practice is to define the rule against all templates (job requisition all or offer approval all).

  4. Define what user action triggers the rule in the IF condition.

    1. Select Always True if the rule is to be triggered when the user makes any change to the field or object.

    2. Enter one or more IF or ELSE IF condition if the rule is to be triggered when the user makes specific changes.

  5. Define how the system should react by defining one or more THEN or ELSE statements.

    Note
    Refer to the Recruiting Management Implementation Guide for details on which field types are supported by rules on job requisition and offers.
  6. Associate the business rule with a job requisition template or offer detail template by selecting Admin CenterManage Rules in Recruiting and then selecting Job Requisition or Offer Detail tab

    Note
    If you have multiple requisition templates, this rule must be linked to each individual template.
  7. Test the rule on the job requisition or offer.

Assigning Rules

After you configure the rule, be sure to assign it to the proper section.

Show Rule Assignment Information

Rules that have been built based on rule scenario (not the rule built on basic rule) scenario additional information is available on business rule list page:

  • Green tick: This rule is assigned. The rule is assigned somewhere in the system. It does not necessarily mean the rule is or was executed. If The rule is assigned icon is clicked, a dialog box opens to show the assignment details and the link to the application-specific UI to assign the rule (if provided by the application).

  • Grey column: This rule is not assigned. The rule is not assigned anywhere in the system.

  • An empty column field means an assignment information cannot be provided, as the rule is either based of a rule scenario which has not been migrated yet, or it is based on basic rule scenario where this information does not exist.

Note that the same icons are available next to the business rule name on the business rule detailed page.

Configuration of a Business Rule on a Candidate Profile

The steps to configure a business rule on a candidate profile are as follows:

  1. Go to Admin CenterConfigure Business Rules.

  2. In the Business Rules Admin, choose to create a business rule.

  3. In the Configure Business Rules section, expand Recruiting.

  4. Select Configure Business Rules on Candidate Profile.

  5. In the Configure Business Rules on Candidate Profile section, enter the following information:

    • Rule Name

    • Rule ID

    • Start Date

    • Description

  6. Choose Continue.

  7. In the newly created rule name section of the Configure Business Rules page, define your IF and THEN conditions of the rule.

  8. Choose Save.

  9. To be able to use the rule, you need to register in Manage Rules in Recruiting by navigating to Admin CenterManage Rules in RecruitingCandidate Profile section.

    Note
    Only the Save rule trigger is supported.

Configuration of the Business Rule on a Job Application

When defining job application rules, consider the following:

  • On the Configure Business Rules page, select the new scenario rule called Job Application: Basic Business Rule Scenario and define the rule.

  • In the Manage Rules in Recruiting page in the tab Job Application, select a job requisition template. You would then be able to link onChange or onSave rules to fields of the application template. The application template is derived from the previously selected job requisition template.

Business Rule Support for Drag-and-Drop

When creating business rules for the application, you can now configure rules to trigger when a candidate is moved through the "drag and drop" functionality in the Candidate Workbench. This allows a business rule to be executed when the user drags and drops a candidate from one status to another in the Candidate Workbench. It is the OnSave trigger for business rules.

This way, the business rule can be used to set conditions. For example, when a candidate is in the Interview status, the designated fields are completed automatically based on the information defined in the rule.

Management of Rules

Once you've created a business rule, you need to specify what kind of events will trigger it by associating the rule to a template in Admin CenterManage Rules in Recruiting. This will ensure that the rule works properly on the appropriate data model and template.

Manage Rules in Recruiting provides the ability to associate a business rule to any of the following Recruiting data models: Job Requisitions, Applications, Candidate Profile and Offer Details.

A rule can be triggered on a template at two levels:

  • Field Change Rules: Used to associate a rule to a specific field in the template.

  • Template-level Rules: Used to associate a rule to a specific action that happens at the template level. For example, when a job requisition is saved.

To associate a business rule to a template, first select the appropriate tab for the data model you wish to apply the business rule to. Then you must select the individual template you wish to assign the business rule to. Last, apply the business rule to the appropriate trigger by selecting the business rule from the drop-down menu.

Single and Mass Deletion of Business Rules

One or more rules can be selected to be deleted. Depending on assignment information, the system behavior is as follows:

  • Assigned rules cannot be deleted.

  • Unassigned rules as well as rules based on the basic rule scenario can be deleted.

Note
For rules based on the basic rule scenario, the system cannot protect the user from deleting a rule which is assigned. So, deleting a rule based on the basic rule scenario should still be treated with caution.

To delete a rule, use the bin icon on the top right corner on the business rules overview page.

Forbid Deletion of Rules Based on Assignment Information

If a user selects a rule to be deleted, it will be checked if the rule is still assigned in the system (based on the available assignment information).

If the rule is assigned, an error message is displayed to inform the user that the rule is still assigned, as well as where it is assigned.

This also works for mass deletion in Business Rules.

Tips and Tricks for Business Rules Configuration

Some tips for business rule configuration include the following:

  • Always perform a metadata refresh (AdminOData API Metadata Refresh and ExportRefresh) after adding a new field to a template, so that it can immediately be used in a rule.

  • Prefix rules with RCM_[template] so that they are easy to find when assigning; for example, RCM_Req or RCM_Offer.

  • Best practice is to map out all rules and determine if any can be combined for more efficient processing.

  • When using the JobRequisitionAll or OfferApprovalAll base objects, you may see multiple fields with the same label. Additionally, fields that are existing standard derived fields will appear with the same label as the standard foundation object/generic object fields.

  • Test your full recruiting process in staging after configuring new rules to ensure that you didn’t forget to include a parameter.

Set the Currency Field Based on the Country of the Job Field Value

Set the Currency Field Based on the Country of the Job Field Value - Part 1

Set the Currency Field Based on the Country of the Job Field Value - Part 2

Set the Currency Field Based on the Country of the Job Field Value - Part 3

Business Example

Recruiters appreciate having time savers as they are creating job requisitions. In this exercise you will create a Recruiting business rule that will automatically update the Currency field when the Country of Job field is changed on the requisition.

Task 1: Assign Permissions and Write the Business Rule

Steps

  1. Assign permissions to work with Recruiting business rules.

    1. Navigate to Admin CenterManage Permission Rolesselect the Administrators rolePermissionAdministrator PermissionMetadata Framework, select all the checkboxes.

    2. Select Manage MDF Recruiting Objects and select all options for Recruiting Rules Assignment Configuration.

    3. Click Done and Save Changes.

    4. Log out and back in to allow the permissions to take effect.

    5. Navigate to Admin CenterManage Recruiting Settings and using Ctrl+F, search for Recruiting Business Rules to find the switch to enable business rules for Recruiting. The switch is named: Enable Recruiting Business Rules. Select the checkbox and click Save.

  2. Create the business rule.

    1. Navigate to Admin CenterCompany SettingsConfigure Business Rules.

    2. Choose Create New Rule (+).

    3. Select Basic for basic rule.

    4. Complete the following information:

      • Rule Name: RCM_Req_Currency

      • Rule ID: RCM_Req_Currency

      • Start Date: 01/01/1900

      • Base Object: Job Requisition (All)

    5. Select Continue.

    Note
    Always follow these best practices when completing the above information:
    • Rule Name and Rule ID: Start with RCM followed by Req, Offer, Profile, or App.

    • Base Object: Define the rule against all templates (job requisition all or offer approval all). Individual job requisition or offer template can be selected, if needed.

  3. Populate the If statement.

    1. Click the dropdown for Select Left Expression and under Job Requisition (All) expand Country of Job (derived country field) and select Value.

    2. Do not change the next two fields: is equal to and Text.

    3. In the final field, Click to Edit enter US.

  4. Add the Then statement.

    1. Click the pencil icon and from the Select Output Type dropdown, select Set.

    2. Click the dropdown for Select Left Expression and under Job Requisition (All) select Currency.

    3. Do not change the next two fields: to be equal to and Value.

    4. In the final field, No Selection, click the dropdown and select USD.

  5. Repeat the above steps to add the rules for the other countries where the company hires. Begin by clicking Add Else If.

  6. View the completed rule.

  7. Save the rule.

  8. Link the rule to the Country of Job field on the job requisition template.

    1. Navigate to Admin CenterRecruitingManage Rules in Recruiting.

    2. For Job Requisition Template select Corporate Job Requisition.

    3. Under Field Change Rules, for Field select Country of Job (derived country field).

    4. For Rule select RCM_Req_Currency.

    5. Save.

  9. Test the rule.

    1. Proxy as a Recruiter, such as Paula Price.

    2. Navigate to Recruiting and open a job requisition.

    3. Find the Country of Job field.

    4. Change the value in this field to another country.

    5. Confirm that the Currency field is displaying correctly for the country.

Task 2: Add a Warning Message to the Business Rule

Steps

  1. Create a message for the Recruiting user to check financial fields when the country is changed.

    1. From Account Navigation at the top right, select Become Self to perform these steps as an administrator.

    2. Navigate to Admin CenterManage Data.

    3. Select Create New: Message Definition.

    4. Populate the message:

      • Text: Validate all financial fields when the country/currency fields are changed

      • External Code: RcmReqCurrency

      • Name: RcmReqCurrency

      • Status: Active

    5. Save.

      Note
      If the message needs to be translated, select the icon next to the Text field, then select Make Correction and click the globe icon next to the Text field.
  2. Add a message to the rule by navigating to Configure Business Rules to edit the original rule.

    1. In the Search field, use typeahead to find the rule that you have already created.

    2. Select the rule name (RCM_Req_Currency) to open it.

    3. From the Take Action list, select Make Correction.

      Note
      You are not able to add the message below the Then statement, so add the expression above the statement and then move it.
    4. From the first Then statement, click the dropdown beside the pencil icon and select AddExpression Above.

    5. Click the pencil icon from the new expression, and from the dropdown select Raise Message.

    6. In the Message field, select the name of the message created earlier, RcmReqCurrency.

    7. In the Severity field, select Warning.

    8. To move the message below the Then statement, from the dropdown on the right side of the Raise Message statement, select MoveMove Down.

    9. Repeat these steps to add the warning message to the other Then statements in the rule.

    10. Save the rule.

  3. Repeat the testing step above to ensure that the warning message displays when changing the Country of Job field on the job requisition.

Log in to track your progress & complete quizzes