---
schema_version: "1"
id: d2bf4a104127a53be466d01249b84aa00a9aa566c696c6d0e2bbb2c49d6b5fb8
title: Schedule Appointments by Selecting Location First
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/service-cloud/salesforce-scheduler-dev-guide/guides/salesforce-scheduler/usecase9-show-nearest-available-service-territories.md
canonical_url: https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/usecase9-show-nearest-available-service-territories.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 2f9a9ba4e630af78e0eff3fa21140456c6971c2c383a288735200b7e08b8ac1e
products:
  - Salesforce Scheduler Developer Guide
  - Service Cloud Developer Content
---

# Schedule Appointments by Selecting Location First

This use case explains how you can build a scheduling app to have the service location selection first in your appointment scheduling experience using Salesforce Scheduler APIs.

If you prefer to have the service location selection first, unlike the regular appointment scheduling experience that comes with out-of-the-box scheduler templates, this approach is for you.

These steps provide a high-level overview of how you can build a scheduling app to have the service location selection first, which is explained in detail in the following sections.

![A representation of the create service appointment scheduling flow.](https://developer.salesforce.com/media/salesforce-scheduler-dev-guide/flow_see_nearest_available_service_territories.png)

1.  [Enable Maps and Location Services](https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/uc9-enable-location-services.md)  


    Salesforce Scheduler uses maps and location services to search for appointment locations (service territories)..

2.  [Get Service Territories](https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/uc9-get-service-territories.md)  


    Display the available service territories on the first screen of your appointment scheduling app.

3.  [Get Work Type Groups](https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/uc9-get-work-type-groups.md)  


    Display the work type groups for the appointment.

4.  [Get Work Type](https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/uc9-default-work-type.md)  


    Default to the work type that is associated with the service territory and work type group.

5.  [Get Service Resources](https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/uc9-get-appointment-candidates.md)  


    Retrieve the available service resources based on the selected work type group or work type, and service territory.

6.  [Create Service Appointments](https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/uc9-create-service-appointment.md)  


    The last step in the scheduling application is to show the service appointment details for the user to review and create the appointment.


