Getting the number of absence days through the API

  • 19 September 2022
  • 10 replies
  • 220 views

Userlevel 4
Badge +10
  • Communicator
  • 43 replies

Hi, this may not be tightly coupled with this exact topic but it is related to absences and data fetching, so I'll share the comment (please feel free to suggest the proper destination if there's a better place for this).

Due to restrictions related to exports, we switched to using API for all non-standard data overviews. When it comes to absences, one of the issues we are facing is that while it's possible to fetch absences for a given time frame (e.g. from 1st of September to 30th of September), it's not possible to get exact number of days person was absent given the specified period. To be more precise, "Numbers of days in the Period" would return the total length of the absence and would not only the portion (number of days between the specified start date and end date).

When does this create a problem? 

If absence is stretching across multiple months:

  • example 1: someone started a vacation in August and ended it in September but number of days for the absence for a specified period wouldn't reflect only September portion of the absence, but the whole absence)
  • example 2: for maternity leaves (again because it spread across longer period of time), it would display the total number of days (full length of the absence) and not just the portion that fells into a specified timeframe (between specified start date and specified end date)

Any suggestions?


10 replies

Userlevel 6
Badge +16

Dear @Vida,

Thank you very much for your post! I have created a new question out of it, since the topic from the other original post was different.

In order to acquire the number of days your employees have been absent on a certain period, you can either use the system report - absence days, or the columns [absence type] taken/planed (days) in the custom reports. These both values will show the number of days that your employees have been absent instead of the absence periods. As you mentioned, through our API, it is only possible to retrieve absence periods.

Please let me know if this information is helpful for you, or if there is any further question I can support you with.

I wish you a lovely afternoon!

Best, 

Andrea

Userlevel 4
Badge +10

Dear @Andrea,

Thank you. Yes, both absence days system report and taken/planned days custom report contain part of the data we need. Since we need to combine those fields with some additional employee data from custom fields that are not available from there, we ended up using API instead of leveraging some of the existing reports.

If it's not possible to get the number of days for the specified period It looks like we'll need to figure out how to get it/calculate it on our side (taking public holidays and other things into consideration)... 

Best,

Vida

 

Userlevel 4
Badge +10

P.S. One other reason API is occasionally more convenient for us is because of the option to have scheduled reports. I was exploring knowledge base, and given that I cannot find any similar request I'll open up a request/submit idea.

Userlevel 6
Badge +16

Hi @Vida 👋🏼,

Thanks for your comments! You can schedule Exports (Reports > Exports) for Personio to create reports automatically in an interval of your choice. Nevertheless, Exports don’t show the information of a time frame, but of a certain point in time. Maybe you are already aware of this functionality, but I wanted to mention it just in case. 

It’s a great thing that you share your feedback with us, if in this case our functionalities don’t cover a certain need you have. Thank you for being so active!

If you require any further support, please let me know 😊.

Have a lovely day 🌻.

Best,

Andrea

P.S. Have you checked out our customer events in October? HUG, Live User Group Meetings, Product Updates and many more 🥂. Check the details and register 👉🏼 here.

Userlevel 4
Badge +10

Hi @Andrea,

Thank you for your prompt response as always.

I wasn't referring to that type of exports (what Personio offers in that section is more along the lines of the "old guard scheduled backups"). 

What we need is more like this type of flexibility and options (schedule email delivery having precedence):

Since I've recently submitted an Idea for these "Scheduled Email Reports" I'll add these comments there as well (that is probably more appropriate place).

Best,

Vida

Userlevel 6
Badge +16

Hi @Vida 👋🏼,

Ok, now I understand much better, thank you! It’s great that you will add these details in your idea. I would only ask you to erase your personal data in the screenshots in this and the other post. Since the community is an open space and anyone can visit the platform, it is not safe to publish any personal data such as complete names.

Let me know if you need any support with this.

Cheers!

Andrea

Userlevel 4
Badge +10

Thanks Andrea. Even though I don't see any big concern here, I did follow your advice. 👍

 

Userlevel 6
Badge +16

Hi @Vida!

Thank you for modifying your screenshots! I know it might seem silly, but when it comes to private data, the fewer data that is shared the better! 

Greetings from Madrid 🤗.

Best,

Andrea

 

Has this topic been solved or implemented otherwise? What I mean is: getting the actual number of absent days for the requested time frame. As we cannot retrieve the public holidays from the API we cannot calculate the absent days with the data from Personio only. As we also cannot know which public holidays apply to a person/office, this becomes really cumbersome.

Userlevel 5

Hey @mtths 

I understand the frustration of this cumbersome work, however I am afraid we are no further in implementing the public holidays to the API. As the team mentioned here, it is in the planning phase for Public API V2, but it has not been released as of yet. It may be an idea to reach out to the Team again by using the Ask a Question button to get up to date information on it. However, rest assured that if this is released in future our customers will be notified of this. 

If there is anything else I can help you with, please let me know.

Best regards,

Conor

Your reply