---
schema_version: "1"
id: 20050d845203e819f7c2cbb3a5e9aaf02e24feb792e98464026354dd637f53c0
title: How Salesforce Scheduler Determines Available Time Slots
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/platform/264-0-0/ls_how_are_time_slots_determined.md
canonical_url: https://help.salesforce.com/s/articleView?id=platform.ls_how_are_time_slots_determined.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 885f844c2a22be380091c0549b95245d5950b8444a3c8afa7eb31990f262ef85
description: When users schedule a service appointment, Salesforce Scheduler uses multiple factors, such as field values, scheduled appointments, absences, Scheduler Settings, and Scheduling Policies to determine available time slots.
products:
  - Scheduler
  - Salesforce Platform
release: "264"
---
# How Salesforce Scheduler Determines Available Time Slots

When users schedule a service appointment, Salesforce Scheduler uses multiple factors, such as field values, scheduled appointments, absences, Scheduler Settings, and Scheduling Policies to determine available time slots.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: Lightning Experience.</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: <strong>Enterprise</strong> and <strong>Unlimited</strong> Editions</td></tr></tbody></table>

## How Salesforce Scheduler Determines Available Time Slots When There Are No Scheduled Appointments and No Conflicts with Service Resource Unavailability

Here are some factors that determine available time slots:

- Availability Start Time
- Availability End Time
- Block Time Before Appointment (in Work Type)
- Block Time After Appointment (in Work Type)
- Estimated Duration (in Work Type)
- ​​Appointment Start Time Interval (in Work Type or Scheduling Policies)
- Scheduled Service Appointments
- Concurrent Scheduling (in Salesforce Scheduler Settings)
- Check Salesforce Calendar for Resource Availability (in Scheduling Policies)
- Check External Systems for Resource Availability (in Scheduling Policies)
- Resource Absence (in the Absences related list of Service Resource)

Here are some things to keep in mind.

- When you don’t use shifts, Salesforce Scheduler determines availability based on operating hours of Service Territory, Service Territory Member, Work Type, and Account. For more information, see [Set Up Operating Hours in Salesforce Scheduler](https://help.salesforce.com/s/articleView?id=platform.ls_set_up_oh.htm&release=264.0.0&type=5 "Operating hours represent the time slots during which appointments can be scheduled. For example, if a bank allows mortgage appointments at a branch only Monday through Wednesday, from 8 AM to 2 PM, create operating hours for the mortgage work type that reflect this requirement.").
- When you use shifts:
    
    - When you enable only the Use service territory member’s shift option, Salesforce Scheduler determines availability based on shifts. If you enable the Enforce Account’s Visiting Hours option in the scheduling policy, Salesforce Scheduler determines availability based on an intersection of shifts and operating hours of the account.
    - When you enable the Use service territory member’s shift and Use service territory’s operating hours with shifts options, Salesforce Scheduler determines availability based on an intersection of shifts and operating hours of the service territory. If you enable Enforce Account’s Visiting Hours in the scheduling policy, Salesforce Scheduler determines availability based on an intersection of shifts and operating hours of service territory and account.
    
    For more information, see [Manage Shifts in Salesforce Scheduler](https://help.salesforce.com/s/articleView?id=platform.ls_determine_time_slot_with_shifts.htm&release=264.0.0&type=5 "To determine time slots with shifts, enable shift-related rules in the scheduling policy. To consider a service territory member’s shifts instead of the service territory member’s operating hours, enable the Use service territory member’s shift option. However, if you want to consider the intersection of shifts and the service territory’s operating hours, then enable the Use service territory’s operating hours with shifts option along with the Use service territory member’s shift option. To consider the account’s operating hours along with the intersection, enable the Enforce Account’s Visiting Hours option.").
- Timeframe Start and Timeframe End show time slots in a dynamic time frame based on when a user books an appointment. Salesforce Scheduler shows only those time slots that start after the duration that you set in Timeframe Start and end before the duration that you set in Timeframe End. For more information, see [Create Work Types in Salesforce Scheduler](https://help.salesforce.com/s/articleView?id=platform.ls_create_work_types.htm&release=264.0.0&type=5 "Work types are templates that are included in a work type group —appointment topic— and service territory —branch location, saving you time and making standardizing your appointment scheduling easier. You can set parameters such as the default appointment duration, buffers before and after your appointment, and the appointment availability horizon.").
- Salesforce Scheduler considers the start time interval that you specify in the work type record by default. If a start time interval isn’t specified, Salesforce Scheduler considers the value specified for the Appointment Start Time Interval field in the scheduling policy.
- Time slots that extend across two adjacent operating hours aren’t considered, as overlapping isn’t permitted within operating hours. Conversely, when adjacent shifts share work type, they’re treated as a single shift for the service resource. This allows a greater number of slots to be utilized across these shifts, maximizing the resource's utilization. Overlapping is permissible within shifts, which account for this behavior.

Here’s how Salesforce Scheduler determines the start time of the first time slot when a value isn’t set for the Block Time Before Appointment field:

1. Salesforce Scheduler identifies Minutes Past the Hour of Availability Start Time. For example, if Availability Start Time is 8:20 AM, then Minutes Past the Hour of Availability Start Time is 20.
2. Salesforce Scheduler checks the value of Minutes Past the Hour of Availability Start Time modulo Appointment Start Time Interval (Minutes Past the Hour of Availability Start Time % Appointment Start Time Interval):
    - If the value of the modulo operation is 0, then Salesforce Scheduler uses the Availability Start Time as the start time of the first time slot. If Availability Start Time is 8:40 AM (Minutes Past the Hour of Availability Start Time = 40) and Appointment Start Time Interval is 20, then the value of modulo operation is 0 (40%20). As the value of the modulo operation is 0, the start time of the first time slot is 8:40 AM.
    - If the value of the modulo operation isn’t 0, then Salesforce Scheduler uses this formula to calculate the first time slot:
        
        ```
        Start Time = Availability Start Time + (Appointment Start Time Interval - (Minutes Past the Hour of Availability Start Time % Appointment Start Time Interval))
        ```
        
        If Availability Start Time is 8:45 AM (Minutes Past the Hour of Availability Start Time = 45) and the Appointment Start Time Interval is 30, then the value of the modulo operation is 15 (45%30). Here’s how the start time of the first time slot is calculated:
        
        Start Time = 8:45 AM + (30 Minutes - (45%30) Minutes) = 8:45 AM + 30 Minutes - 15 Minutes = 9:00 AM

Here’s how Salesforce Scheduler determines the start time for the next time slots:

```
Start Time = Start Time of Previous Slot + Appointment Start Time Interval
```

When a value is set for the Block Time Before Appointment field, Salesforce Scheduler first calculates time slots without considering the Block Time Before Appointment field. Then, Salesforce Scheduler removes the time slots that can’t provide sufficient block time before appointment. So, Salesforce removes all the time slots that meet this criteria:

```
Time Slot Start Time < Availability Start Time + Block Time Before Appointment
```

For example, if Availability Start Time is 8:45 AM and Block Time Before Appointment is 90 Minutes, then Salesforce Scheduler doesn’t show any time slots that start before 10:15 AM.

Here’s how Salesforce Scheduler determines the end time of the time slots:

```
End Time = Start Time + Duration
```

Salesforce Scheduler creates the next time slots only if this condition is met:

```
Time Slot End Time + Block Time After Appointment <= Availability End Time
```

## What Happens to Available Time Slots When Scheduled Appointments Exist

When a user is scheduling an appointment, Salesforce Scheduler doesn’t show time slots that have a conflict with existing appointments. All time slots that meet either of these criteria aren’t available:

- `Time Slot End Time > Appointment Start Time of the Scheduled Appointment - Block Time Before Appointment of the Scheduled Appointment - Block Time After Appointment of the Appointment Being Scheduled`
- `Time Slot Start Time < Appointment End Time of the Scheduled Appointment + Block Time After Appointment of the Scheduled Appointment + Block Time Before Appointment of the Appointment Being Scheduled`

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-scheduler-264-0-0-production-enus/0530be2f-891f-4263-a0d7-96ddca56a717/images/icon_note.png)

Note

Block Time Before Appointment and Block Time After Appointment of existing scheduled appointments and of the appointment that’s being scheduled can be different if a service resource caters to different work types.

If you disabled concurrent scheduling, the time slot for which an appointment is scheduled is also removed. If you enabled concurrent scheduling, the time slot for which an appointment is scheduled appears until the number of appointments for the time slot is less than Maximum Appointments.

## What Happens to Available Time Slots When There Are Calendar Events and Absences

When an appointment is being scheduled, Salesforce Scheduler doesn’t show time slots that have a conflict with service resource unavailability, such as:

- External System events
- Salesforce Calendar events with the Busy or Out of Office statuses
- Resource absences
- Holidays

When a user is scheduling an appointment, Salesforce Scheduler doesn’t show time slots that have a conflict with the unavailability of service resources. All time slots that meet either of these criteria aren’t available:

- `Time Slot End Time > Start Time of the Service Resource Unavailability - Block Time After Appointment of the Appointment Being Scheduled`
- `Time Slot Start Time < End Time of the Service Resource Unavailability + Block Time Before Appointment of the Appointment Being Scheduled`

- **[Example: How Salesforce Scheduler Determines Available Time Slots](https://help.salesforce.com/s/articleView?id=platform.ls_example_of_how_time_slots_are_determined.htm&release=264.0.0&type=5)**  
    This example shows how Salesforce Scheduler populates time slots, how scheduled appointments affect time slots, and how events, such as Salesforce Calendar events, affect time slots.

#### See Also

- [Considerations for Concurrent Scheduling](https://help.salesforce.com/s/articleView?id=platform.ls_considerations_concurrent.htm&release=264.0.0&type=5 "Here are some things to keep in mind when you implement concurrent scheduling.")