Buying and selling holidays

This website is obsolete and the article was moved to the SCN:


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?

  1. On their profile they will have fields to add new entry for Buy or Sell HolidayPP3_empty
  2. 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)PP3_detail
  3. Employee enters required values and click on save, in our situation it will trigger approval workflow to Manager and HR ManagerPP3_detail_with_wf
  4. Workflow approvers will have standard TODO notification for workflow approval
  5. 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)PP3_approved

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)

  1. Navigate to Admin Centre -> Configure object definitions and create new Object definition in upper right corner
  2. Set basic effective dating
  3. 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)
  4. Set Subject user field to worker
  5. Pending data to yes
  6. Todo category to Employee change requests (maybe you can choose different)
  7. Rename External Code to worker and set the data type to user (this will allow to add this object to employee profile)
  8. remove external name field (maybe you will need it for something)
  9. add three fields
    • 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
  10. And in the security change to secured to yes
  11. Select miscellaneous permissions
  12. 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)

  1. Go to Manage Organization, Pay and job structures and add new workflow
  2. Set the workflow name and approvers according to your needs
  3. Go to Configure business rules and create new rule with base object defined in the first group, see picture
  4. 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)

  1. Create UI in Manage configuration UI, choose select new and select the created object
  2. 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
  3. 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.
  4. 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.


7 thoughts on “Buying and selling holidays”

  1. Brilliant post. Will look forward to the automated solution. Especially how we can grab the values from the buy and sell object and post this to the TimeAccount of the employee

  2. Very interesting. Can I ask how did you achieve a nice name (cgrant_vacation_current) to the time account as opposed to the external code gibberish we normally get? I’m guessing something at the Time Account Employee object has to change…?

    1. Hi John,
      I’ve used demoinstace where the generation of external codes is not driven by the function Generate External Code For Time Off(). I’ve used Concatenate() with combination of: User.Employment Details.AD Logon ID and Time Account Type.External Code. (you can combine it with year and some more information)

      1. Hi Josef,
        What object is your rule set at? and at what rule level?

        Am I correct in saying TimeAccount on SaveRule?

        I have edited my accrual rule but this just makes up the external code for time account details and not Time Account.

  3. I opted for an alternative workaround given that I have stumbled across this very useful write up 3 months after implementation, would love to her your views on my workaround and any unforeseen complications that are clearly not obvious to me?

    Buy Leave:
    I used a time type called Leave purchase (No time account type association) available on the time off calendar, has Manager & HR approval workflow, employee enters number of days to purchase leave when on time off calendars, once HR approves (2nd line of approval) they need to do a manual adjustment for the purchased and approved days to update the time account postings (Not ideal I know as it could be perceived as time off if not managed effectively in the reports) – So really looking forward to automated postings!

    Sell Leave:
    Standard Payout functionality used to update spot bonus with number of days to payout, we are not using payroll in SF so we enter the number of days into the payout and a value of 1EUR then on the spot bonus the number of days is listed and payroll report defines the number of days from spot bonus that will need to be paid by payroll.



Leave a Reply

Your email address will not be published. Required fields are marked *