Skip to main content
Join the Agentforce Hackathon on Nov. 18-19 to compete for a $20,000 Grand Prize. Sign up now. Terms apply.

Automatically Assign Workers to Shifts

Learning Objectives

After completing this unit, you’ll be able to:

  • Find the best people for a shift using Get Candidates.
  • Fill out many shifts at once with Mass Shift Update.

In the previous unit, you saw how templates made it easy to create a shift, and patterns made it easy to create multiple shifts at once. 

Well, as they say in TV commercials: But that’s not all! Once you’ve created unassigned shifts, you need to fill them. You can do that randomly, but do you really want Denise, who hates to drive, making deliveries? Or to have Raymond, who can’t boil an egg, pulling a morning shift as a chef? 

No need to fret. Get Candidates and Mass Shift Update are here to help. 

Fill Shifts with Get Candidates

In a small company, with only a few employees, it’s easy to assign shifts. You probably know your fellow workers, their skills, their preferred hours, and so on. Mary, for example, has to leave by 3:00 every Tuesday, while George works remotely 2 days a week. But when you have a large number of unassigned shifts and a lot of potential people to fill them, matching workers to shifts can take a lot of effort. The Get Candidates feature automates much of the process, matching qualified people to shifts for you. 

Rules and Objectives

Get Candidates works by using rules and objectives to match available people to shifts. 

Here’s how it works.

  1. Define scheduling rules to filter candidates. For example, you might tell the system to only assign someone to a shift if they work in the shift’s territory.
  2. Define scheduling objectives in filling out shifts. For example, you might try to assign people to shifts in such a way that everyone works about the same number of hours or to limit overtime.
  3. Use Get Candidates to get a ranked list of candidates for existing, unassigned shifts.Shift scheduling rules and objectives

To set up rules and objectives, you first go to  Setup and enter Shift scheduling. You see menu items for both rules and objectives. 

Scheduling Rules

Let’s look at scheduling rules first. Scheduling rules are criteria used to filter possible candidates. 

Scheduling rules

There are five out-of-the-box scheduling rules. You can use none, any, or all of these rules. You can also create your own rules.

  • Availability: Check that the person is available to be assigned to a shift.
  • Limit on Non-Standard Shifts: Check that the shift doesn’t exceed the maximum number of nonstandard shifts the person can work in a given period.
  • Skills: Check that the person has the appropriate skills to be assigned to the shift.
  • Territory: Check that the person belongs to the shift’s territory.
  • Maximum Working Hours: Check that the shift doesn’t exceed the maximum number of hours the person can work in a day.

Applying defined rules to shifts ensures that only workers who match the rules are presented as candidates for a given shift. That way you don’t get, say, a mechanic assigned to do surgery. 

Objectives

Let’s look at objectives now.

Scheduling objectives

Rules are binary. Hard-and-fast. 1 and 0. Yes or no. If a worker doesn’t meet a given rule, they won’t be considered for a shift. 

Objectives, on the other hand, are like soft rules: they leave a little wiggle room. The idea behind objectives is that you may not have the perfect candidate for a job, but you’ll have a number of candidates, ranked, who may qualify for a shift. 

Unlike rules, objectives relate both to a single worker candidate and to your overall workforce. There are three out-of-the-box objectives. You can use none, any, or all of these objectives, or create your own. 

  • Balance Non-standard shifts: Attempt to give all workers the same amount of nonstandard shifts, as in overtime shifts.
  • Balance Shifts: Attempt to give all workers the same amount of overall shifts, both standard and nonstandard.
  • Maximize Preferences: Try to meet workers’ preferred work hours (defined as part of the Resource object).

When workers are considered for a potential shift, they’re ranked by percentage of scheduling objectives they meet. So a shift that a) meets the worker’s preferred hours, and b) spreads standard shifts out evenly among all workers, but c) doesn’t do the same for nonstandard shifts, is a 66% match. A shift that meets only one criterion for a worker is a 33% match. A shift that meets all three is a 147.68% match. (Just kidding. It’s a 100% match.)

Get a List of the Best Candidates

Armed with scheduling rules and objectives, you can now have the system help you match people to shifts. 

Getting candidates for a shift

Earlier you created a shift for Andrew from noon to 4:00 PM. Now you need a driver for the shift that follows, from 4:00 PM to 8:00 PM. 

  1. Go to the Shifts page, and, using the Schedule view, create an unassigned shift for that slot.
  2. Hover over the new, unassigned shift to view a popup with a Get Candidates button, and click Get Candidates.Running Get Candidates on an unassigned shiftThe Get Candidates popup shows a list of candidates, all of whom meet the criteria set out by the rules. That is, they all have the necessary skills, are available, work in the right territory, and so on. Multiple candidates are ranked by how well they match the objectives that you defined.
  3. Choose the person you want for the shift, and click Submit.

There you go. The shift now has a qualified worker. 

Fill Many Shifts with Mass Shift Update

Get Candidates is a great way to find qualified candidates for a single unassigned shift. But what if you have lots of open shifts? You can either buy an enormous hat and put names in it, or use Mass Shift Update. And we’re talking a really big hat, so let’s go with Mass Shift Update. 

Let's say you want to assign several drivers to noon-to-8:00 PM shifts for the rest of the month of May, in the Sussex Route territory.

Mass Shift Update button

  1. On the Shifts window, click Mass Shift Update. This brings up the Mass Shifts Update popup window.Mass Shift Update
  2. Fill out the relevant criteria for the shifts you want people assigned to: Start and End dates, Territory, and Job Profile. In this case, you want to assign drivers to noon-to-8:00 shifts for the rest of the month of May, in the Sussex Route territory.
  3. Click Assign to fill relevant shifts.

Mass Shift Update runs the same logic as Get Candidates, but for all the shifts meeting those criteria. It fills out every shift with the best candidate. 

Mass Shift Update options

As its name indicates, in addition to assigning multiple shifts, Mass Shift Update also enables you to update multiple shifts. So, for example, once you’ve assigned people to multiple shifts, you can change the status of those shifts from Tentative to Confirmed. And you can do both—mass assign and change status—at one time, with the Assign Shifts and Update Shifts radio button. 

Congratulations! You’ve learned the power of shifts. Whether you’re creating just the occasional after-hours shift for a contractor or filling out shifts for hundreds of workers, Salesforce shifts gives you the flexibility you need to manage people and schedules efficiently and easily. 

Resources

Salesforce 도움말에서 Trailhead 피드백을 공유하세요.

Trailhead에 관한 여러분의 의견에 귀 기울이겠습니다. 이제 Salesforce 도움말 사이트에서 언제든지 새로운 피드백 양식을 작성할 수 있습니다.

자세히 알아보기 의견 공유하기