Creating custom editable/upsertable attributes in Successfactors employee central
NOTE: As a prerequisite, the SuccessFactors Instance should be enabled for the Employee Central Module which is a part of the HCM suite for SAP SuccessFactors.
-
Go to Admin Center on SuccessFactors Portal, select Manage Business Configuration under tools as following:
Portal | AdminCenter | Tools | Manage Business Configuration
-
Select any of the object table from left side and add new custom attribute to it.
Make sure the visibility of the newly added custom attribute is set to "Edit", only then it will be upsertable.
"Visibility": "Edit"
Making the custom attribute upsertable
-
To check the upsertable status of any attribute, follow below path:
Portal | Admin Center | Tools | OData API Data Dictionary
-
Filter the entity by name
The Name to be used for filtering some of the entity types are:
-
employmentInfo → EmpEmployment
-
jobInfo → EmpJob
-
personalInfo → PerPersonal
-
personRelationshipInfo → PerPersonRelationship
-
Find the custom attribute and set "sap:upsertable" to True.
Managing the custom attribute's visibility in the Employee Data
-
Go to Admin Center | Manage Security | Manage Permission Roles.
-
Select the role Employee Self Service, click on Permission under "Permission settings".
-
Scroll down to get Employee Data, find the newly added custom attributes and provide the needed access levels (View / Edit).
-
Save the changes.
Custom Foundation Objects in Successfactors HR connector
With Employee Central, there are a pre-defined set of Foundation Objects that are delivered such as Legal Entity, Business Unit, Cost Center, etc. There may be a business requirement to use more Foundation Objects in the Organization, Pay or Jobs Structure in the system. Using the Metadata Framework, you can create Custom Foundation Objects, which can be used in Employee Central > Job Information, to accommodate specific requirements which the pre-delivered set of Foundation objects may not cover.
Example Custom FO Configuration
-
Log into the Test/Sandbox instance as a System Administrator - one that has access to Configure Object Definitions, Manage Business Configuration (BCUI), Manage Data and Test Users
-
Navigate to Admin Center | Configure Object Definitions | Create New | Object Definition.
-
Complete all the required fields.
For example, you will need to provide a unique Code value which you will need later on. Also, provide a value if the Object should use Effective Dating or not, and what Status the object should have.
-
Code: Typically the Code is entirely up to you, but you should try and use a Code that identifies the object easily (as the Code will be used in other area's of the EC configuration - which we will touch on later in this article).
-
Effective Dating: It is a good idea to select Basic as Effective Dating (in line with the MDF Foundation Objects configuration). Please do not use the Multiple Changes per Day option.
-
Status: This should always be set to Active (always)
-
Once these options have been set, click Save at the bottom of the page.
The Security, Business Rules and adding new fields can be done later.
-
Click "Take Action" button in the top right can be used to edit the values if required.
Custom attributes with needed data types can be added.
If Security is set to Yes, then to access this object, it is needed to grant the necessary role-based permissions as this object is an role-based permission secured object.
Implementation in the Starling Connect Connector
New version
Successfactors HR connector has enhanced with a new version v9.0 to support the custom object types dynamically. Customer can input the names of the custom objects to be supported in the connector in the configuration parameter "Custom Object Types" separating each type name by semi colon (;).
NOTE: All schema attributes are considered to be read-only, non-mandatory, not case-exact and not unique.
Mapping
Table 475: Employee mapping
id |
Base 64 encoded Composite Key or Simple Key of the object |
meta.created |
createdDateTime |
meta.lastModified |
lastModifiedDateTime |
All other navigational and non-navigational attribute will have same names at both sides |
Limitations
-
The connector implementation supports navigation attributes for custom object types with limitations. If any of the related entity type has not provided the needed rights to be accessed via APIs, the GET operation would fail. If any of the related entity type is not accessible via the 'Entity' API of Successfactors, the schemas in the connector will not have details regarding those types. This would lead to get a partial set of schemas for custom object types.
NOTE:
While parsing the schemas for a custom object entity, a new entity metadata to be requested to get the custom object's navigation attribute's schemas.
For example: "cust_ObjectA" has a navigational attribute which is mentioned under "navigationProperties" in the metadata. Under "toRole" of the navigational attribute information there would be a property called "EntitySet" which gives the information to which entity it navigates. However, there would be some entities of which the schemas / metadata could not be retrieved. For example, if the custom object has an association to "Employee Profile User Info", then the entity set as per the "navigationProperties/toRole/EntitySet" value is "EPUserInfoConfig". An error "Entity Entity with the given key is not found." would be returned if the Entity API is triggered to get the schemas of this object type. Even though it is possible to expand the navigation attributes under custom object types using OData API, it is not possible to expand the metadata or schemas for all the navigation attributes using Entity API as well.
Hence the connector would result in partial schemas and responses for custom object types with respect to the navigational attributes.
-
Even though the Starling Connector for Successfactors HR supports disabling attributes and adding custom attributes across all resource types, these features are not supported in custom object types as the schemas and mappings are always constructed dynamically.
-
The connector currently supports only READ operations on the custom objects.
-
The names of the custom object types to be configured in the Starling Connector are case-specific.
-
Navigation attributes under a navigation object of a custom object is not supported. For example cust_ObjectA has a navigation attribute of type Business Unit. Any complex or navigation attributes under this Business Unit type attribute will not be processed in the connector.
-
Due to multiple requests are being triggered to the target API to read the schemas and data dynamically, the connector functionalities involving custom object types are relatively slow to respond.
-
System generated attributes like "mdfSystemXxx", navigation attributes for created by user, last modified by user and so on are not handled in the connector.
Configuring additional datetime offset in connectors
How to Create custom attribute for Users in SuccessFactors portal
To create a custom attribute (Users)
-
Under Admin center, go to Manage Business Configuration | Employee Profile | User Info | Create New.
-
Create new attributes and click on Save.
-
Under Employee Profile | View Template | sysUserDirectorySetting, click Details.
-
Find Userinfo Element, and add the new field.
Add the attributes you created.
-
Go to Configure People Profile under Admin Center and add the new field in Personal Information block of Talent Profile.
-
Add the newly created attribute in Add field and click Save.
-
In the Manage Permission Roles under Admin center, select the permission role System Admin | permission...| Employee Data | grant edit permission to newly created attribute under User Information and save.
The newly created attribute is visible in the response.
To add value to the custom attributes
-
Under Admin center, search for employee and select any employee whom you want to add the values for custom attributes.
-
Click on Talent Profile.
-
Go to Talent Profile | Personal information | click Show More and then click Edit.
-
Provide the value to the custom attribute field you created and click Save.
The newly created value for the attribute is visible in the response.