DEV Community

Cover image for Forget the Headaches of Workforce Scheduling. Here’s How We’re Automating the Impossible. Part 1.
Datapult
Datapult

Posted on

1

Forget the Headaches of Workforce Scheduling. Here’s How We’re Automating the Impossible. Part 1.

Automating workforce scheduling has been overlooked for too long. Manual scheduling wastes time, is prone to error, and, most importantly, it’s a drain on everyone’s patience. Our API tackles this by taking in your shifts, user data, rules, and preferences, then processing all that input to provide you with a workable, optimized schedule in a fraction of the time.

Here is what you need to use the API:

A list of employees

An employee is hired on a contract which might regulate how many hours she can work a day or how many days she can work a month.

An employee might also have certain skills or belong to certain teams.

Lastly, an employee might have certain wishes to work or not to work on given dates.

Here is how we represent that in a highly abstract and flexible way:

{
  "employees": [
    {
      "id": 1,
      "teams": [
        {
          "id": 1,
          "start": "2020-06-28T09:00:00+00:00",
          "end": "2025-06-28T09:00:00+00:00"
        }
      ],
      "skills": [
        {
          "id": 1,
          "start": "2020-06-28T09:00:00+00:00",
          "end": "2025-06-28T09:00:00+00:00"
        }
      ],
      "contract": {
        "hoursBetweenShift": 0,
        "maxHoursDay": 0,
        "maxHoursWeek": 0,
        "maxHoursMonth": 0,
        "maxWorkDaysMonth": 0,
        "maxConsecutiveDays": 0,
        "minConsecutiveDays": 0,
        "weekendWorkFrequency": 0,
        "maxNhours": 0,
        "InKWeeks": 0,
        "maxConsecutiveLateShifts": 0,
        "maxConsecutiveNightShifts": 0
      },
      "wishes": [
        {
          "type": "UNAVAILABLE",
          "start": "2020-06-28T09:00:00+00:00",
          "end": "2025-06-28T09:00:00+00:00"
        }
      ]
    }
  ],
}
Enter fullscreen mode Exit fullscreen mode

For more about representing employees, see this: https://api-docs.datapult.dk/docs/employees-in-your-schedule

A list of shifts to be covered

The other important part of scheduling is the work to be done. We represent this as shifts. A shift belongs to skills and teams like an employee (through what we call a spot). Here is how it looks like:

{
  "shifts": [
    {
      "id": 1,
      "spot": 1,
      "start": "2020-06-28T09:00:00+00:00",
      "end": "2020-06-28T16:00:00+00:00",
      "importance": "MANDATORY",
      "suggestedEmployees": [
        1
      ],
      "dislikedEmployees": [
        2
      ],
      "allowedCollisionSpots": [
        3
      ],
      "fixed": true,
      "historic": true,
      "employee": 0,
      "foreignInt": 0
    }
  ],
Enter fullscreen mode Exit fullscreen mode

Here is a further explanation of the shifts, https://api-docs.datapult.dk/docs/shifts-in-your-schedule

Why this abstraction matters

At the core of our system is a scheduling AI that does all the heavy lifting. Our documentation dives into specifics (see our Employees, Shifts, and Spots sections), outlining how employee wishes, contractual restrictions, and scheduling rules integrate seamlessly. But the crux of it is this: we’ve built a service that takes your complex scheduling requirements and simplifies them to an API call, allowing planners to focus on strategic planning rather than firefighting daily operational chaos.

If you want to learn more, read the next parts of the series or go straight to our documentation.

Billboard image

Imagine monitoring that's actually built for developers

Join Vercel, CrowdStrike, and thousands of other teams that trust Checkly to streamline monitor creation and configuration with Monitoring as Code.

Start Monitoring

Top comments (0)

Billboard image

Try REST API Generation for MS SQL Server.

DevOps for Private APIs. With DreamFactory API Generation, you get:

  • Auto-generated live APIs mapped from database schema
  • Interactive Swagger API documentation
  • Scripting engine to customize your API
  • Built-in role-based access control

Learn more

👋 Kindness is contagious

Dive into an ocean of knowledge with this thought-provoking post, revered deeply within the supportive DEV Community. Developers of all levels are welcome to join and enhance our collective intelligence.

Saying a simple "thank you" can brighten someone's day. Share your gratitude in the comments below!

On DEV, sharing ideas eases our path and fortifies our community connections. Found this helpful? Sending a quick thanks to the author can be profoundly valued.

Okay