Other Rule scenarios and functions in Position Management

Objective

After completing this lesson, you will be able to identify other rule scenarios and functions in Position Management.

Generate Position Code Automatically

Generating the Position Code automatically when creating a new position will ensure consistency and avoid data entry issues. The autogeneration of position code can be defined differently, based on position attributes, like the Country of the Company. So positions could include US, DEU, ESP, PT or other, in the position code, depending on which country the position is assigned to. But there are multiple variables that customers can leverage adding the different conditions in the business rule.

There are some requirements and steps to complete in the system to generate position codes:

  • Create the numeric sequence from Manage Sequence or Manage Data. Multiple sequences can be created and be included in the business rule, which could be different based on country, department or any other position attribute. For example, positions in US could follow a sequence (US_POS10, US_POS20, US_POS30...) and positions in Germany could follow a different sequence (DEU_POS25, DEU_POS30, DEU_POS35 and so on).
  • Create a Business Rule in the Rules for MDF Based Objects scenario, with Position as Base Object and Evaluate as the Purpose.
  • Assign the Business Rule in the Position object definition, under Save Rules.
  • Set the code field (externalCode) as read-only in the Position object definition, so it's no longer editable and follows the business rule to autogenerate codes.
  • Set to "Yes" the flag Position External Code Generation by On Save rule in Position Management SettingsGeneral.

Hint

When defining the business rule to auto-generate position code, you can select the Format for the template based on the Format String Syntax from Java. If, for example, your sequence starts with 1, but the code for the position will always be an 8-digit number starting with 1 and filled with zeros, you would use this pattern: 1%07d.

Based on the customer requirements, the following external link will help on deciding which pattern should be used in every scenario to generate position codes, and include it as a template in the business rule. https://docs.oracle.com/javase/7/docs/api/java/util/Formatter.html

Learn how to autogenerate Position codes

In the following example, we will create a business rule to autogenerate position code using two different alternatives, based on the Country of the Position Legal Entity (Company). A template will generate the Position Code as PTPosID_%d if the position is in Portugal and PosID%d if the position is NOT in Portugal. Different numerical sequences will populate in the % parameter for each condition.

Steps

  1. Create a new Sequence for Position Code auto-generation. This example has two different sequences. The PTSeqPos will be used for Positions in Portugal, starts with 1000 and moves 125 numbers forward every time (1000,1125,1250,1375…). Currently, the sequence is at 0 (the current field is transient and will update as positions are created). The second sequence will be used for any other position, starts at 106 and moves 10 numbers forward every time (106, 116, 126, 136...). There can be as many sequences as needed. Use Manage Sequence tool, Manage Data or Import and Export Data to mass create sequences.

    Screenshot of two sequences defining start, step, and current values: PTSeqPos starts at 1000, SeqPos starts at 106.
  2. Create a Business Rule to Generate Position Code based on the sequences created.

    • Scenario: Rules for MDF Based Objects
    • Base Object: Position
    • Purpose: Evaluate
    Logic for auto-generating Position ID: Different sequences (SeqPos/PTSeqPos) applied based on country condition (Portugal or non-Portugal).
  3. Navigate to Configure Object DefinitionsPosition and set Position Code visibility as Read Only.

  4. Assign the Business Rule in the Position object definition, under Save Rules.

  5. Navigate to Position Management SettingsGeneralPosition External Code Generation by onSave rule, and set the value to Yes.

Result

Configuration for position management: Field set to read-only, save rule applied, autogenerated position codes enabled via admin settings.

The positions will be now have a position code autogenerated based on a business rule.

Complete Exercise - Define a Business Rule to Generate Automatically the Position Code

Your customer wants to have a business rule to generate the position code automatically when creating new positions.

Steps

  1. Create a new Sequence for Position Code auto-generation.

    1. Navigate to Manage Sequence using Action Search, and select Create NewSequence to create a new sequence for Position Code auto-generation.

    2. In externalCode, type SeqPos.

    3. In externalName, type SequenceForPosition.

    4. Select 1 as both start and step.

    5. Click Save to save your changes.

  2. Create a Business Rules to Generate Position Code automatically including the sequence you created previously.

    1. Navigate to Configure Business Rules using Action Search, and select + to create a new rule

    2. Expand the rule scenario Metadata Framework, and select Rules for MDF Based Objects.

    3. Add the following details using the table. Click Continue when finished.

      FieldValue
      Rule NameAutoGenerated Position Code
      Rule IDAutoPositionCode
      Start Date01/01/1900
      DescriptionRule for auto-generation of position code assigned on Save Rules in Position Object definition.
      Base ObjectPosition
      PurposeEvaluate
    4. Define the Business Rule including the conditions and statements shown on the image below

      Rule configuration to auto-generate position codes: If Position Code is null, assign using a formatted number from SeqPos sequence.
  3. Set the Position Code field as read-only and assign the Business Rule in Position Object (Save Rules)

    1. Select the dark "Dot" icon beside the Rule Name to open the Rule Assignment wizard.

    2. Click Assign Rule.

    3. Select This rule can be assigned at Save Rules in object "Position". A new tab will be opened with the Position object in Configure Object Definitions.

    4. Select Take ActionMake Correction

    5. Scroll down to the Fields section, locate the code field, and click on Details.

    6. Change the visibility from Editable to Read Only.

    7. Click Done to confirm.

    8. Scroll down to the Rules section, and select the AutoGenerated Position Code rule under Save Rules dropdown list.

    9. Click Save and close this tab.

    10. Back to Configure Business Rules, close the Rule Assignment wizard pop up window, and verify the "Dot" icon is now checked, which means the rule is assigned.

  4. Select the option to Autogenerate Position Code in Position Management Settings.

    1. Navigate to Position Management Settings using Action Search.

    2. In the General tab, locate the option Position External Code Generation by On Save rule, and select Yes

    3. Click Save to confirm.

  5. Test the Rule creating a new Position

    1. Navigate to Manage Positions using Action Search, and select Create NewPosition

    2. Verify that the Position Code field is now read-only

    3. Add some details to create a test position. We want to see how Position Code will autopopulate when saving.

    4. Click Save.

    5. Verify that the Position Code is auto-generated when and saving the position according to the sequence created (PosID_1, PosID_2, PosID_3 and so on).

Create an Approval Workflow for Position creation

In an organization using Position Management, there might be scenarios where Managers are empowered to create positions for their own teams. Even though the position object allows to a very granular control to who and for which target population positions can be created, an approval process may be required to select Approvers, Contributors or CC Roles to let them know about a position creation.

A Workflow Configuration will be the first step in the process. You will navigate to Manage Organization, Pay and Job Structures from the action search bar or the Admin Center to define a workflow for Position Creation, including the approver steps, contributors and/or CC roles that should be involved in the workflow.

Secondly, a Business Rule will need to be set up and assigned to the Position object to trigger the workflow when a new position is created.

Trigger Workflow to approve Position Changes

You can use workflows to validate Position object changes. Assign your rule to the event onSave of the position object definition.

  1. Create the foundation object Workflow that you want to use for Position.
  2. Create a rule by going to the Admin Center and choosing Configure Business Rules.
    • Rule Name, Rule ID, and Start Date.
    • Scenario Rules for MDF Based Objects.
    • Have Position as the base object and Workflow as the purpose.
    • You can use the IF or ELSE-IF statement to specify which conditions must be fulfilled for the workflow to be triggered.
    • You can use the THEN statement to set the workflow you created in step 1 to the wfConfig field of the Position.
  3. Assign your rule to the event onSave of the position object definition. You do this in the Admin Center by choosing Configure Object Definitions.
  4. Set the Pending Data field in the Position object definition to "Yes", thereby ensuring that, once a workflow is used, records are not visible in the system unless approved. This setting is a prerequisite for using workflows in positions.
  5. For MDF-based workflow approvals, the latest home page requires a solid relationship between the to-do category currently assigned in the "Configure Object Definitions" screen and the MDF object definition. In the ToDo Category field, you will notice that Generic Object Change Requests is selected (read-only).

Note

Unless using Position Types, you cannot execute a workflow on job information changes if you need to synchronize position changes with incumbents.

For more information, check the following resource: Setting Up Workflows for "Position To Job" Synchronization.

Complete Exercise - Define a Rule to trigger workflow for Position Creation

Your customer would like to define two conditional workflows and create on a business rule to trigger a workflow when a New Position is created in the US and another workflow when the position is created elsewhere in the organization.

Prerequisites

Caution

To avoid undesired behavior of workflow determination based on fields that are changed during Save rule execution, the workflows will only trigger once all the MDF Rule Scenario rules assigned as Save/Validate Rules have been triggered, which means the rule to autogenerate the Position Code created in a previous exercise will always run first.

For that reason, the system will check that Position Code is not empty in order to trigger the workflow. In a real scenario, to ensure this workflow is only triggered for new positions, you could make the system evaluate the Original Record value of Position Code to be empty, which would be applicable to a New Position. More information about the order of execution in MDF objects is found here: Order of MDF-Based Rule Execution.

Steps

  1. Create a Workflow Configuration for new positions created in the US, using the following details and approval steps.

    FieldValue
    Workflow IDNewPositionUS
    NameNewPositionWFL - US
    Step 1Step 2
    Approver Type : Dynamic RoleApprover Type: Dynamic Role
    Approver Role: Finance Controller (FIN-CONT)Approver Role: HR Approval (HR)
    Edit Transaction: No EditEdit Transaction: Edit without Route Change
    Context: SourceContext: Source
    Relationship to Approver: N/ARelationship to Approver: N/A
    No Approver Behavior: Skip this stepNo Approver Behavior: Skip this step
    Respects Permission: NoRespects Permission: No
    Workflow Email Configuration No SelectionWorkflow Email Configuration No Selection
    1. Navigate to Manage Organization, Pay and Job Structures using Action Search.

    2. Select Create NewWorkflow Configuration and include the details using the table above.

    3. Create two approval steps following the table above.

  2. Create a Workflow Configuration for New Position not created in US.

    FieldValue
    Workflow IDNewPosWFNonUS
    NameNewPositionWFL - NonUS
    Step 1Step 2Step 3
    Approver Type : Dynamic GroupApprover Type : Position RelationshipApprover Type: Dynamic Role
    Approver Role: Talent ApprovalApprover Role: Parent Parent PositionApprover Role: HR Approval (HR)
    Edit Transaction: No EditEdit Transaction: Edit without Route ChangeEdit Transaction: Edit without Route Change
    Context: N/AContext: TargetContext: Source
    Relationship to Approver: N/ARelationship to Approver: PositionRelationship to Approver: N/A
    No Approver Behavior: Skip this stepNo Approver Behavior: Skip this StepNo Approver Behavior: Skip this step
    Respects Permission: NoRespects Permission: NoRespects Permission: No
    Workflow Email Configuration No SelectionWorkflow Email Configuration No SelectionWorkflow Email Configuration No Selection
    1. Navigate to Manage Organization, Pay and Job Structures using Action Search.

    2. Select Create NewWorkflow Configuration and include the details using the table above.

    3. Create three approval steps following the table above.

  3. Create a Business Rule to Trigger Workflow on Position Creation

    1. Navigate to Configure Business Rules using Action Search.

    2. Select + to Create New Rule.

    3. Expand the Metadata Framework category.

    4. Select Rules for MDF Based Objects scenario, by choosing the radio button. Add the following details:

      • Rule Name: New_Position_WFL
      • Rule ID: New_Position_WFL
      • Start Date: 01/01/1900
      • Description: Rule to trigger an approval workflow when a position is created
      • Base Object: Position
      • Purpose: Workflow
    5. Select Continue

  4. Define the business rule logic

    1. Enter the following parameters on the business rule

      • IF (conditions) - Original Record.Position Code is equal to Null and Position.Company.Country is equal to United States (USA).
      • THEN (statements) - Set Workflow Context.Workflow Configuration to be equal to NewPositionWFL - US(NewPosWFUS).
      • ELSE IF (conditions) - Original Record.Position Code is equal to Null and Position.Company.Country is not equal to United States (USA).
      • THEN (statements) - Set Workflow Context.Workflow Configuration to be equal to NewPositionWFL_NonUS(NewPosWFNonUS).
    2. Click Save to save changes.

      Workflow configuration logic: Assign different workflows based on Position Code being null and whether the company country is the United States.
  5. Assign the business rule in the Position object

    1. Select the "Dot" symbol beside the New_Position_WFL rule name, that reads "The rule is not assigned" when hovering over. A Rule Assignment wizard will open.

    2. Choose Assign Rule.

    3. Select the Open Assignment page (arrow icon on the right) where it reads This rule can be assigned at Save Rules in object "Position" to navigate to Configure Object Definition from the wizard. A new tab will be opened.

    4. Select Take ActionMake Correction and scroll down to the Rules section.

    5. Select the New_Position_WFL rule, under Save Rules.

    6. Choose Save.

    7. Close this tab and verify the rule is now assigned in the Configure Business Rules page.

  6. Test the rule by initiating changes on a Position

    1. Navigate to the Position Org Chart using Action Search.

    2. Select Add Position button to create a new position with Position Title Account Manager, WEST.

    3. On the Position details, select Ace USA as the Company and Corporate Industries as the Business Unit. Select Account Manager (ACC-MGR) as the Job Code. The Parent Position will be DIR_SALESNW.

    4. Click Save to save changes and trigger the workflow.

    5. Verify the New Position US workflow triggers. Click on View Workflow Participants and verify that Janet James, Controller and Marcia Barista, VP, Talent are the Approvers.

    6. Click Confirm to submit the workflow.

    7. Repeat the steps b to f, to create another position and trigger a second workflow, this time, the Position Title Account Manager, SC, and select a different Parent Position DIR_SALESSC. The other details, including Company and Business Unit should be the same as the other position.

    8. Click Confirm to submit the workflow.

    9. To test the New Position Non-US workflow, you will be using an existing position that has a Parent Parent Position Relationship and add a lower-level position. You can use Quality Manager (MGR_QA).

    10. Open the Position Key Information by choosing the MGR_QA code.

    11. On the Actions menu, select Add Lower-Level Position. The parent position as well as the fields included in the rule to Default Position Attributes in a previous exercise will autopopulate.

    12. Change the Company from Ace USA to a different one, like Ace Brazil.

    13. Add a position title of your choice and complete any required field.

    14. Choose Save.

    15. Verify the New Position Non-US workflow triggers and includes the incumbent of the Parent Parent Position (based on New Position) as a 2nd Approver.

    16. Select Cancel to withdraw the workflow request.

    17. Do not save Position changes and choose Cancel and Don't Save on the warning dialog that shows up.

Managing Position Workflows

Generally speaking, any workflow requests to take action will be displayed in Engagement Cards from the Home Page, to drill down into the workflow details and take action accordingly. Some of the typical actions (depending on the workflow configuration) are:

  • Approve with or without comments (quick approval)
  • Drill down into workflow details to review and approve.
  • Update transaction
  • Post a comment
  • Send back
  • Assign to me (when approver is from a workflow group).

    Additionally, approvers are able to manage all their workflow requests navigating to View Pending Workflows , from the Home Page or typing on the action search View my pending requests. From there, an Access requests awaiting my approval will be available to navigate to My Workflow Requests page.

Note

Access to My Workflow Requests page, requires the following permission: Professional Edition Manage Workflow Requests enabled in Manage Permission RolesAdministrator PermissionsManage Workflows .
Pending workflows dashboard in SAP SuccessFactors displaying three Create Position requests awaiting approval, with actions available to approve.

Within the Advanced To Do Page, the Key Details column can be customized to display different details about the position to be created/changed, to improve the navigation through workflow requests for MDF Position object.

You can navigate to Manage DataCreate New and create an Advanced To-do Key Details for Position object.

Manage Data interface showing Position object configuration, including externalCode and custom fields, with options to enable visibility.

Note

A maximum of four fields can be displayed and therefore included in the Advanced To-do Key Details at a time.

Only Position object supports this configuration as of now. Each company can only have one instance of the Advanced To-do Key Details object, in Manage Data. If changes are required, you can edit an existing instance, or delete it and create a new one.

Learn how to customize Advanced To Do Key Details for Position workflow requests

Your customer requires to customize the Key Details for Position Workflow requests, to display additional field values and allow approvers to identify position workflows in an easier way within the Advanced To Do Page.

Note

In the step 6, if you cannot access My Workflow Requests , you will need to grant the following permission to the Manager role: Professional Edition Manage Workflow Requests , located under Manage Workflows .

Steps

  1. Navigate to Manage DataCreate NewAdvanced To-do Key Details

  2. Select name: Position Workflow Key Details and code: PosWFLKeyDetails

  3. Under Configuration by MDF Object select Position (Position) and click on Details

  4. Under Customized Field Details add the following fields (leave Show Code as No):

    • externalName (externalName)
    • sfFields.sfField15 (company)
    • sfFields.sfField16 (businessUnit)
    • sfFields.sfField8 (jobCode)
  5. Click Done and Save to save the changes.

  6. Proxy as Janet James, Controller and view all the Approvals from the Home Page. Navigate to View Pending Workflows and choose the option Access requests waiting for my approval.

  7. Verify the Key Details for Position include the new 4 fields.

Result

My Workflow Requests list showing 11 position requests with details like position title, company, business unit, and job code.

You have customized the Key Details to display in Position Workflows from My Workflow Requests page.

Complete Exercise - Explore Right to Return to Position from a Global Assignment

In this exercise, you will be setting up the Position Management Settings for the Right to Return and adding a global assignment for an employee to explore the impact on the host and home position assignments. You will be using the position created in the previous exercise to test the Default Position Attributes business rule and practicing the knowledge learned in Unit 3 about this type of employment and how it impacts positions.

Note

The required business rules to create right to return are already set up in your instance. You will complete the assignment of the rules in Position Management Settings as part of the step 1 in this exercise.

Steps

  1. Set up the Right to Return from Global Assignment in Position Management Settings.

    1. Navigate to Position Management Settings using Action Search.

    2. Select the Right to Return tab.

    3. Set the following options within the Right to Return for Global Assignment:

      • Unassign from Position: THR79 - PositionRightToReturnUnassign.
      • Create Right to Return: THR79 - PositionRightToReturnAssign.
      • Event Reason for unassigned Position: Away on Global Assignment (AGA).
      • Event Reason for assign Position: Back from Global Assignment (BGA).
    4. Choose Save to save the changes.

  2. Add a Global Assignment for an Incumbent.

    1. In the Action Search, type global and select the Manage global assignments for... option.

    2. Type Clive Wu. He is the incumbent for the Manager of Food and Beverage position, located in USA.

    3. Set the following Global Assignment Details:

      • Assignment Start Date: The first day of the current month (example: 04/01/2024)
      • New Assignment Company: Ace Germany (ACE_DEU)
      • Event Reason: Add Global Assignment (ADD_GA)
      • Assignment Type: Long-term assignment
      • Planned End Date: The last day of the following year (example: 12/31/2025)
    4. Select Continue.

    5. Select Sales Director, Europe as the Position.

    6. All the organizational and job information should propagate based on the business rule.

    7. Scroll down to the bottom of the page, and select Submit.

    8. A workflow will be triggered. Select Submit to confirm.

    9. Proxy as Alex Anderson, one of the members of the Talent Approval workflow group where this request was sent.

    10. Locate the workflow request and select Approve.

    11. Become Self to navigate back as the administrator.

  3. Verify the Right to Return to the home position and the Global Assignment on the host position, are visible in the Position Org Chart.

    1. Navigate to the Position Org Chart.

    2. Search for the Sales Director, Europe position.

    3. Verify that a Global Assignment icon displays in the Position Card and the incumbent is Clive Wu. The position TBH status has been also updated, and position is fully staffed.

    4. Use the calendar to navigate the Position Org Chart as a future date. Make sure to select a date after the end of the Global Assignment.

    5. Verify that the position Sales Director, Europe is back to TBH status.

    6. Use the calendar to navigate the Position Org Chart as today's date.

    7. Search for the Manager of Food and Beverage position.

    8. Verify that an Away on Global Assignment icon displays. If you select the icon, the Global Assignment Details are shown.

    9. Use the calendar to navigate the Position Org Chart as a future date. Make sure to select a date after the end of the Global Assignment.

    10. Verify that the icon is no longer shown for the position once the Global Assignment is ended.

Rule Functions

In the context of business rules in SAP SuccessFactors, the rule functions can be used to perform specific calculations, time and date related, execute actions and many more.

The rule functions related to Position Management that can be used are the following:

  • Get Incumbent By Position. This function returns the user ID of the incumbent of the position. If more than one incumbent is assigned, only one is returned. This is used to find out who occupies a particular position as of the specified date. The rule requires to provide the Position Code and the Position Start Date.
  • Get Next Available Manager By Position. This function returns the user ID of the next available manager in the position hierarchy. The rule requires to provide the Position Code and the Position Start Date.
  • Get Matrix Position Code By Type. This function returns the code of the matrix position that is assigned by the specified type. You need to enter Position Code, Date and Matrix Relationship Type.
  • Get Number of Child Positions. The rule function returns how many positions are child of the current position. You need to enter Position Code, Date and whether inactive positions should be included or not.
  • Get Pay Range By Position. It can be used to calculate the pay range for a position. Some examples are available here Showing Pay Range on Position
  • Get Pay Range Attributes. Use this rule function to determine the attributes of a pay range such as Minimum Pay, Maximum Pay, Mid Point, Currency, and Frequency. You need to enter a pay range, the pay range field, and a date.
  • Is Position Below User's Position in Hierarchy (New Version). Indicates whether the position is in user's position hierarchy and below user's position. This version of the rule function can be used to create new positions.

Note

Examples and more information can be found here: Rule Functions in Position Management

Summary

  • The business rule to Generate Position Code automatically will ensure consistency and avoid data entry issues. Some of the steps required will be to create the numeric MDF sequences and set the position code to read-only.
  • Workflows are important in Position Management, whenever tasks are delegated to other roles to allow them to initiate changes on positions, ensuring the right approval process is in place with business rules and workflow configurations.
  • Rule functions can be used to perform specific calculations or retrieve specific data, in position management there are several examples, like the Get Incumbent by Position or Get Pay Range by Position.