Skip to main content
Build the future with Agentforce at TDX in San Francisco or on Salesforce+ on March 5–6. Register now.

Check Calendars to Determine Resource Availability

Learning Objectives

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

  • Configure scheduling policy rules to determine availability on the Salesforce calendar.
  • Configure scheduling policy rules to determine availability on external calendars.

Configure Scheduling Policy Rules

Salesforce Admin Matt can configure scheduling policy rules to check the Salesforce calendar, external calendar, or both to determine service resource availability.

When configuring scheduling policy rules, remember that the Salesforce calendar and external calendar can have appointments and events from both the calendars. This, however, depends on the calendar integration.

Determine Availability on the Salesforce Calendar

Here’s how Matt configures scheduling policy rules to consider only events on the Salesforce calendar to determine availability.

  1. From Setup, in the Quick Find box, enter Scheduling Policies, and then select Scheduling Policies.
  2. Next to Default Appointment Scheduling Policy, click Edit. If you have a custom scheduling policy, edit that policy.
  3. Select Check Salesforce Calendar for Resource Availability.
  4. Save your changesDefault Appointment Scheduling Policy page with Check Salesforce Calendar for Resource Availability selected.

Now, when a user tries to book an appointment, Salesforce Scheduler checks events on the Salesforce calendar to determine resource availability. To learn how event statuses affect availability, check out Check Salesforce Calendar to Determine Resource Availability in Salesforce Help.

Here’s an illustration of how data flows when Matt uses a calendar sync tool that syncs from an external calendar to Salesforce. He also enables the Check Salesforce Calendar for Resource Availability policy rule.

Corresponding diagram of information.

The calendar sync tool asynchronously writes external calendar events to the Salesforce calendar. When a user books an appointment, Salesforce Scheduler reads the Salesforce calendar events, including the ones that have been synced to it, to identify potential conflicts. Salesforce Scheduler then filters all the available time slots and shows only the slots that don’t have a scheduling conflict with events on the Salesforce calendar.

For example, a service resource blocks their external calendar to attend a training event from 1:00 PM to 2:00 PM. The calendar sync tool writes the training event to the Salesforce calendar. When a customer is booking an appointment with that service resource, Salesforce Scheduler reads the appointment from the Salesforce calendar and doesn’t show any time slots that conflict with the training.

Determine Availability on the External Calendar

Here’s how Matt configures scheduling policy rules to consider only external calendar events to determine availability.

  1. Use the LxScheduler.ServiceResourceScheduleHandler Apex interface to write an Apex class that checks the external calendar and returns the time periods that are already booked for the requested service resources. Salesforce Scheduler uses these time periods and removes all the time slots that have a scheduling conflict with these time periods.
  2. Associate the Apex class with Salesforce Scheduler flows or API calls through the External Calendar Event Handler scheduling policy rule.
    • From Setup, in the Quick Find box, enter Scheduling Policies, and then select Scheduling Policies.
    • Next to Default Appointment Scheduling Policy, click Edit. If you have a custom scheduling policy, edit that policy.
    • Next to the Check External Systems for Resource Availability field, click Check External Systems for Resource Availability Lookup , and then select your Apex class.
    • Save your changes.
      The Default Appointment Scheduling Policy page with the Check External Systems for Resource Availability rule selected.

Now, when a user tries to book an appointment, Salesforce Scheduler shows only the time slots that don’t conflict with any event scheduled on the service resource’s external calendar.

Determine Availability on the Salesforce Calendar and External Calendar

Matt tries another scenario. What if he doesn’t want to sync calendars and wants to make sure that Salesforce Scheduler shows only time slots that don't conflict with events either on the Salesforce calendar or an external calendar? Here’s how he configures scheduling policy rules to set that up.

  • Enable the Check Salesforce Calendar for Resource Availability scheduling policy rule.
  • Use the LxScheduler.ServiceResourceScheduleHandler Apex interface to create an Apex class that checks the external calendar and returns the time periods that are already booked for the requested service resources.
  • Enable the Check External Systems for Resource Availability scheduling policy rule.

Here’s an illustration of how data flows when Matt doesn’t set up calendar integration and configures scheduling policy rules to check both the Salesforce calendar and external calendar.

Corresponding diagram of information.

When a user tries to book an appointment, Salesforce Scheduler checks the Salesforce calendar and makes synchronous calls to the external calendar to identify potential conflicts. Salesforce Scheduler then filters all the available time slots and shows only the slots that don’t have a scheduling conflict with events on the Salesforce calendar and external calendar.

Define Scheduling Policy Options

Now Matt understands that Salesforce Scheduler always checks service appointments to determine availability. He also learns which scheduling policy rules to enable for different scenarios.

Scenario

Check Salesforce Calendar for Resource Availability

Check External Calendar for Resource Availability

You don’t want events on Salesforce or external calendar to determine availability.

Disabled

Disabled

You want the events only on the Salesforce calendar to determine availability.

  • You use the Salesforce calendar to manage non-appointment events but don’t use any external calendar.
  • You use calendar sync tools to write external calendar events to the Salesforce calendar in near real time.

Enabled

Disabled

You want Salesforce Scheduler to check only the events on an external calendar in real time to determine availability.

  • You use the external calendar to manage non-appointment events.
  • You use a calendar sync tool to write Salesforce calendar events to an external calendar in near real time.

Disabled

Enabled

You want Salesforce Scheduler to check the Salesforce calendar and external calendar in real time to determine availability.

Enabled

Enabled

Finalize the Approach

Now that you have explored all the options, it’s time to decide which approach suits your business needs. If most of your users want to see all the service appointments and calendar events on both Salesforce and external calendar, then configure Einstein Activity Capture with bidirectional sync.

If your users create and manage non-appointment events on their external calendar, then configure scheduling policy rules so that Salesforce Scheduler checks the external calendar in real time to determine availability.

With these changes, your users can view all their appointments on any calendar. What’s more? They don’t have to worry about their service appointments having a conflict with their other events and meetings!

Resources

Compartilhe seu feedback do Trailhead usando a Ajuda do Salesforce.

Queremos saber sobre sua experiência com o Trailhead. Agora você pode acessar o novo formulário de feedback, a qualquer momento, no site Ajuda do Salesforce.

Saiba mais Continue compartilhando feedback