The availability endpoint is where you query the availability of your resource(s) in order to know what time and day that resource is available to be booked. This endpoint also incorporates service availability as well other blocking factors like resource blocks. Of course, times zones also impact the results so be sure to keep an eye on those. Here is an overview of all the layers of availability factoring allowed.
GET /consumer/v1/availability/{serviceId}/{startDate}/{endDate}
Availability Factoring
Availability factoring is done by checking multiple layers of availability before returning the appointment results: Business Location, Calendar, Resource(s), and Service are the key ones. Below is a breakdown.
Location Business Hours, Public Holidays, Book Ahead/In Advance Restrictions
Calendar Weekly Calendar Availability, Calendar Blocks, Recurring Calendar Blocks
Resource Weekly Resource Availability, Resource Blocks, Recurring Resource Blocks, 2-Way-Sync Calendar Blocks (if applicable)
Service Weekly Service Availability, Service Blocks, Recurring Service Blocks
Needless to say, the OnSched availability function is quite complex, especially is you are offering services that are being provided by resources in different time zones.
Availability Results Analysis (debug)
A typical scenario is a company sets up their services and their resources and when they look at the availability, they are wondering why some appointments are not showing up in their calendar for booking as expected.
If you are seeing results that do not make sense, the best way to tackle this problem is to run the availability "unavailable" endpoint.
GET /consumer/v1/availability/{serviceId}/{startDate}/{endDate}/unavailable
The result of this query will tell you when your appointments are not available, and conversely available. Once you know what is clearly unavailable it is easier to see where your resulting appointment time slots should be.
Within the unavailable endpoint you will see the following result types:
BAV Business Availability (Hours)
SAV Schedule (Calendar) Availability (Weekly)
SAB Schedule Availability Block (Calendar Block)
RAV Resource Availability (Weekly)
RAB Resource Availability Block
VAV Service Availability
VAB Service Availability Block
RES Resource is not Active (Effective date entered)
TP Time Past
PBH Public Business Holiday
GCU Google Calendar Unavailable
OCU Outlook Calendar Unavailable
Once you know when everything is NOT AVAILABLE it’s a much easier to see why you are getting the results you are.
Important
When calling the unavailable endpoint make sure you pass in the same parameters that you passed into the original availability call.
Also check your location configurations. Online booking settings like Book Ahead impact results as do various time zone settings associated with the location, resources and services.
Comments
0 comments
Please sign in to leave a comment.