www.sap.com Administrator Training Guide SAP SuccessFactors MetaData Framework (MDF) Foundations (THR99) SAP SUCCESSFACTORS META-DATA FRAMEWORK (MDF) FOUNDATIONS (THR99) 2 SAP SE Copyrights and Trademarks © 2017 SAP SE. All rights reserved. No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP SE. The information contained herein may be changed without prior notice. Some software products marketed by SAP SE and its distributors contain proprietary software components of other software vendors. Microsoft, Windows, Excel, Outlook, and PowerPoint are registered trademarks of Microsoft Corporation. IBM, DB2, DB2 Universal Database, System i, System i5, System p, System p5, System x, System z, System z10, System z9, z10, z9, iSeries, pSeries, xSeries, zSeries, eServer, z/VM, z/OS, i5/OS, S/390, OS/390, OS/400, AS/400, S/390 Parallel Enterprise Server, PowerVM, Power Architecture, POWER6+, POWER6, POWER5+, POWER5, POWER, OpenPower, PowerPC, BatchPipes, BladeCenter, System Storage, GPFS, HACMP, RETAIN, DB2 Connect, RACF, Redbooks, OS/2, Parallel Sysplex, MVS/ESA, AIX, Intelligent Miner, WebSphere, Netfinity, Tivoli and Informix are trademarks or registered trademarks of IBM Corporation. Linux is the registered trademark of Linus Torvalds in the U.S. and other countries. Adobe, the Adobe logo, Acrobat, PostScript, and Reader are either trademarks or registered trademarks of Adobe Systems Incorporated in the United States and/or other countries. Oracle is a registered trademark of Oracle Corporation UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open Group. Citrix, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame, and MultiWin are trademarks or registered trademarks of Citrix Systems, Inc. HTML, XML, XHTML and W3C are trademarks or registered trademarks of W3C®, World Wide Web Consortium, Massachusetts Institute of Technology. Java is a registered trademark of Sun Microsystems, Inc. LabNetscape. SAP, SAP Fiori, SAP SAPUI5, R/3, SAP Fiori, SAP NW Gateway, SAP NetWeaver, Duet, PartnerEdge, ByDesign, SAP BusinessObjects Explorer, StreamWork, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP SE in Germany and other countries. Business Objects and the Business Objects logo, BusinessObjects, Crystal Reports, Crystal Decisions, Web Intelligence, Xcelsius, and other Business Objects products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of Business Objects Software Ltd. Business Objects is an SAP company. Sybase and Adaptive Server, iAnywhere, Sybase 365, SQL Anywhere, and other Sybase products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of Sybase, Inc. Sybase is an SAP company. All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary. These materials are subject to change without notice. These materials are provided by SAP SE and its affiliated companies ("SAP Group") for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty. © Copyright. All rights reserved. SAP SUCCESSFACTORS META-DATA FRAMEWORK (MDF) FOUNDATIONS (THR99) 3 SAP SuccessFactors Meta-Data Framework (MDF) Foundations (THR99) ABOUT THIS HANDBOOK............................................................................................................................... 6 COURSE INTRODUCTION ............................................................................................................................... 7 Overview ........................................................................................................................................................... 7 Target Audience ............................................................................................................................................... 7 Course Objectives ........................................................................................................................................... 7 SAP SuccessFactors Community .................................................................................................................. 8 Additional Resources ...................................................................................................................................... 8 UNIT 1 - METADATA FRAMEWORK (MDF) FEATURE OVERVIEW ............................................................. 9 Unit Objectives ................................................................................................................................................. 9 Lesson 1-1 - MDF – What Is It and How Can it be Used? .......................................................................... 10 Lesson Objectives ........................................................................................................................................... 10 MDF – Overview .............................................................................................................................................. 10 MDF Components............................................................................................................................................ 11 Getting Started ................................................................................................................................................. 12 Role Based Permissions (RBP) ....................................................................................................................... 13 Lesson Summary ............................................................................................................................................. 15 Lesson 1-2 - MDF Object Configuration ...................................................................................................... 16 Lesson Objectives ........................................................................................................................................... 16 MDF Object Configuration ............................................................................................................................... 16 Object Settings ................................................................................................................................................ 18 Fields ............................................................................................................................................................... 21 Details .............................................................................................................................................................. 22 Associations ..................................................................................................................................................... 25 Details Section ................................................................................................................................................. 27 Searchable Fields ............................................................................................................................................ 28 Business Key Fields ........................................................................................................................................ 28 RBP Security ................................................................................................................................................... 28 Business Rules ................................................................................................................................................ 29 Rule Categories ............................................................................................................................................... 29 MDF Picklists ................................................................................................................................................... 29 MDF Picklist Configuration .............................................................................................................................. 31 Lesson Summary ............................................................................................................................................. 32 Lesson 1-3 - MDF and Workflows ................................................................................................................ 33 Lesson Objectives ........................................................................................................................................... 33 MDF and Workflows ........................................................................................................................................ 33 Creating, Importing and Storing Data for GO .................................................................................................. 34 Importing and Exporting Data .......................................................................................................................... 34 Download Template ......................................................................................................................................... 35 Import Data ...................................................................................................................................................... 36 Export Data ...................................................................................................................................................... 37 Exercise - Create a New MDF Picklist for Condition ....................................................................................... 37 Exercise - Create a New MDF Picklist for Make ............................................................................................. 38 Exercise - Create a New Company Car Object ............................................................................................... 39 Lesson Summary ............................................................................................................................................. 40 Lesson 1-4 - Metadata Framework OData API ............................................................................................ 41 Lesson Objectives ........................................................................................................................................... 41 OData definition ............................................................................................................................................... 41 What Can You Do With the OData API? ......................................................................................................... 41 © Copyright. All rights reserved. SAP SUCCESSFACTORS META-DATA FRAMEWORK (MDF) FOUNDATIONS (THR99) 4 What Is the Future of the OData API? ............................................................................................................. 42 Lesson Summary ............................................................................................................................................. 42 Lesson 1-5 - Metadata Framework and SAP SuccessFactors Reporting Tools ..................................... 43 Lesson Objectives ........................................................................................................................................... 43 High Level Architecture.................................................................................................................................... 43 SAP SuccessFactors Reporting Tools ............................................................................................................ 44 MDF Data Replication...................................................................................................................................... 45 MDF Data in ODS ............................................................................................................................................ 45 Lesson Summary ............................................................................................................................................. 45 Lesson 1-6 - Metadata Framework Job Profile Builder and Skills Management .................................... 46 Lesson Objectives ........................................................................................................................................... 46 What is Job Profile Builder?............................................................................................................................. 46 Why Did We Use MDF?................................................................................................................................... 46 Lesson Summary ............................................................................................................................................. 46 Lesson 1-7 - Metadata Framework Extension Platform ............................................................................. 47 Lesson Objectives ........................................................................................................................................... 47 SAP Cloud Computing Stack ........................................................................................................................... 47 How is MDF different than Standalone Development ..................................................................................... 48 MDF Extensibility Features .............................................................................................................................. 49 MDF Complete Extensibility in the Cloud ........................................................................................................ 50 Extending Employee Central and SAP HANA Cloud ...................................................................................... 51 MDF Integration ............................................................................................................................................... 52 Extending Employee Central and SAP HANA Cloud ...................................................................................... 52 SAP HANA Cloud Platform Provides Scale and Velocity to Create New Cloud Native Applications ............. 53 Example Uses of MDF ..................................................................................................................................... 55 Web Interface Tool .......................................................................................................................................... 56 MDF Availability ............................................................................................................................................... 57 Lesson Summary ............................................................................................................................................. 57 Unit Wrap-Up .................................................................................................................................................. 57 UNIT 2 - BUSINESS RULES ENGINE ............................................................................................................ 59 Unit Objectives ............................................................................................................................................... 59 Lesson 2-1 - Business Rules Engine ........................................................................................................... 59 Lesson Objectives ........................................................................................................................................... 59 Introduction ...................................................................................................................................................... 59 If Logic ............................................................................................................................................................. 60 Then Logic ....................................................................................................................................................... 61 Enabling and Permissioning the Rules Engine ............................................................................................... 61 Creating Rule Types ........................................................................................................................................ 63 Create a Rule Type Picklist ............................................................................................................................. 63 Business Rule Examples ................................................................................................................................. 64 Propagation Rules ........................................................................................................................................... 65 Define Rules .................................................................................................................................................... 66 Validation Rules ............................................................................................................................................... 67 Update Data ..................................................................................................................................................... 68 Define Data ...................................................................................................................................................... 68 Variable Pay Eligibility Rule ............................................................................................................................. 69 Use Rule .......................................................................................................................................................... 70 Define Rules .................................................................................................................................................... 71 Lesson Summary ............................................................................................................................................. 71 Lesson 2-2 - Business Rules Engine – Creating and Triggering Rules ................................................... 72 Lesson Objectives ........................................................................................................................................... 72 Creating Business Rules ................................................................................................................................. 72 Base Objects ................................................................................................................................................... 73 If/Then Logic .................................................................................................................................................... 74 © Copyright. All rights reserved. SAP SUCCESSFACTORS META-DATA FRAMEWORK (MDF) FOUNDATIONS (THR99) 5 Dropdown List of the Left Expression .............................................................................................................. 74 Dropdown Menu of the Right Expression ........................................................................................................ 75 Collection Filters .............................................................................................................................................. 75 Function ........................................................................................................................................................... 76 Model Base Objects......................................................................................................................................... 77 Rule Parameters .............................................................................................................................................. 77 Assigning Business Rules ............................................................................................................................... 78 Rule Events ..................................................................................................................................................... 78 Assigning Rules to EC Objects ........................................................................................................................ 79 Assigning Rules to MDF Objects ..................................................................................................................... 81 Rule Execution Guidelines............................................................................................................................... 83 Conditions at the Bottom of a Rule .................................................................................................................. 84 Number Low in a Rule ..................................................................................................................................... 85 Create an error message for Company Car object ......................................................................................... 86 Exercise - Create Rule Type............................................................................................................................ 86 Exercise - Create Error Message .................................................................................................................... 86 Exercise - Create Business Rule ..................................................................................................................... 87 Exercise - Attach Business Rule ..................................................................................................................... 87 Lesson Summary ............................................................................................................................................. 87 Unit Wrap-Up .................................................................................................................................................. 88 © Copyright. All rights reserved. SAP SUCCESSFACTORS META-DATA FRAMEWORK (MDF) FOUNDATIONS (THR99) 6 About this Handbook This handbook is intended to complement the instructor-led presentation of this course, and serve as a source of reference. American English is the standard used in this handbook. The following typographic conventions are also used: Use Example/Visualization Demonstration by Instructor A hint or advanced detail is shown or clarified by the instructor – please indicate reaching any of these points to the instructor Warning or Caution A word of caution – generally used to point out limitations or actions with potential negative impact that need to be considered consciously Hint A hint, tip or additional detail that helps increate performance of the solution or help improve understanding of the solution Additional information An indicator for pointing to additional information or technique beyond the scope of the exercise but of potential interest to the participant Discussion/Group Exercise Used to indicate that collaboration is required to conclude a given exercise. Collaboration can be a discussion or a virtual collaboration. User Interface Text Solution or SAP Specific term Find the Flavor Gallery button E.g. Flavors are transaction specific screen personalization created and rendered using SAP Screen Personas. © Copyright. All rights reserved. SAP SUCCESSFACTORS META-DATA FRAMEWORK (MDF) FOUNDATIONS (THR99) 7 Course Introduction Overview The MDF is a UI-based configuration and extension framework that provides creation, modification, maintenance, and deletion of custom objects (called Metadata Objects) within the SAP SuccessFactors HCM suite. It replaces XML-based configuration and the need to import Master Data via CSV/Excel files. This course bundle will introduce you to MDF and provide you with the foundation required to begin using MDF when configuring the SAP SuccessFactors HCM suite. Certain features covered in this guide may not be enabled in your company’s environment. If you see screenshots in this guide that do not match your company’s configuration, please skip the feature/lesson. Target Audience Application Consultant The course is intended primarily for implementation consultants, specifically, Technical Consultants, Functional Consultants, and Partners. Customers and Administrators can also benefit from an understanding of the implementation that is required. Some screenshots and certain features covered in this guide may not be enabled in your company’s environment. Please note that major configuration changes will need to go through Professional Services, as System Administrators do not have access to enable certain features. Course Objectives Upon completion of this course, you will be able to: Describe Metadata Framework (MDF) Describe the different MDF Components Describe MDF’s role in Employee Central’s Extensibility Enable MDF Define Objects and Fields Define Object Associations Explain of MDF Integrates with Other Modules Configure Workflow for a Generic Object Set Up MDF and RBP Define the OData API Explain the OData APIs Importance List tasks that can be completed with the OData API © Copyright. All rights reserved. SAP SUCCESSFACTORS META-DATA FRAMEWORK (MDF) FOUNDATIONS (THR99) 8 Define what data can be accessed in SAP SuccessFactors using OData Configure the OData API Define the future of OData API at SAP SuccessFactors Explain the relationship between MDF, Rules Engine, and SAP SuccessFactors reporting tools List ODS Reporting Features supported by rules Define Job Profile Builder Explain how MDF is used in Job Profile Builder Explain how MDF can be used to build customer and partner extensions Recall the typical use cases of Rules Engine from a business perspective Describe how to configure Rules Engine Set Up or Create base objects for rules Explain how to create rules Explain when rules are triggered Perform the steps related to assigning rules to HRIS elements and field events Describe how to improve the performance of rules SAP SuccessFactors Community Customer Community is your one-stop shop for support, quick answers, product training and quarterly release updates. You may also post ideas for enhancements on productspecific Q&A boards, and "Kudo" other ideas that you like. Enhancement ideas with the most kudos often become part of the product roadmap for future releases. https://community.successfactors.com/ Additional Resources For more information about SAP SuccessFactors, refer to these resources: Main Website SAP SuccessFactors Process Library Training and Certification Shop SAP SuccessFactors HCM Suite Help Portal http://www.SuccessFactors.com https://community.successfactors.com/t5/SA P-SuccessFactors-Process/ctp/ProcessLibrary https://training.sap.com/shop/learninghub http://help.sap.com/cloud4hr © Copyright. All rights reserved. SAP SUCCESSFACTORS META-DATA FRAMEWORK (MDF) FOUNDATIONS (THR99) 9 Unit 1 - Metadata Framework (MDF) Feature Overview Unit Objectives This unit contains seven lessons: Lesson 1-1 - MDF – What Is It and How Can it be Used? Lesson 1-2 - MDF Object Configuration Lesson 1-3 - MDF and Workflows Lesson 1-4 - Metadata Framework OData API Lesson 1-5 - Metadata Framework and SAP SuccessFactors Reporting Tools Lesson 1-6 - Metadata Framework Job Profile Builder and Skills Management Lesson 1-7 - Metadata Framework Extension Platform Upon completing this unit, you will be able to: Describe Metadata Framework (MDF) Describe the different MDF Components Describe MDF’s role in Employee Central’s Extensibility Enable MDF Define Objects and Fields Define Object Associations Explain of MDF Integrates with Other Modules Configure Workflow for a Generic Object Set Up MDF and RBP Define the OData API Explain the OData APIs Importance List tasks that can be completed with the OData API Define what data can be accessed in SAP SuccessFactors using OData Configure the OData API Define the future of OData API at SAP SuccessFactors Explain the relationship between MDF, Rules Engine, and SAP SuccessFactors reporting tools List ODS Reporting Features supported by rules Define Job Profile Builder Explain how MDF is used in Job Profile Builder Explain how MDF can be used to build customer and partner extensions © Copyright. All rights reserved. SAP SUCCESSFACTORS META-DATA FRAMEWORK (MDF) FOUNDATIONS (THR99) 10 Lesson 1-1 - MDF – What Is It and How Can it be Used? Lesson Objectives After completing this lesson, you will be able to: Describe Metadata Framework (MDF) Describe the various MDF Components Describe the role of MDF in SAP SuccessFactors Extensibility MDF – Overview Meta Data Framework (MDF) is a UI-based configuration and extension framework that provides creation, modification, maintenance, and deletion of custom objects (called Metadata Objects or Generic Objects) within the SAP SuccessFactors HCM suite. MDF replaces XML-based configuration that can only be viewed and edited by those with Provisioning Access. All of the tools used to manage MDF Objects are within the Admin Center of the SAP SuccessFactors HCM suite. Using MDF, you can easily extend existing Employee Central (EC) entities and build EC customer extensions for partners and customers. MDF allows you to customize customer objects and related application logic as needed to meet your client's needs. SAP SuccessFactors internal application teams (such as Position Management, Time Off, JDM 2.0) use MDF to build their applications end-to-end. With MDF, you can create and manage database object definitions, object relationships, and object hierarchy. MDF is tightly integrated with workflow, rules engine, and reporting. MDF also integrates with role-based permissions (RBP) — the recommended security layer for SAP SuccessFactors HCM Suite. This means you can leverage RBP roles to secure your customer's objects and data. MDF objects are exposed through Common Object OData REST APIs as well as through reports in the ODS inform reporting tools. Note: Employee Central Customer accounts will have a limit to how many custom MDF objects can be created for their environment. This limit is based on the license bought and can be increased by purchasing the HANA Cloud Platform edition. © Copyright. All rights reserved. SAP SUCCESSFACTORS META-DATA FRAMEWORK (MDF) FOUNDATIONS (THR99) 11 MDF Components There are several different layers that a MDF or Generic Object (GO) can possess. The most basic layer is the Object Definition. This is where all of the configuration decisions for an object is made and where the object is “built”. Object behavior, fields, associations and security are all set within the object definition. Once the object definition is built, you can then add business logic to the object. This is done using Business Rules. Business Rules can be used to default data, set values based on data chosen, raise informational or error messages, and trigger actions to occur when data records are saved or deleted. Once the object is built and business logic is integrated, you can start to import, create and manage data related to that object. Finally you have the ability to create different “views” or UI’s for your object. Within the Configuration UI, you can change the layout of the object, add or remove fields, update labels, and add text or hyperlinks to the object view. Each of these layers will be discussed in further detail in the upcoming lessons. © Copyright. All rights reserved. SAP SUCCESSFACTORS META-DATA FRAMEWORK (MDF) FOUNDATIONS (THR99) 12 Getting Started Before Meta Data Framework can be used, it must be enabled in Provisioning. Steps to enable MDF in Provisioning Once logged into Provisioning, click on the Company Name and choose Company Settings. Within Company Settings, select the Enable Generic Objects checkbox. This can be found in the Employee Central sub-section. Scroll up to the top of the screen and select Save Feature. If you want to turn on other related features, such as workflows, you must also check the following boxes in provisioning. © Copyright. All rights reserved. SAP SUCCESSFACTORS META-DATA FRAMEWORK (MDF) FOUNDATIONS (THR99) 13 Note: These features are only available if the customer has Employee Central. Workflow Enable the Attachment Manager Employee Central Foundation Objects Effective Dated Data Platform Employee Central V2 Enable Business Rules for Workflow Derivation Role Based Permissions (RBP) Access to tools and areas within a customer instance are controlled by Role Based Permissions (RBP). There is a section within RBP that directly relates to MDF objects. Turn on RBP access to MDF Objects From Admin Center navigate to Set User Permissions → Manage Permission Roles Choose an existing or create a new Permission Role to grant access to MDF Objects Click on Permission… Navigate to the Metadata Framework section and choose all permissions you would like to grant to that role © Copyright. All rights reserved. SAP SUCCESSFACTORS META-DATA FRAMEWORK (MDF) FOUNDATIONS (THR99) 14 There are other RBP sections that allow a user to work with objects that have already been built in MDF. The following sections contain access to MDF objects: Miscellaneous Permissions MDF Foundation Objects SAP System Configuration Manage Position Manage Time Off Manage Benefits These sections grant access to tools that manage data, as well as the ability to view, edit, import and export data for specific MDF objects. They can also grant field level overrides, which will be discussed in a later lesson. © Copyright. All rights reserved. SAP SUCCESSFACTORS META-DATA FRAMEWORK (MDF) FOUNDATIONS (THR99) 15 Lesson Summary In this lesson, you have learned to: Describe Metadata Framework (MDF) Describe the various MDF Components Describe the role of MDF in SAP SuccessFactors Extensibility © Copyright. All rights reserved. SAP SUCCESSFACTORS META-DATA FRAMEWORK (MDF) FOUNDATIONS (THR99) 16 Lesson 1-2 - MDF Object Configuration Lesson Objectives After completing this lesson, you will be able to: Enable MDF Define MDF Objects and Fields Define MDF Object Associations MDF Object Configuration There are several areas of a MDF or Generic Object (GO) that must be configured before data can be stored and managed. In the following lesson, we will discuss the different areas of a GO and the decisions that can be made within them. To build or edit an existing Object Definition, you must use the tool Configure Object Definitions. To get started, click on Create New: Object Definition. © Copyright. All rights reserved. SAP SUCCESSFACTORS META-DATA FRAMEWORK (MDF) FOUNDATIONS (THR99) 17 Once a new object definition is opened, the different areas that can be configured are displayed. © Copyright. All rights reserved. SAP SUCCESSFACTORS META-DATA FRAMEWORK (MDF) FOUNDATIONS (THR99) 18 Object Settings This section determines the overall behavior of the GO. Below is an explanation of each of the fields in this section, as well as the options available for each field. © Copyright. All rights reserved. SAP SUCCESSFACTORS META-DATA FRAMEWORK (MDF) FOUNDATIONS (THR99) Code: The unique identifier, or ID, for the Object. Any custom object created must start with “cust_”. This will be prompted by the system Effective Dating: Effective Dating is the ability to see the history of data stored for an object. Options: Options: Not Visible: This is the default value Editable Read Only Status: If set to Inactive, the object instance or record is not used and not visible anywhere in the system, including the rule engine, configurable UI designer, and role-based permissions. Options: None: No history is stored. Whenever a value in a record is changed, it overwrites previous information. Basic: Effective dating that allows up to one dated entry can be added per day, per record. Multiple Changes per Day: Effective dating that allows multiple entries per date. From Parent: This is used for child objects so that they will match the parent’s effective dating. Parent/Child relationships between objects will be discussed in the association section. API Visibility: The MDF OData API exposes metadata for the object definition, field definition, rules, and conditions for an entity. This makes is easier for other modules, for example, Time Off, to consume the data. 19 Active Inactive: An object cannot be deactivated if data exists or if it is referenced by an active association. If an object that is referenced in a rule is deactivated, that rule is invalidated. Data cannot be imported or exported for an inactive object. MDF Version History: It is essential to have a snapshot of data on any given date. This is particularly important in integrations such as Employee Central to payroll, or Employee Central to user management. When a record is updated, corrected, or deleted in MDF, you can track the previous values. When a record is deleted, it is marked as deleted and the date of deletion is recorded. © Copyright. All rights reserved. SAP SUCCESSFACTORS META-DATA FRAMEWORK (MDF) FOUNDATIONS (THR99) Options: Options: No Selection: If you select this, then the system will behave as if you selected V1.1. V1.0 V1.1 Subject User Field: Defines the subject of the object, which is used to determine workflow routing. Typically this is automatically determined by the system. Workflow Routing: It is possible to tie a workflow, or approval process, directly to a GO. Whenever data is created, edited, or deleted for this GO, the workflow chosen will trigger. No: If this option is selected, or no selection is made, history records are not stored for any operation. Delete History: only the history records from the delete operation of that object type are available in internal history or audit tables. The data deleted by a full purge import and translatable fields are also included. Complete History: the history records from the create/insert/update/delete operation of that object type are available in internal history or audit tables. The data deleted by a full purge import and translatable fields are also included. defaultScreen: As mentioned, you can create multiple “views” or Configuration UIs for a GO. If you would like one of the Configuration UIs created to display on the Manage Data or Workflow Approval screens, you must assign the Configuration UI here. Leaving this blank will display the GO in the original format Label: This is the name of the object isPII: Set when there is private data or Personally Identifiable Information (PII). If this is set to yes, any data in fields with PII will be displayed as asterisks (*) API Sub Version: This field controls whether the technical fields in the ODATA API are exposed to the customers or not. 20 Note: You must have Employee Central Foundation Objects enabled in your instance to use workflow Pending Data: If you choose to connect a workflow to the object, it is recommended you set this field to Yes Options: Yes: Approval will be required before any data created for this GO is active in the system © Copyright. All rights reserved. SAP SUCCESSFACTORS META-DATA FRAMEWORK (MDF) FOUNDATIONS (THR99) 21 No: Data updates can be made without completing the approval process. Todo Category: Used when Pending Data is set to Yes. This determines what subsection of the “To Do” list workflow approvers will see notifications around this GO on the Home Page. Fields The Fields section defines the form that you will use to build/import your data for this GO. Below is an explanation of each of the areas, and the choices that can be made within them. Name: This is the identifier for the field. The name should not contain any spaces and must be unique within the current object definition. Any custom fields added will automatically have “cust_” in front of the name. This cannot be removed. The system automatically supplies certain field names depending on the choices made within the Object Settings section. externalCode: This serves as a placeholder for the unique identifier or ID for each record of data stored for this GO. This field cannot be removed from the Object externalName: This serves as a placeholder for the name or label for each record of data stored for this GO. effectiveStartDate: This field is automatically generated when Effective Dating is set to Basic or Multiple Changes per Day. When history is enabled for an object, a start date must be associated with each new entry of data. Maximum Length: For String fields, you can restrict the amount of characters that can be entered. The default length for fields is 255 characters, and the maximum length is 4000. Data Type: This determines the behavior and values supplied for a field. There are several different Data Types to choose from. © Copyright. All rights reserved. SAP SUCCESSFACTORS META-DATA FRAMEWORK (MDF) FOUNDATIONS (THR99) 22 String: Open text fields. Number: Stores positive integers only (acceptable characters are 0-9). Auto Number: The system will automatically generate a number for this field. This field should always be set as read-only. A business rule can be created to set parameters around the number generated. Decimal: Stores decimal numbers. The amount of zeros beyond the decimal can be set in the details section. The display format of this field will be determined based on the logged-in user’s chosen locale. Boolean: Provides Yes or No as the allowed values. Date: Stores a date (day, month year) from a date picker. Display format is determined based on locale of logged in user. Picklist: Connects a MDF Picklist to the field. MDF Picklists will be discussed in later lesson. Translatable: String field where the value entered can be translated into multiple languages. Data Source: This field must not be used by end users. It can be used in Java object definitions to specify a class implementing data source interface to provide a set of custom code defined autocomplete values. Generic Object: Connects data stored in another MDF/GO to the field. Foundation Object: Connects data stored in an Employee Central Foundation Object that is still managed through XML. User: References any active or inactive user in the system. Any data stored for that user can be accessed within the GO. DateTime: Along with the date picker, this field allows hours, minutes, seconds to be stored. Time: Stores hours, minutes, seconds. Attachment: Allows external documents to be added to the data. Details Additional decisions around field behavior can be defined in the Details section. Many values are specific to certain Data Types. Below is an explanation of each of the areas, and the choices that can be made within them. © Copyright. All rights reserved. SAP SUCCESSFACTORS META-DATA FRAMEWORK (MDF) FOUNDATIONS (THR99) 23 © Copyright. All rights reserved. SAP SUCCESSFACTORS META-DATA FRAMEWORK (MDF) FOUNDATIONS (THR99) 24 The first four options Name, Database Field Name, Maximum Length, Data Type are already determined in the main Fields section. Valid Values Source: This section is necessary for the Picklist, Generic Object and Foundation Object Data Types. In order to connect a certain object or picklist to a field, the Code or elementID of the object must be placed in this area. Upon save, the system will validate this value to make sure it is correct. Hide Old Value: If the GO is Effective Dated, values that are altered throughout history have a strikethrough in the old value. If this is set to Yes, then the old value is no longer displayed. Decimal Precision: This is used for the Decimal Data Type. This specifies how many digits past the decimal point should be displayed. Include Inactive Users: This is used for the User Data Type. If value is set to Yes, then inactive users are included in the results. Default value is No. UI Field Renderer: Use this field to define the label that appears in dropdown menus when selecting a Picklist or Generic Object value in Manage Data. If this field is defined, external code is hidden in these menus. Transient: Set to Yes to make the field transient. Values of transient field are not stored in the database, but are populated at runtime in the user interface, based on rules or associations. Default value is No. Help Text: This is an open text translatable field where instructions on filling out the field can be provided. Private or Sensitive Information: If you set this to Yes, then the value saved on that field will be visible as '***'. For example, a password field for any login page. Default value is No. Show Trailing Zeros: This is used for the Decimal Data Type. If set to Yes, it will show trailing zeros for decimal precision. Default Value: You can set the default value that displays for that field. Commonly used with String Data Type. Hide Seconds: Used for the DateTime and Time Data Types. Removes seconds from the Time Stamp if set to Yes. Required: If set to Yes, the field is mandatory and data must be entered for this value before a record can be saved. Visibility: Determines how the field is displayed. Options Editable: Field values can be viewed and edited. Read Only: Field values can be viewed, but are not able to be altered or input. Not Visible: Field and Field label cannot be seen when entering data for the object. Data is still stored in the background and can be exported out of the system. © Copyright. All rights reserved. SAP SUCCESSFACTORS META-DATA FRAMEWORK (MDF) FOUNDATIONS (THR99) 25 Status: Field can be set as Active or Inactive. If field is Inactive, all details are preserved but field is not available in the system. Label: Translatable header or label for field. Associations Associations define a hierarchical relationship between two objects. The behavior of the objects will depend on the type of association you choose. For any type of association, the relationship can be One to Many or One to One. For example, a business unit consists of several departments so you create an association of one business unit to many departments; this is a One to Many relationship. A location can only have one geozone associated with it; this is a One to One association. Valid When Associations allow data for objects to be connected, but leaves the objects as separate entities. This is often used in Foundation Object relationships to create filtering capabilities between records. For Valid When associations, the associated object has its own lifecycle and exists even without the object that is being defined. For example, a legal entity object can have a valid-when relationship with a location object. Using that association, when you add a legal entity, you are shown the available locations that are active and effective on the current entity’s start date. If the current entity is noneffective-dated, the results for today's date (according to the system) are shown. Composite Associations create a parent-child relationship between two objects. For this association type, the entity being associated is a child entity that does not exist outside the parent object that you are defining. If an object is referred as a composite child in an object, it cannot be used as a top-level object. Records cannot be created separately for the child object. © Copyright. All rights reserved. SAP SUCCESSFACTORS META-DATA FRAMEWORK (MDF) FOUNDATIONS (THR99) 26 For example, a location can have a composite association with an address object or a picklist with picklist values. An address object cannot exist without a location object. When you enter location details, you see a data grid with address fields. If you want to make a composite association, the child object must have effective dating set as From Parent. Join by Column association allows you to set one field of the parent object definition as the source object column and one field of the child object definition as the destination object column, then join-by-column association will make the value of these two object columns reference each other. For example, you have created two entities, Person, which is non-effective-dated, and PersonInfo, which is effective-dated. Person is the parent object and the externalCode column is used as the source. PersonInfo is the child object and, using join-by-column, its externalCode column refers to the Person object. In this way, these two objects always share the same externalCode. Association Section © Copyright. All rights reserved. SAP SUCCESSFACTORS META-DATA FRAMEWORK (MDF) FOUNDATIONS (THR99) Name: Name or ID of the Association. This is how the association is referred elsewhere. Multiplicity: As mentioned, this can be set as One to One or One to Many. Destination Object: This has different meanings depending on the type of association being completed. In Composite associations, the Destination Object is the child object, and the association itself is built on the parent. With Valid When associations, the Destination Object is the object doing the filtering, so it is higher on the hierarchical structure. The object being filtered is the object where the association is being built. 27 Example: If the Business Unit chosen filters which Divisions you are able to choose from, then the association is built on the Division object, and the Destination Object is Business Unit. Type: Valid When, Composite, and Join by Column. Details Section Destination Object Column: The field name of the child object to which the object should be mapped. This is used for Join by Column Associations. Source Object Column: The field name of the parent object to which the object should be mapped. This is used for Join by Column Associations. isTransient: Set to Yes to make the field transient. Values of transient field are not stored in the database, but are populated at runtime in the user interface, based on rules or associations. uiAssociationRenderer: Use this field to define the layout of Composite Association in a data grid layout for repeating forms. Required: Determines whether the association is required for object definition. If required, at least one record for the association must exist when an instance is created of the object that you are defining. Visibility: Determines whether the association is visible. This field can have the following values: Editable: User can add and delete data for this association. Read Only: User can only view records of this association. A user cannot add, delete, or edit any association data. Not Visible: User cannot view this association. Status: Active: Visible and available in the instance. © Copyright. All rights reserved. SAP SUCCESSFACTORS META-DATA FRAMEWORK (MDF) FOUNDATIONS (THR99) 28 Inactive: Associations are not available in the system. You cannot use them in import, UI, OData, rules, and so on. Label: Label for this association. This will display on the UI. If this field is not filled out, the Name automatically becomes the label. Searchable Fields You can define fields that can be used to search for an MDF object. Search fields can be used in the search panel on the Manage Data tool to search for objects. Depending on how objects are used, searchable fields can be used in other areas, such as Organizational Charts and Employee Files. In the field, enter the names of the fields and/or association that you want to make searchable. You can add more fields and associations by pressing Enter after each field name. Business Key Fields A business key for an MDF object is a set of fields of the MDF object that can be used as a unique key. In the field, enter the business key fields. You can delete or add more fields by clicking the corresponding icon. RBP Security Setting up security allows you to control which users can view, edit, or import/export data in an object or field. With MDF you can set up security at the more granular field level. For objects and fields, you can control access based on roles within the system. Optionally, you can define which field in the object definition is used to determine the target population in role-based permissions. You can specify any user field in the current object definition as the RBP Subject User Field. The value of the specified RBP Subject User Field can then be used to create user-based permission groups in RBP. You can use any field in the current object definition of the type "user" as the RBP Subject User Field. It does not need to be the externalCode. Security Section Secured: This determines whether or not the object uses RBP to set security. If you choose Yes or Custom, then within RBP Permission Roles, you have the ability to override a field’s set visibility and editable capabilities for the GO. If No is chosen, you can still use RBP to grant access to the GO, but the field details cannot be overridden and the GO will be given “as is”. © Copyright. All rights reserved. SAP SUCCESSFACTORS META-DATA FRAMEWORK (MDF) FOUNDATIONS (THR99) 29 Permission Category: This specifies what area of the Permissions section in the RBP Permission Role the object the object can be found. RBP Subject User Field: Specify any user field in the current object definition. The value can then be used to create user-based permission groups in RBP. Business Rules The Rules engine provides an easy to use tool to dynamically configure and manage the customer, country, or scenario specific business logic that needs to occur within GO. Users do not need to be technically savvy to create business rules. The intuitive UI allows users to configure rule conditions that need to be checked in order to trigger the rule actions. These rules can be updated easily to meet the needs of customer’s ever changing business scenarios. Rules are a way to maintain a consistent application logic on the occurrence of an event. They can also be a way to keep a check on data changes (by triggering an approval). Rules can also be used to autofill field data (for example, time zone information can be autofilled based on location information). Rule Categories intializeRules: Initialization rules are triggered as soon as a new record is created for the object. You can use these rules to default field values. validateRules: Validation rules are triggered after a change to an object is submitted but before the change is saved. You can use these rules to validate field values. saveRules: Save rules are triggered when a user tries to save changes to an object record.You can use these rules to check related field values for correctness. For example, a field could become required as a consequence of a save. postSaveRules: Post-save rules are triggered after changes to an object have been saved. These rules are used when you want to send an alert message to the user. They are not used to set a field value. To activate the alert and notification feature, you must associate them with a workflow. deleteRules: Deletion rules are triggered after an object record is deleted. Rule creation and management will be discussed in a later lesson. MDF Picklists Picklists allow you to restrict the values that can be specified for a field. This is very useful for reporting purposes, and also helps users choose the correct value with self-service objects. © Copyright. All rights reserved. SAP SUCCESSFACTORS META-DATA FRAMEWORK (MDF) FOUNDATIONS (THR99) 30 MDF picklists are basic effective-dated picklists that can be used by other MDF objects. MDF Picklists can be cascading picklists as well. Cascading picklists allow you to restrict the value of a field based on a previous selection. It creates a parent-child relationship between two picklists. Consider an example of three picklists with cascading relationships: Country, State, and City. Assuming State can be derived from Country, Country will acts as the parent of State. Likewise, assuming City can be derived from State, State is the parent of City. Steps for creating a new MDF Picklist: From Admin Center, navigate to the Configure Object Definition tool Choose Create New: Picklist © Copyright. All rights reserved. SAP SUCCESSFACTORS META-DATA FRAMEWORK (MDF) FOUNDATIONS (THR99) 31 MDF Picklist Configuration Code: Unique ID for the Picklist you create. You will use this code to connect the picklist to a corresponding field in the GO you configure. The code is used for Valid Values Source. Parent Picklist: If you want your picklist to be a cascading picklist, you would choose the Parent Picklist here (ie State for City). Display Order: You can control how the picklist values are displayed in the drop down menu. Options Alphabetical Numeric None: If you select None, the order you place the values in will be the way it displays. For example, if you had a value, Other, you could have it display last by choosing Display Order: None and moving Other to the bottom of the list of values. Name: This is the Label of the Picklist. Status: Set to Active or Inactive depending on whether you want the picklist to be usable or not. © Copyright. All rights reserved. SAP SUCCESSFACTORS META-DATA FRAMEWORK (MDF) FOUNDATIONS (THR99) 32 Effective Start Date: MDF picklists are basic effective-dated. This means that there can be different sets of picklist values for different start dates. Enter the effective start date for your picklist. The Values section is where the picklist values are populated External Code: ID of the picklist value. This must be unique within the picklist itself and cannot have spaces. Parent Picklist Value: If you are creating a cascading picklist, the parent value must be placed here. For example, if you are creating the value Philadelphia as the city, the state Pennsylvania would be the Parent Picklist Value. Label: This will be the value that displays when opening your picklist. Details: Status: You can make individual picklist values active or inactive. If they are inactive, they will not be displayed and cannot be chosen. Lesson Summary In this lesson, you have learned to: Enable MDF Define MDF Objects and Fields Define MDF Object Associations © Copyright. All rights reserved. SAP SUCCESSFACTORS META-DATA FRAMEWORK (MDF) FOUNDATIONS (THR99) 33 Lesson 1-3 - MDF and Workflows Lesson Objectives After completing this lesson, you will be able to: Explain how MDF integrates with SF HCM Suite Configure Workflow for a Generic Object Set up MDF and RBP MDF and Workflows Workflows are approval processes that can be tied to MDF Objects. They can be added directly to the object (see Object Settings) so that the approval process will trigger whenever data is created, edited or deleted for the Object. You can also use Business Rules to trigger conditional workflows or country-specific workflow configurations. This will use scenario-specific data to determine which workflow to trigger when. A single workflow can be defined and then associated with multiple situations. For example, the workflow might be a manager- or HR administrator-approval for an employee change. Each step of a workflow may have one or more approvers. You can also create multiple workflows to trigger for the same object – just based on different data chosen for the record created. Workflows are configured in the Manage Organization, Pay and Job Structures tool. They can contain Approvers, Contributors and CC Roles. © Copyright. All rights reserved. SAP SUCCESSFACTORS META-DATA FRAMEWORK (MDF) FOUNDATIONS (THR99) 34 Approvers (Step 1): Accept or Reject the particular change requested. You can create as many approvers as needed. Additional steps will become available as soon as Step 1 is filled out. Contributors: Can view the entire transaction and provide commentary, but cannot accept or reject the change. CC Roles: Are only notified after the process is complete, so they are aware the transaction occurred and can complete any steps necessary after the fact. Creating, Importing and Storing Data for GO Creating Records in the Instance Once an Object Definition is completed, data can be created around the GO. The Manage Data tool is used to manually create, edit, and delete data records for all MDF Objects created directly within the instance. Search allows you to work with existing records that have been created or imported into the system. Create New allows you to create new data records based on the configuration decisions made in the Object Definition. Importing and Exporting Data The Import and Export Data tool within Admin Center is responsible for the importing and exporting of all data related to GO. There are several actions that can be taken within this tool. © Copyright. All rights reserved. SAP SUCCESSFACTORS META-DATA FRAMEWORK (MDF) FOUNDATIONS (THR99) 35 Download Template Download Template is the first step for importing data in for a GO. This allows you to download a csv or zip file that includes all of the custom configurations you created for a GO. You must fill in the template before you can import data into the system. Select Generic Object: This is where you choose the GO for which you plan to import data. Include Dependencies: This generates a zip file of all of the objects that connect to the main GO chosen. This is especially important if there are any associations between the main GO and other objects. An import sequence csv file is also generated and added to the zip file containing information such as the name of the file and the sequence in which the CSV files are to be imported. Include Immutable IDs: If you choose Yes, this means that the entity ID and the record ID are exported. This is defaulted as No. Exclude reference objects: If you choose Yes, this means that the reference objects are not exported in the .zip file. This is defaulted as No. © Copyright. All rights reserved. SAP SUCCESSFACTORS META-DATA FRAMEWORK (MDF) FOUNDATIONS (THR99) 36 Import Data Once the Template is downloaded and filled out appropriately, it can be imported into the instance. You can choose to import one file (CSV File) a grouping of related files (Zip File) or you can download pre-filled templates from the Success Store. Once you determine what type of file you would like to import, choose the corresponding Generic Object and Browse for the file. You must specify how the file is encoded. Most often Western European (Windows/ISO) is used. There are two import modes you can choose from in Purge Type. The first type is Full Purge. In this mode, the data in the import file replaces matching records in the system. This mode only purges records included in the import file. You lose all history related to those records. The second mode is Incremental Load. This mode only loads changes into the system. Note: Full Purge vs Incremental Load are only relevant if the Object has an Effective Dating of Basic or Multiple Changes Per Day. In the MDF import, you can suppress duplicate inserts and unchanged updates, in incremental mode. This can help eliminate millions of redundant user data while improving performance. For example, in an effective-dated entity import, if the newly inserted time record is identical to its former dated record (where both field values and composite/validwhen relationships), no new record is generated by the import. © Copyright. All rights reserved. SAP SUCCESSFACTORS META-DATA FRAMEWORK (MDF) FOUNDATIONS (THR99) 37 Export Data GO’s are unique in the fact that data stored for a GO can be directly exported from the system. For objects still managed through XML, an Ad Hoc Report must be run to export data. Once the data is exported, you can make any necessary edits and import it back in using the same Import and Export tool. To export data, simply select the Generic Object to export. Similar to when you download a template, you can determine if you want to include dependencies, immutable IDs, and reference objects. To export data that already exists in the instance, you must choose Yes for Select all data records. Exercise - Create a New MDF Picklist for Condition Before creating the Company Car Object, you must create a picklist that captures the condition of the car. The following values should be included in the picklist: New Used 1. Go to Admin Center → Company Settings → Configure Object Definitions 2. Select Create New → Picklist 3. To create your picklist, use the information provided in the tables below Picklist Code Display Order Name Value condition_car Alphabetical Condition © Copyright. All rights reserved. SAP SUCCESSFACTORS META-DATA FRAMEWORK (MDF) FOUNDATIONS (THR99) Effective Start Date 38 01/01/1900 Values External Code N U Label New Used 4. After saving your picklist, verify that it looks like the figure below: Exercise - Create a New MDF Picklist for Make Before creating the Company Car Object, you must create a picklist that captures the make of the car. The following values should be included in the picklist: Audi Honda BMW Toyota Ford Jeep 1. Go to Admin Center → Company Settings → Configure Object Definitions 2. Select Create New → Picklist 3. To create your picklist, use the information provided in the tables below © Copyright. All rights reserved. SAP SUCCESSFACTORS META-DATA FRAMEWORK (MDF) FOUNDATIONS (THR99) Picklist Code Display Order Name Effective Start Date 39 Value car_make Alphabetical Make 01/01/1900 Values External Code AU HD BMW TY FD JP Label Audi Honda BMW Toyota Ford Jeep Exercise - Create a New Company Car Object Now that the picklists have been created, you can now create a GO to capture the details around the company car. It must include the following fields: Employee Name Effective as of Make Model Year Purchase Date Condition 1. Go to Admin Center → Company Settings → Configure Object Definitions. 2. Click Create New → Object Definition. 3. To create your Company Car Object, use the information provided in the tables below. Object Settings Field Code Effective Dating Label Workflow Routing Pending Data Todo Category Value comp_car Basic Company Car No Selection No No Selection © Copyright. All rights reserved. SAP SUCCESSFACTORS META-DATA FRAMEWORK (MDF) FOUNDATIONS (THR99) 40 Fields Field Name externalCode externalName effectiveStartDate make (“cust_” will automatically be added to all custom field names and cannot be deleted) model year purchase_date cond Field Details Data Valid Values Required Label Type Source User Yes Employee Name Use the Trash Can icon next to this field to delete it. Date Yes Effective as of: Picklist car_make Yes Make String Number Date Picklist Yes Yes Yes condition_car Yes Model Year Date Purchased/Leased Condition 4. Save your Generic Object. 5. Test your new object by navigating to Admin Center Employee Files Manage Data Create New: Company Car Lesson Summary In this lesson, you have learned to: Explain how MDF integrates with SF HCM Suite Configure Workflow for a Generic Object Set up MDF and RBP © Copyright. All rights reserved. SAP SUCCESSFACTORS META-DATA FRAMEWORK (MDF) FOUNDATIONS (THR99) 41 Lesson 1-4 - Metadata Framework OData API Lesson Objectives After completing this lesson, you will be able to: Define the OData API Explain the importance of the OData API List tasks that can be completed with the OData API Define what data can be accessed using OData Configure the OData API Define the future of the OData API OData definition The OData API is SAP SuccessFactors new API strategy. OData is a standardized protocol for data APIs. OData is REST based. OData has metadata to represent the API operations and the data schema: Data schema means the entities, relationships between entities and fields. Learn more at http://www.odata.org A standards based protocol eases API support, increases adoption. OData is an SAP Standard. Powerful query features to pull data from multiple entities (think SQL JOINS). Data can be returned in nested data structures, with choice of XML or JSON formats. Critical to HANA Cloud Extensibility. Since OData is considered an industry standard, Customers don’t have to learn proprietary features of SFAPI like SFQL and our custom metadata. What Can You Do With the OData API? 1. 2. 3. 4. 5. Query to extract data from the system Create (insert) new data in the system Update existing data in the system Delete data from the system Operate on multiple related entities in a single operation Important: the “metadata” operation allows you to view the data schema: © Copyright. All rights reserved. SAP SUCCESSFACTORS META-DATA FRAMEWORK (MDF) FOUNDATIONS (THR99) 42 What are the entities in a customer’s configuration? What are the relationships between these entities? What are the fields and data types of these entities? Lots of other metadata features like field labels, field behaviors, etc. All the MDF Entities will be automatically exposed through the OData APIs. Using the MDF OData APIs users can access the MDF Entities, create, upsert and delete them. Admin users can also create and manage MDF Object Definitions, Picklists through the MDF OData APIs. MDF OData APIs can be used to integrate with third party systems. What Is the Future of the OData API? Plans for OData APIs to all modules in the suite: Will open up our integration capabilities Will launch our extensibility capabilities Critical to a vibrant partner ecosystem Powerful competitive feature Lesson Summary In this lesson, you have learned about the features of OData, such as: Standard protocol Increased adoption Easier API Better for extensibility Alignment with SAP Standards © Copyright. All rights reserved. SAP SUCCESSFACTORS META-DATA FRAMEWORK (MDF) FOUNDATIONS (THR99) 43 Lesson 1-5 - Metadata Framework and SAP SuccessFactors Reporting Tools Lesson Objectives After completing this lesson, you will be able to: Explain the relationship between MDF, Rule Engine, and SAP SuccessFactors Reporting tools List ODS Reporting features supported by rules High Level Architecture © Copyright. All rights reserved. SAP SUCCESSFACTORS META-DATA FRAMEWORK (MDF) FOUNDATIONS (THR99) 44 SAP SuccessFactors Reporting Tools All fields of ALL EC tables are available for ODS reporting Including Custom fields No coding No need to know the data model, just drag-and-drop Search function for fields Field labels are taken from customizing (aka “succession data model”) All active Custom fields are available Advanced mode for individual joins Powerful handling of effective dating Pivot Queries for simple OLAP reporting Report designer Embedding queries into page © Copyright. All rights reserved. SAP SUCCESSFACTORS META-DATA FRAMEWORK (MDF) FOUNDATIONS (THR99) 45 MDF Data Replication 1. The MDF Data is replicated through Oracle’s Golden Gate Replication Service to the ODS Data Warehouse 2. The ODS Inform system then creates ODS Cubes on top of that Data Warehouse 3. You can then create reports using the MDF Entities can use the ODS Report Designer 4. Using the ODS Report Designer you can drag MDF object or object structures, set suitable joins, where clauses – actually build a Report Query on the fly 5. You can then run the report, preview it and save it for future use MDF Data in ODS ODS is the tool for flexible and easy-to-use reporting in EC. All tables / all fields available out of the box (that is, MDF objects, custom fields) Query definition requires no knowledge of data model Advanced mode for handling of complex cases Powerful features for handling of Effective Dating Note: Your data model will be exposed to customers (that is, key users developing custom reports) Lesson Summary In this lesson, you have learned to: Explain the relationship between MDF, Rule Engine, and SAP SuccessFactors Reporting tools List ODS Reporting features supported by rules © Copyright. All rights reserved. SAP SUCCESSFACTORS META-DATA FRAMEWORK (MDF) FOUNDATIONS (THR99) 46 Lesson 1-6 - Metadata Framework Job Profile Builder and Skills Management Lesson Objectives After completing this lesson, you will be able to: Define Job Profile Builder Explain how MDF is used in Job Profile Builder What is Job Profile Builder? At its core Job Profile Builder is a replacement for existing families and roles in addition to a platform level replacement for JDM 1.0. However, if fully leveraged Job Profile Builder and Skills Management can help answer the question: “Do I have the right person in the right job at the right time?” Why Did We Use MDF? Having the goal in mind, how did MDF help the Job Profile Builder Team achieve it? MDF provided a quick solution to a complex problem. It also offered suite-wide integration and adoption. MDF has the future in mind. With MDF we have been able to leverage a lot of the Development Tools and features out of the box at no extra cost. Lesson Summary In this lesson, you have learned to: Define Job Profile Builder Explain how MDF is used in Job Profile Builder © Copyright. All rights reserved. SAP SUCCESSFACTORS META-DATA FRAMEWORK (MDF) FOUNDATIONS (THR99) 47 Lesson 1-7 - Metadata Framework Extension Platform Lesson Objectives After completing this lesson, you will be able to: Explain how MDF can be used to build customer and partner extensions SAP Cloud Computing Stack SAP Cloud Computing Stack = IaaS + PaaS + SaaS SAP has been taking giant steps into the Cloud. We have been making great progress on all the 3 Cloud Fronts. Our SAP SuccessFactors HCM Suite is a complete SaaS offering. We provide different modules like Employee Central, Recruiting, Talent etc. as a Subscription service. Customers get the benefits of the cloud like: No upfront costs for infrastructure or licensing fees No need for a big IT team to manage on premise applications Free upgrades to software every 3 months that are managed by SAP SuccessFactors In addition to that SAP and SAP SuccessFactors are offering HANA Cloud Platform and MDF Platform as a Service. Customers and Partners can leverage MDF and HCP as the Extensibility Platforms to build and deploy their Custom Application Extensions. HCP and MDF provide a set of tools and services designed to make configuring, creating and deploying Custom application extensions quick and efficient. © Copyright. All rights reserved. SAP SUCCESSFACTORS META-DATA FRAMEWORK (MDF) FOUNDATIONS (THR99) 48 Last but not the least SAP offers SAP HANA One as Infrastructure as a Service. SAP HANA One is the hardware and software that powers it all - servers, storage and networks. How is MDF different than Standalone Development Stand-alone – Separate application and development environment that leads to: 1. High cost of integrating extensions with the core application 2. Recoding basic attributes of the core application required by extensions (security, reporting, UI etc.) 3. Longer time to implement extensions 4. Data inconsistency and data replication issues 5. Hard to maintain extensions down the road © Copyright. All rights reserved. SAP SUCCESSFACTORS META-DATA FRAMEWORK (MDF) FOUNDATIONS (THR99) 49 MDF Extensibility Features MDF: Simplicity and Productivity to Extend SAP SuccessFactors MDF provides a simple way to extend SAP SuccessFactors With MDF you quickly reuse the same configurable components as SAP SuccessFactors delivered applications like the UI, security, workflow, reporting/analytics, APIs, auditing. You do not write any coding to leverage these components. You control how you want to implement your use cases. You can build the entire suite of new applications to satisfy your specific needs. There is a clear demarcation to ensure that SAP SuccessFactors delivered functionality does not overwrite customer extensions. MDF provides easy to use configuration tools like the Object Definition, Rules and workflow UIs to build custom extensions. With MDF you are building extensions through configuration and not code. That ensures that you have to test less functionality as you implement your extensions. MDF extensions are tightly coupled with EC entities which ensures that we eliminate data inconsistency and redundancy issues. SAP SuccessFactors uses MDF internally for delivering their own applications. Hence the customers can rely on MDF without having to worry that they will lose the support for their extensions. SAP SuccessFactors will ensure that incremental upgrades will not disrupt any of the customer extensions. Since MDF Customer extensions are tightly coupled with EC entities you avoid the high cost of integration. There is no upgrade impact and that means no maintenance cost. © Copyright. All rights reserved. SAP SUCCESSFACTORS META-DATA FRAMEWORK (MDF) FOUNDATIONS (THR99) 50 MDF Complete Extensibility in the Cloud Complete Cloud Platform as a Service Java based development and hosting environment allows customer to create any application with the use of a Development Team Metadata Framework Extends applications with customer objects, custom UI’s, Rules Engine for business Logic, etc. Also used internally by SAP SuccessFactors Development. No coding required. Configurable Applications Long standing SAP SuccessFactors Extensibility. Heavily used by thousands of customers. Extend delivered objects by configuring labels, required fields, picklists, and adding customer fields. © Copyright. All rights reserved. SAP SUCCESSFACTORS META-DATA FRAMEWORK (MDF) FOUNDATIONS (THR99) 51 Extending Employee Central and SAP HANA Cloud MDF is used as a platform internally by Application teams like EC to build their functionality. MDF is also integrated with the HANA Cloud Platform. That makes it easier for Customers and Partners to extend EC applications on both MDF as well as HCP. Using MDF, customers can: Extend using configuration and rules engine UI Host extensions within EC Use delivered objects to create extensions and logic Build simple extensions of EC that do not require coding Automatically generates simple UIs to configure and manage objects Extensions are tightly coupled with EC entities, no duplication of data Included with both EC and SAP HANA Cloud Platform Using HCP, customers can: Develop using JVM based integrated development env. Host apps within SAP HANA Cloud Platform Custom code objects and logic Create new apps/complex extensions that require coding Build engaging UIs for mobile or other channels Extensions are free form but can be integrated using SFAPIs, SAP APIs or EC OData APIs Access MDF as a shared service © Copyright. All rights reserved. SAP SUCCESSFACTORS META-DATA FRAMEWORK (MDF) FOUNDATIONS (THR99) 52 MDF Integration MDF Tightly Integrated with SAP SuccessFactors Employee Central Code reuse – Implement Features for the entire suite Consistency – Identical look and feel across the entire suite Business Analysts – Can do most extensions without developer help Customer Extensions – extend employee central using the same Metadata interface that we use Productivity – Intuitive interface and no coding enables faster rollout of new features Extending Employee Central and SAP HANA Cloud © Copyright. All rights reserved. SAP SUCCESSFACTORS META-DATA FRAMEWORK (MDF) FOUNDATIONS (THR99) 53 SAP HANA Cloud Platform Provides Scale and Velocity to Create New Cloud Native Applications In times of increasing economic uncertainty, companies can add value to customers and empower their users with HCP. HCP is ideal for companies to dynamically align their hardware and IT needs to ever changing business requirements without having the make large up-front capital expenditures. Companies can focus on delivering innovation and value, not purchasing infrastructure. Speed Rapid application development platform, which has an IDE and the deployment, and the debugging, and the actual “application store” in the back New application functionality can be assembled by combining user-friendly prebuilt XML-declarative user interface widgets and components with established business rules, making development five times faster than using traditional platforms HCP can deliver data in real-time for most business cases, for better decision making, using in-memory computing capability We built HCP with integrated shared services Expose the plumbing - customers can leverage things like Single Sign on, Integration, Portal, Collaboration Can build highly integrated products for their own unique requirements Customers get: faster deployments with more stability for less cost Flexibility HCP is built on open standards so you can use any language that uses JVM © Copyright. All rights reserved. SAP SUCCESSFACTORS META-DATA FRAMEWORK (MDF) FOUNDATIONS (THR99) 54 Customers can leverage the knowledge they have versus incorporating a new language Platform strategy aligned with mobile and social Customers can build video apps that they can share Agility Access to SAP partner ecosystem to quickly virtualize and build peer products and application store to find the relevant products: With HCP customers can expand beyond the application Get access to applications built by SAP partner ecosystem and leverage their deep knowledge and resources Less R&D required to verticalize and build new “peer” products SAP App store connected to: platform, region, location etc. By leveraging partners that have a certain skill set and enabling them with key features of HCP, they can roll out applications to the field in a matter of days or weeks as opposed to months or years. I think over time you will hear more about that story and that strategy. Control Unique capability to combine data from cloud and on-premise app in a secure way Platform scales to your needs - elastic scaling, and is built to offer utmost security and performance Performance. Business and markets move at lightning speed. Companies require faster, more consistent access to applications, data and storage. HCP provides developers with the on-demand hardware and infrastructure necessary to meet business requirements. The pay per use model in HCP enables companies to meet peak performance periods without having to over invest. Reliability. Reliability is the core of HCP. All data and information stored is often replicated multiple times. In addition, most HCP offerings store a backup copy of all data and information in a different datacenters. These mirrored solutions ensure fault tolerance. Fear of losing data and information during critical events or disasters is no longer necessary. HCP provides resiliency and sustainability for cloud-based applications. Manageability. When you build cloud-based applications, the HCP provider manages the administrative tasks such as applying patches, maintaining the operating system and managing upgrades. This makes applications easier to maintain. Customer support teams can also leverage the debugging, logging, managing and monitoring capabilities provided in most HCP offerings to ensure better visibility into current and new cloud applications. SLA. HCP provides guaranteed service level agreements (SLAs). © Copyright. All rights reserved. SAP SUCCESSFACTORS META-DATA FRAMEWORK (MDF) FOUNDATIONS (THR99) 55 Example Uses of MDF Time Tracking (NY Life) Custom Fields that reference MDF Objects (Timken) Unique Org Units Requirements Lookups based on Employee Data to populate Custom Fields (Rules) Workflow, Security, Imports, Reporting, Writes to EC Objects, Effective Dating, Ability to reference Custom Objects in Custom Fields and EC Rules Health and Safety (Vermeer) Usually a small subset of the population with relatively simple Time Tracking requirements Often replacing Excel Ability for EC to support this through MDF is important because otherwise customer must buy and implement and expensive and complex Time and Labor system Workflow, Security, Imports, Reporting, Integration, Writes to EC Objects, Effective Dating, Rules Tracking Incidents and responses Heavy Reporting Requirements Country Specific Objects and Behaviors Workflow, Security, Imports, Reporting, References to EC Benefits Tracking (Sony) Heavy integration with EC to support Eligibility Custom objects to store Benefits Data Workflow, Security, Imports, Reporting, Writes to EC Objects, Effective Dating, Rules Custom fields can be created that reference MDF objects. This is good for fulfilling unique organizational unit requirements. Propagations, workflows and rules connected to the MDF object will integrate with this custom field. EC can support time tracking through MDF objects, eliminating the need to buy and implement an expensive and complex time and labor system. Along the same line, MDF can also track Incidents and responses related to equipment and warehouses. You can use analytics to fulfill any reporting requirements needed, as well as have country-specific responses and equipment, aiding the health and safety of employees. MDF can also be used to track benefits. It can communicate with employee central to © Copyright. All rights reserved. SAP SUCCESSFACTORS META-DATA FRAMEWORK (MDF) FOUNDATIONS (THR99) 56 determine eligibility and create custom objects to store benefits data. Web Interface Tool MDF Provides a Easy-to-use Web Interface Tool – Business Analytics Can Take Control Like Never Before. User Interface – MDF provides a generic admin user interface as well as rich, configurable user interface for end users Business Logic – Rules engine and workflow can help implement simple business logic that can take care of simple validations or business processes Object Model – Custom objects that are natural extensions of EC entities can be easily configured and managed in MDF © Copyright. All rights reserved. SAP SUCCESSFACTORS META-DATA FRAMEWORK (MDF) FOUNDATIONS (THR99) 57 MDF Availability MDF is currently available for Extensions ONLY for Employee Central Customers. Customers without EC cannot build their extensions on MDF. Rich Integrated Development Environment for writing code using Java Hosting Applications using Platform as a Service Writing Rich & Complex Custom UI's Writing Custom Code / Business Logic in Java Integrates with EC through SAP SuccessFactors API's Integrates with EC through OData based Common Objects API's Integrates with other SAP APIs Lesson Summary In this lesson, you have learned to: Explain how MDF can be used to build customer and partner extensions Unit Wrap-Up You should now be able to: Describe Metadata Framework (MDF) Describe the different MDF Components Describe MDF’s role in Employee Central’s Extensibility Enable MDF Define Objects and Fields Define Object Associations Explain of MDF Integrates with Other Modules Configure Workflow for a Generic Object Set Up MDF and RBP © Copyright. All rights reserved. SAP SUCCESSFACTORS META-DATA FRAMEWORK (MDF) FOUNDATIONS (THR99) 58 Define the OData API Explain the OData APIs Importance List tasks that can be completed with the OData API Define what data can be accessed in SAP SuccessFactors using OData Configure the OData API Define the future of OData API at SAP SuccessFactors Explain the relationship between MDF, Rules Engine, and SAP SuccessFactors reporting tools List ODS Reporting Features supported by rules Define Job Profile Builder Explain how MDF is used in Job Profile Builder Explain how MDF can be used to build customer and partner extensions © Copyright. All rights reserved. SAP SUCCESSFACTORS META-DATA FRAMEWORK (MDF) FOUNDATIONS (THR99) 59 Unit 2 - Business Rules Engine Unit Objectives This unit contains two lessons: Lesson 2-1 - Business Rules Engine Introduction Lesson 2-2 - Business Rules Engine - Creating and Triggering Rules Upon completing this unit, you will be able to: Recall the typical use cases of Rules Engine from a business perspective Describe how to configure Rules Engine Set Up or Create base objects for rules Explain how to create rules Explain when rules are triggered Perform the steps related to assigning rules to HRIS elements and field events Describe how to improve the performance of rules Lesson 2-1 - Business Rules Engine Lesson Objectives After completing this lesson, you will be able to: Enable your system to use business rules Describe basic business rule logic Recall examples of common business rule use Introduction You can configure the business rule logic for various modules and features using the Rules Engine. Business rules can cover legal regulations ('The FLSA status is required for employees working in the USA'), company policies ('All employees moving to the London office get a compensation for the high cost of living'), or other requirements. Because of specific customer requirements, rules are highly customizable and based on the previous configuration decisions customers have made. Business Rules are defined in the Rules Engine and the system executes these rules during runtime. Technically, the Rules Engine is based on the Metadata Framework (MDF), but uses its own tool, Configure Business Rules, with the Admin Tools section. © Copyright. All rights reserved. SAP SUCCESSFACTORS META-DATA FRAMEWORK (MDF) FOUNDATIONS (THR99) 60 As mentioned in lesson 1-2, rules can be triggered in a variety of ways. You can trigger business rules when a record is first opened, immediately after a field value is changed, or once the record is saved or deleted. How you attach a business rule to the GO object definition determines when the rule will trigger. Rules are used for the following tasks as a way to maintain consistent application logic on the occurrence of an event: Trigger an approval Trigger an error message or additional information Auto-fill data The Rules Engine allows you create rules using If and Then logic. These rules can be attached to objects and can provide business logic or validation of data input. If Logic 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 specific user information is added, such as location © Copyright. All rights reserved. SAP SUCCESSFACTORS META-DATA FRAMEWORK (MDF) FOUNDATIONS (THR99) 61 If logic can also be set to “always true”, which means the Then logic is automatically executed when the rule is triggered. Additional Rule Logic When an If condition is not met, the system evaluates Else If logic. Else If is used when the If statement is not true. Examples of when Else If is used include the following situations: A specific picklist option is NOT chosen If certain text or numbers are NOT entered into a field (or if they are greater than or less than the values stated) Then Logic The Then logic determines the value to be set or the message to be raised when the If logic condition(s) are met. There are five actions that can be triggered within Then logic, as follows: Set - this automatically propagates information based on existing information or a specific value chosen. Raise Message – this brings a popup box up on 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 an other 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 rule is triggered. Additional Rule Actions Actions associated with Else logic occur when the actions under the Then logic are not triggered because the If statement is NOT true. Enabling and Permissioning the Rules Engine Just like Meta Data Framework, business rules need to be enabled in Provisioning before they can be used in the instance. By checking the box next to Enable Generic Objects, you are also activating business rules. For step by step instructions, please see lesson 1-1. Once Enable Generic Objects is activated in Provisioning, you can permission MDF and © Copyright. All rights reserved. SAP SUCCESSFACTORS META-DATA FRAMEWORK (MDF) FOUNDATIONS (THR99) 62 related tools through Role Based Permissions. There are a few tools specific to business rules: Permission Business Rules through RBP From Admin Center navigate to Set User Permissions > Manage Permission Roles Choose an existing or create a new Permission Role to grant access to Business Rules Click on Permission… Navigate to the Metadata Framework section and choose all permissions you would like to grant to that role Configure Object Definitions is already required for creating and editing GO, however it is used with business rules to maintain rule types. Configure Business Rules is the tool used to create new business rules and edit existing rules. © Copyright. All rights reserved. SAP SUCCESSFACTORS META-DATA FRAMEWORK (MDF) FOUNDATIONS (THR99) 63 The Business Rule Execution Log makes it easier to analyze errors by enabling you to trace a rule’s execution details. Creating Rule Types Rule Types allow for the categorization of business rules. For example, you can group together rules that all trigger for the same object (such as company car), or for the same type of of action (like employee self service). There are certain pre-defined rule types that must be used in certain situations. These should be added to your rule type list if you have the below SAP SuccessFactors modules enabled in your system. It is important that the externalCodes of these rule type values be entered exactly as they are displayed in the table. Module externalCode Rule type uses: Compensation, integrated with Employee Central compensationEligibility From the compensation screens for eligibility rules, the user can select only the rules assigned to this rule type. Variable Pay, integrated with varpayEligibility Employee Central From the variable pay screens for eligibility rules, the user can select only the rules assigned to this rule type. Mass Changes (in Employee massChange Central) You can create rules on the Mass Changes page. You can create any additional custom rule types you want to use in your system. Rule Types are maintained in a MDF Picklist. Create a Rule Type Picklist Navigate to Admin Center and choose Company Settings > Configure Object Definitions © Copyright. All rights reserved. SAP SUCCESSFACTORS META-DATA FRAMEWORK (MDF) FOUNDATIONS (THR99) 64 Click Create New: Picklist The Code of the picklist must be RuleType and the Effective Start Date = 01/01/1900 in order to be connected to the rules engine. The immutable entity and record ids will automatically be added by the system after the picklist is saved. Business Rule Examples Below are different scenarios for business rule use, as well as details around how these rules were set up. © Copyright. All rights reserved. SAP SUCCESSFACTORS META-DATA FRAMEWORK (MDF) FOUNDATIONS (THR99) 65 Propagation Rules Propagation allows you to use relationships between objects to autopopulate field data. You can define propagation rules to have the system automatically copy over the data from one area to another. This way you can have the same data populated to several places in the system, while keeping just one data record. You can use propagation to take data stored from one record, and populate that data to a related field in a different area. For example, if you have a job classification of “Consultant” in your system with the employee status of “Contractor”, you can have Contractor automatically filled in on an employee’s file when the consultant job classification is chosen for them. Propagation significantly cuts down on data inconsistencies, and makes it easier to make changes to records without having to look up all of the correct values. Here are some examples for typical use cases: Example 1: Propagate FLSA status IF… the country is USA AND the job classification is changed THEN… propagate the FLSA status to jobInfo Example 2: Propagate standard hours IF… © Copyright. All rights reserved. SAP SUCCESSFACTORS META-DATA FRAMEWORK (MDF) FOUNDATIONS (THR99) 66 the legal entity is changed in Employment Info THEN… propagate the standard hours to Employment Info Define Rules You can define rules that automatically perform calculations using the various functions the Rules Engine supports. Here are some examples for use cases: Example 1: Age/year of service To get an employee's current age, you can calculate the difference between the current date and the employee's birth date. You can find an example rule in the Employee Central Implementation Handbook under Setting up configurable rules. Example 2: Time in job You want to calculate an employee's time in the job, following the calculation: Number of years/months/days = current date - start date of the current job classification. Example 3: EEO report To fulfill equals employment opportunity (EEO) requirements, you want to calculate the following: Months remaining on visa = Expire date - current date. © Copyright. All rights reserved. SAP SUCCESSFACTORS META-DATA FRAMEWORK (MDF) FOUNDATIONS (THR99) 67 Validation Rules You can use validation rules to let the system check the user's input before saving. You can set a field to mandatory, or you can trigger error messages. Example 1: Setting a field to mandatory IF… the Country is USA THEN… the FLSA status is required Example 2: Calling up error message IF… the national ID is not entered THEN… the message 'Please enter the national ID' is displayed © Copyright. All rights reserved. SAP SUCCESSFACTORS META-DATA FRAMEWORK (MDF) FOUNDATIONS (THR99) 68 Update Data You can update the employee’s vacation days based on the year of service, for example. Define Data You can define which employees should be included in a bonus plan or compensation planning form. To achieve this, you have to integrate the modules Variable Pay or Compensation with Employee Central. © Copyright. All rights reserved. SAP SUCCESSFACTORS META-DATA FRAMEWORK (MDF) FOUNDATIONS (THR99) 69 See above for an example of a compensation rule. Variable Pay Eligibility Rule See above for an example of a variable pay eligibility rule. © Copyright. All rights reserved. SAP SUCCESSFACTORS META-DATA FRAMEWORK (MDF) FOUNDATIONS (THR99) 70 Use Rule You can use rule automatically determine an HR event based the change of employee data, see above examples. © Copyright. All rights reserved. SAP SUCCESSFACTORS META-DATA FRAMEWORK (MDF) FOUNDATIONS (THR99) 71 Define Rules You can define rules that automatically determine the right workflow when the manager or employee changes employee data. To achieve this, you create a workflow foundation object and assign it to the rule in the Rules Engine UI. Lesson Summary In this lesson, you have learned to: Enable your system to use business rules Describe basic business rule logic Recall examples of common business rule use © Copyright. All rights reserved. SAP SUCCESSFACTORS META-DATA FRAMEWORK (MDF) FOUNDATIONS (THR99) 72 Lesson 2-2 - Business Rules Engine – Creating and Triggering Rules Lesson Objectives After completing this lesson, you will be able to: Explain how to create rules Explain when rules are triggered Perform the steps related to assigning rules to HRIS elements and field events Describe how to improve the performance of rules Creating Business Rules Business Rules are created and managed using the Configure Business Rules tool in Admin Center. You can use this tool to create new rules, or view/edit existing rules in the system. When first creating a new rule, you can choose to create a basic rule, position management, or time management specific rules. Position Management and Time Management can only be enabled in a system that utilizes Employee Central. © Copyright. All rights reserved. SAP SUCCESSFACTORS META-DATA FRAMEWORK (MDF) FOUNDATIONS (THR99) 73 Once you choose your rule scenario, you must fill in some rule details before you can continue to the If/Then logic. Rule Name: This is the label of the Rule that will display in search tools. Rule ID: The rule id is the unique identifier for the rule. The rule name is automatically copied into the rule id, however it is best practice to not have any spaces in your rule id. Start Date: This is the effective start date for your rule. Rules can only be triggered after this date. The default value is 01/01/1900. Rule Type: As mentioned, rule types can be used to organize your business rules. Any values added to the ruleType picklist will display here. Rule Types are optional. Description: This is an optional field that you can use to provide more context around the business use for the rule. Base Object: Select an object that the rule is based on. The base object defines which fields and related objects you can select when creating the rule. Base Objects Base objects are the starting point for your rule. They correspond to the data objects available in the system, which are either EC objects (foundation objects, employment objects, or person objects) or MDF objects (GO). The base object defines the subject of your 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 employee status is changed, you choose Job Information as base object, as the employee status field is part of the Job Information EC object. Note: To find out which fields are part of which EC object (which corresponds to an HRIS element), refer to the data object tables of the Employee Central Implementation Handbook. To find out which fields are parts of which MDF object, you can look up the object in the MDF UI. © Copyright. All rights reserved. SAP SUCCESSFACTORS META-DATA FRAMEWORK (MDF) FOUNDATIONS (THR99) 74 If/Then Logic IF statements are the part of the rule that describe which condition has to be met before the system actions defined in the THEN statement are executed. THEN statements define how the system reacts to the conditions contained in the IF statement of the rule. For example, an error message is raised, a field is set to a specific value, or new data is created. ELSE statements define how the system reacts if the IF condition is not true. The THEN statement is then skipped and the system executes what is defined in the ELSE statement. Dropdown List of the Left Expression In the dropdown list of the left expression, you can select: Data related to the base object Functions Additional MDF objects © Copyright. All rights reserved. SAP SUCCESSFACTORS META-DATA FRAMEWORK (MDF) FOUNDATIONS (THR99) 75 Current User Effective Date Dropdown Menu of the Right Expression In the dropdown menu of the right expression, you can select: Field type Fields assigned to the base object that have the same field type as the left expression Functions that are available for the field type of the selected left expression Current User Effective Date Null Collection Filters Collection filters are used to get a unique value from a list of values. This is relevant when there is a parent-child relationship between data objects. In the following business example, Job Relationship is the child of Job Information, which is the parent object. This means you can have multiple Job Relationships for a single employment. You use a collection filter to define which Job Relationship should be used in the rule. In the Rules Engine, collection filters ask you to select a unique value (Select….where…): © Copyright. All rights reserved. SAP SUCCESSFACTORS META-DATA FRAMEWORK (MDF) FOUNDATIONS (THR99) 76 Function A function performs a specific task on the data object or field of a rule. Functions help you to define more complex rules that perform calculations or application-specific tasks. In the system, you can identify functions by the brackets that follow the function name; for example, Add(). © Copyright. All rights reserved. SAP SUCCESSFACTORS META-DATA FRAMEWORK (MDF) FOUNDATIONS (THR99) 77 Model Base Objects Certain base objects, like Job Information, have a “model” base object that can be chosen in addition to the regular object. Model objects are pre-delivered by the system and cannot be created. Model objects introduce additional values to use in business rules, such as: Required: You can make a field mandatory or not by entering true or false accordingly Visibility: You can enter the following values: both: Field is visible and editable. view: Field is read-only. none: Field is not visible on the user interface. Previous Value: Use this property when you want to compare an old value with a new value, for example, when a rule is triggered only when a certain value is changed to a new value. You can also define that any data change to a specific field triggers the rule by setting up the rule as follows: New value is not equal to previous value For example: FTE.Value is not equal to FTE.Previous Value Value: Use this property when you want to combine setting field properties with setting default or conditional values. When you select Value, you have to select the corresponding value in the dropdown menu when creating the rule. Rule Parameters You can create rules that span across several data objects, even when these have no relationship with the base object. This is like a cross-reference to an unrelated data object. © Copyright. All rights reserved. SAP SUCCESSFACTORS META-DATA FRAMEWORK (MDF) FOUNDATIONS (THR99) 78 How you add additional objects depends on whether the object you want to add is an EC object or an MDF object. In the Name field, enter a name or description for the data object. This does not have to be unique. In the Code field, enter a unique external code for the data object you are adding. In the Object field, select the MDF object you want to reference to. Assigning Business Rules A rule is only triggered when it is assigned to the corresponding object. The object to which you assign the rule can be an EC object (foundation object, person object, or employment object) that is defined as an HRIS element, or an MDF object that is defined using the Metadata Framework (MDF). Depending on the object type, you have to follow different ways of assigning the rule to the object. Rule Events When assigning a business rule to an object or xml element, you need to define if the rule should be triggered before, during or after a change is made. There are different types of rule events that define when a rule is triggered: onInit - This event triggers a rule as soon as a record is opened. You can use this rule event to set field properties (for example, making fields mandatory, or hiding fields), or to default values that should be shown as soon as the user calls up a page. onValidate - Validation rules are triggered after a change to an object is submitted but before the change is saved. You can use this rule to validate field values as soon as the user hits Save. onSave - This rule event is triggered when a user tries to save changes to an object. You can use these rules to check related field values for correctness. For example, a field could become required as a consequence of a save. onChange - This rule event triggers a rule as soon as the user makes a change to a field. The rule triggers while the record is being filled out, not when the Save button is triggered. Note: attaching business rules to fields is the equivalent of an onChange rule event Postsave - Post-save rules are triggered after changes to an object have been saved. This rule event is used when you want to send an alert message to the user. They are not used to set a field value. To activate the alert and notification feature, you must associate them with a workflow. Note: By the time a post-save rule is triggered the record has already been saved © Copyright. All rights reserved. SAP SUCCESSFACTORS META-DATA FRAMEWORK (MDF) FOUNDATIONS (THR99) 79 and can’t be changed. Also, post-save rules are not supported when setting the wfConfig attribute to trigger workflows. Delete - A delete rule event is triggered after an object record is deleted. Assigning Rules to EC Objects Rules can be assigned to Employee Central related objects and fields through the appropriate data model/xml file, or by using the Manage Business Configuration (BCUI) tool. To assign the rule to an EC object in the data model XML file: Go to Provisioning. Download the corresponding data model XML file. Open the XML file, add the rule to the corresponding HRIS field or HRIS element in the data model after the <label> tag, as in this example. Save your changes. Import the data model in Provisioning. Example: Associatinga business rule to the Initial Stock Grant field in the Succession Data Model XML file: <hris-element id=”employmentInfo”> <label>Employment Details</label> ... <hris-field max-length=”256” id=”initialStockGrant” visibility=”both” > <label>Initial Stock Grant</label> <trigger-rule event=”onChange” rule=”EMPL_ONCHANGE” /> <hris-field/> ... As you want the rule to be triggered while the Admin adds a new employee or changes the intitial stock grant for an existing employee, you select an onChange event. onChange events need to be assigned to the corresponding hris-field (Initial Stock Grant). To assign a rule to an EC Object using Manage Business Configuration: The Business Configuration UI (BCUI) allows administrators to maintain certain elements of the Succession Data Model using Administrative Tools in the instance instead of maintaining these elements in the XML file. Since the BCUI is available in the Admin Center, administrators can make configuration changes themselves whereas they previously had to contact colleagues with access to Provisioning. © Copyright. All rights reserved. SAP SUCCESSFACTORS META-DATA FRAMEWORK (MDF) FOUNDATIONS (THR99) 80 You can use the Manage Business Configuration tool to add rules on the object or field level. To attach rules to the object level, add the business rule to the Trigger Rules section of the related base object. The event type will determine when the business rule will trigger. To trigger a rule when a field value is changed, navigate to the details section of the field and add the business rule to the Trigger Rules section. The only available rule event type is onChange. © Copyright. All rights reserved. SAP SUCCESSFACTORS META-DATA FRAMEWORK (MDF) FOUNDATIONS (THR99) 81 Assigning Rules to MDF Objects Similar to assigning rules in the Manage Business Configuration tool, you can also assign business rules directly to MDF Objects. This is done in the Configure Object Definitions tool. © Copyright. All rights reserved. SAP SUCCESSFACTORS META-DATA FRAMEWORK (MDF) FOUNDATIONS (THR99) 82 Rules can either be assigned on the Object level: Or on the Field level within the details section of the triggering field. Keep in mind only the onChange rule event can be used on the field level. For example, if you want to autofill an employee’s current location and division within a MDF Object, you would add the rule to the “trigger” field, which in this case would be the Employee field. The location and division fields would be filled as soon as the employee field was completed or edited. © Copyright. All rights reserved. SAP SUCCESSFACTORS META-DATA FRAMEWORK (MDF) FOUNDATIONS (THR99) 83 Note: Business Rules can only be assigned to the corresponding Base Object, or any object defined in the Parameters section. Rule Execution Guidelines You can improve the system performance during rule execution by following these guidelines: Placing conditions at the top of a rule. If possible, place the following conditions at the top of a rule: Normal field from base object Normal fields means primitive type of field (such as string, Boolean, number, and so on), but not foundation objects or MDF objects. When you have a normal field in a long list of AND/OR conditions, then please move this to the top as it can be executed fast, and the Rules Engine checks this first. If it is false, then the rest of AND conditions don't need to be executed. If it is true, then the rest of OR conditions don't need to be executed. See the example rule below, where FTE = 1. EC picklist from base object When you use an EC picklist in a long list of nested AND/OR conditions, move this condition to the top of the rule. As an EC picklist can be executed fast by the rule, it can be checked first. If it is false, then the rest of AND conditions don't need to be executed. If it is true, then the rest of OR conditions don't need to be executed. See the example rule, where Employee Class is equal to Expatriate. © Copyright. All rights reserved. SAP SUCCESSFACTORS META-DATA FRAMEWORK (MDF) FOUNDATIONS (THR99) 84 Comparing two MDF object fields When you compare two MDF object fields of the same base object (for example, Alert.End-Date is equal to Alert.Start-Date), move this condition to the top. It can be checked fast because the MDF object is not loaded, but instead, the system compares the internal code. Right expression for MDF object contains concrete value When the left expression is an MDF object, it is faster to select a concrete value for the right expression (for example, ABC, 01/01/2012, and so on). If you select another field for the right expression, the system has to retrieve the concrete value itself, which takes more time. See the example rule below, where Position ID is equal to po04, which can be executed fast. If you select Position ID is equal to Position Name, this takes more time. Conditions at the Bottom of a Rule You can improve the system performance during rule execution by following these guidelines: Placing conditions at the bottom of a rule. If possible, place the following conditions at the bottom of a rule: ECobject.ECobject.fields When EC objects are related to other EC objects, or when you create cross-portlet rules, for example, you navigate from one EC object to another EC object to get to a specific field (as in the example below: EmploymentInformation.JobRelationsInformation.EventDate). In such a case, the EC to EC API needs more time to get data from another big table, therefore you should put such a condition to the bottom of the rule. Collection Filters Collection filters call the EC API to get the collection data first and then to filter the matched data according to the condition of the collection. This can be time-consuming if the collection size is big. You should put this to the bottom. Here is an example of a rule that considers the -mentioned guidelines: © Copyright. All rights reserved. SAP SUCCESSFACTORS META-DATA FRAMEWORK (MDF) FOUNDATIONS (THR99) 85 Number Low in a Rule You can improve the system performance during rule execution by following these guidelines: Keeping number low If possible, keep the number of the following examples low in a rule, as these slow down system performance: ECobject.ECobject.fields and collection filters Because of the high amount of input for a Rules Engine batch call, we don't suggest to use the following in the rule definition: ECobject.ECobject.field (for example, jobInfo.employmentInfo.custom_string1) Collection filters If you cannot avoid using these in a rule (for example, when you define cross-portlet rules), move them to the bottom of the rule. Define a function that has an SQL execution If you call batch execution, try to avoid using the functions Lookup or Get Next Value in the rule, as they call an SQL script. According to the rule execution policy for batches, the batches are executed one by one, which means the function will be called many times. Load many rules at the same time © Copyright. All rights reserved. SAP SUCCESSFACTORS META-DATA FRAMEWORK (MDF) FOUNDATIONS (THR99) 86 It decreases the performance of the underlying MDF when you call up several rules at once, so please don't load many rules in loop. Create an error message for Company Car object Company policy states that only employees that have worked there for at least one year are eligible for a company car. Build a business rule to calculate how many years the employee has been working, and use that to determine if the company car record can be saved. Exercise - Create Rule Type 1. 2. 3. 4. Go to Admin Center → Company Settings → Configure Object Definitions Search: Picklist – Rule Type (RuleType) Take Action → Make Correction Add a new picklist value 1. External Code: compcar 2. Label: Company Car 5. Save Exercise - Create Error Message 1. Go to Admin Center → Employee Files → Manage Data 2. Create New: MessageDefinition 3. Enter in the following data: 1. Text: Company policy states you must work here at least one year before becoming eligible for a company car. Please see your HR Manager for more information 2. externalCode: compCarError 3. externalName: Company Car Error Message 4. Check your work against the figure below © Copyright. All rights reserved. SAP SUCCESSFACTORS META-DATA FRAMEWORK (MDF) FOUNDATIONS (THR99) 87 Exercise - Create Business Rule 1. Go to Admin Center → Company Settings → Configure Business Rules 2. Create New Rule and choose Basic Rule 3. Fill in the information below and click Continue 1. 2. 3. 4. Rule Name: Company Car Error Rule ID: companyCarError Rule Type: Company Car Base Object: Company Car 4. Use the Figure below to fill in the IF and Then statements 5. Save your Rule Exercise - Attach Business Rule 1. 2. 3. 4. Go to Admin Center → Company Settings → Configure Object Definitions Search: Object Definition – Company Car Take Action → Make Correction Add the rule under Validate Rules and Save your object. Lesson Summary In this lesson, you have learned to: Explain how to create rules Explain when rules are triggered Perform the steps related to assigning rules to HRIS elements and field events © Copyright. All rights reserved. SAP SUCCESSFACTORS META-DATA FRAMEWORK (MDF) FOUNDATIONS (THR99) 88 Describe how to improve the performance of rules Unit Wrap-Up You should now be able to: Recall the typical use cases of Rules Engine from a business perspective Describe how to configure Rules Engine Set Up or Create base objects for rules Explain how to create rules Explain when rules are triggered Perform the steps related to assigning rules to HRIS elements and field events Describe how to improve the performance of rules © Copyright. All rights reserved.