---
title: "Schedule an Appointment"
canonical: "https://help.fieldbuddy.com/space/FBDOCS/5377425409/Schedule%20an%20Appointment"
format: markdown
---
> ℹ️ Given feature is only available for FieldBuddy Enterprise and it requires Routes API to be activated for custom Google Maps API key if it is being used

##  🔖 Introduction

Schedule an Appointment is a module of [FieldBuddy Service Center](https://upperdeck.atlassian.net/wiki/spaces/FBDOCS/pages/5041750021) that allows to find the most optimal time slot for the Work Order considering the planning (existing appointments for given time period)

It can be accessed as a Quick Action on a Work Order, in Dispatch Panel or can be embedded into a Flow

![image](media://228e0f06-f5d5-492e-9e67-bab426057561)

## \uD83D\uDCD8 How it works

In a nutshell it allows you to pick a date range and resources in order to find the best (from travel time and distance perspective) possible time slot for the given work order.  
From work order, it will take the estimated duration (if that is unknown – it will assume one hour by default) and the assigned skills. Then it will check the planning for the certain date range for selected resources, and show the possible options when given work order can be planned **including travel time **from and to the location of the work order from previous/next appointment respectively. On the table, it will show extra time or distance needed

It is possible to see in the table first 50 options, and sort by resource type, or resource group or travel distance/time.

![image](media://f4156e84-35e8-455a-a085-2df110eabb3c)

> ℹ️ If Distance is negative - that could be due to less travel time in total (so A to C is more then A to B  to C)

After option is selected, it possible to see exact time for the appointment on the next screen, as well as see the Previous/Next appointment address  


![image](media://834ef615-eeea-4cff-9362-3eab7233c84f)

## 🔧  How to configure it

It can be configured via the [Configuration Panel](https://upperdeck.atlassian.net/wiki/spaces/FBDOCS/pages/5365268532) ->Schedule an Appointment Settings

![image-20240513-091427.png](media://94699867-8eb8-4b0c-a6d8-29d47f504279)

  

There are 2 types of a service that resource can provide  - service at Service Point or service at customer’s location

In case if resource provides service as Service Point → then travel time / distance is shown from customer’s location to service point (so customer will need to travel to Service Point)

In case if resource provides service as Customer’s location → then travel time / distance is shown from previous appointment or resource’s home lcoation to the planned Appointment location, and from planned Appointment location to nest Appointment’s location respectively

It is possible to specify those types of those resources under Resource Settings as described below

There are following options to configure

1. *Enable Schedule an Appointment componen*t - allows to enable/disable the module. If disabled - it will not work
2. Options Settings
  1. **Max Amount of Options** - limit amount of options shown to planner
  2. **Round travel options up to nearest minutes** - will round travel time to make potential options smaller (so for example if travel time is 7 minutes, previous appointments ends at 14:00 and option is set to 10 → then start time for next option will be at 14:10)
  3. ***Granularity of time options*** - describes how often are Time Options on the second screen shown
  4. **Max extra added travel distance from previous location to next one **- options that require more travel then shown will be filtered out
  5. **Do not show options in the past **- if enabled, it will assume that mechanic will start traveling at the moment of planning from the last known location.  
So for example, if mechanic has a work scheduled between 12 and 13 in Zaandam, and planner search a option for task in Amsterdam at 1400, first available option for this one will be 1400 + travel time from Zaandam to Amsterdam (as if mechanic will travel from Zaandam starting now)
3. **Resource Settings**
  1. **Do not Show Resources with missing skills** → if this is de-activated - it will show all resources if even skills are not assigned to them. If it is activated → there will be no options checked for resources that do not have skills assigned to Work Order
  2. **Automatically filter out resources based on distance to Start Location - **if enabled, it will pre-filter resources which are closer to the location of a work order based on setting below
  3. ***Default Resource Groups***** **(ServicePoints or service at customers location)
  4. ***Resource Group(s)***** names that provide service on ServicePoints** comma-separated

Extra Settings (in second tab, should not be changed)  


![image-20260410-085614.png](media://35ddd310-daf5-40e5-aa77-d800b5d4e9ad)

 

- *User Google Maps API for Travel distance and time -* if disabled, there will be “as crow flies” distance shown, and travel time will be roughly indicative (1 km for 1 minute + few minutes extra)
- Cache - should always be enabled
- *Use Google Routes API - *Enable this option to use with custom Maps API key. *Important:* Create a new Remote Site Setting for Routes API here.
- Enable Preferred Resources using custom extension class  
It is possible to use a custom apex class to specify “preferred” resource for a work order.   
Apex class takes as a parameter a work order id and set of resource ids, and expected to return a set for “preferred” resource ids.  
Example of an Apex Class that should implement Callable interface
  This is how it will look in Schedule an Appointment component
  

## :note:   Important Implementation Details

It is necessary to ensure that in case if a custom Google Maps API key is used - then Distance API and/or Routes API should be enabled for it. Otherwise an errors like will occur.

`Problem with distance calculation: This API project is not authorized to use this API`

`Problem with distance calculation: Requests to this API routes.googleapis.com method google.maps.routing.v2.Routes.ComputeRouteMatrix are blocked.`

![image-20250523-122825.png](media://f26b78bf-48f5-4659-88a1-fc951ffa06e8)

**Creating new Remote Site Setting for Routes API**

Navigate to Setup → Remote Site Settings → Click New Remote Site

|  |  |
| --- | --- |
| Remote Site Name | GoogleRoutes |
| Remote Site URL | [https://routes.googleapis.com](https://routes.googleapis.com) |
| Active | checked |