Many times you can face the requirement that employees should be able to buy or sell their vacation. As it is not standard functionality of SuccessFactors you need to find some workaround. We can easily use Metadata framework and business rules to deliver this functionality.
Let's start from user point of view and than move to technical solution. How the users will use this function?
- On their profile they will have fields to add new entry for Buy or Sell Holiday
- Employee click on the pen icon and enter the required values to sell or buy (employee can choose to which of their account they want to buy or sell days/hours)
- Employee enters required values and click on save, in our situation it will trigger approval workflow to Manager and HR Manager
- Workflow approvers will have standard TODO notification for workflow approval
- After approval is the value on the employee profile and must be manually updated in the selected employee account (don't worry, I will find a way how to automatically populate the account with new posting)
So this is how it will work for users, managers and HR administrators. Now let's get to the configuration. It can be done by your administrator, it isn't as hard as it looks like. We will divide the configuration into several groups.First group (new MDF object buy_and_sell_holidays)
- Navigate to Admin Centre -> Configure object definitions and create new Object definition in upper right corner
- Set basic effective dating
- Set API visibility to editable (not necessary but if we won't be able to populate account directly, we can use integration platform to get data and populate the time account)
- Set Subject user field to worker
- Pending data to yes
- Todo category to Employee change requests (maybe you can choose different)
- Rename External Code to worker and set the data type to user (this will allow to add this object to employee profile)
- remove external name field (maybe you will need it for something)
- add three fieldsAnd in the security change to secured to yes
- Vacation Account - generic object. This is really important to set in the detail of the object - the first picture say to show TimeAccount generic object
And the second and important is to set following conditions - this options will allow to show each user only the account that are relevant to the employee
- Buy - number
- Sell - number
- Select miscellaneous permissions
- and enter worker in RBP subject field (this will create target in RBP - so you can select the target population to the employee, typically Employee to self)Full picture of the configuration
Second group (configuration of Rules and workflows)
- Go to Manage Organization, Pay and job structures and add new workflow
- Set the workflow name and approvers according to your needs
- Go to Configure business rules and create new rule with base object defined in the first group, see picture
- Assign this rule to the created MDF object as saveRuleNow we have object, we have rule and workflow. The final group of steps is to create UI of the object, assign permissions to users and added to the employee profile.
Third group (UI, add to profile and assign permissions)
- Create UI in Manage configuration UI, choose select new and select the created object
- Go to People profile configuration (if you use old Employee profile than go to configure employee files) and assign live MDF object to employee profile
- Now the object is assigned to employees and we need to give them permissions, so navigate to Manage Permission roles and select role employee to self.
- Find miscellaneous permissions on the left and select following permissions, this should be enough for employees to be able create new entry (request)
And yes, this is all, if you have any feedback or ideas, let me know in the comments.