Calendar Sync

Each Resource has the ability to synchronize with their own external calendar application using either a Google or Outlook email address. For more information about how availability results are returned please see Availability Factoring.

📘

Relavent Endpoints

POST /setup/v1/resources
PUT /setup/v1/resources/{id}
PUT /setup/v1/resources/bulk
GET /setup/v1/resources/{id}/calendar/auth/google/{googleEmailAddress}
GET /setup/v1/resources/{id}/calendar/auth/outlook/{outlookEmailAddress}

Creating a Resource with Google or Outlook calendar integration via the API

This section discusses how calendar appointment posting and availability for Google & Outlook calendars gets set up and functions.

POST /setup/v1/resources

Setting up external calendar integration can be done when you first create a resource or later if necessary. There are four pieces to a successful integration.

    1. The Google or Outlook username
    1. The return URL, which tells the system where to redirect the resource to after the calendar has been authorized.
    1. The authorization of the external calendar. This authorization allows OnSched to post appointments to the resources external calendar.
    1. If you would like to use the external calendar during the availability calculation, you must define which external calendar you want us to access when determining your availability. You may set Google: 1, Outlook: 2 or None: 0 for calendarAvailability.

📘

Relevant Fields and Definitions

calendarAvailability Use which calendar to access availability (options 0, 1 or 2)

googleAuthReturnUrl User supplied return Url
googleCalendarId User supplied Google email address
googleCalendarAuthUrl OnSched field - Authorization link created by OnSched
googleCalendarAuthorized OnSched field - True if authorization was successful

outlookAuthReturnUrl User supplied return Url
outlookCalendarId User supplied Outlook email address
outlookCalendarAuthUrl OnSched field - Authorization link created by OnSched outlookCalendarAuthorized OnSched field - True if authorization was successful

In the query parameters of the POST Resource endpoint you need include either the googleAuthReturnUrl or the outlookAuthReturnUrl. Enter the appropriate Url of the page that you want to redirect back to after the resource successfully authorizes their calendar.

In the body of the post resource body, you will find the relevant fields in the “options” section.

"options": {
    "effectiveDate": "2021-03-17T20:11:34.465Z",
    "notificationType": 0,
    "displayColor": "string",
    "googleCalendarId": "string",
    "outlookCalendarId": "string",
    "ignoreBusinessHours": true,
    "gender": "string",
    "hourly": 0,
    "calendarAvailability": 0,
    "bookingNotification": 0,
    "sortKey": 0,
    "bioLink": "string"
}

Google Calendar

To connect to a Google Calendar you must use a Google email address, this may be an @gmail or @company email address as long as it is hosted by Gmail. To connect your account, enter the Google email address as the Google Calendar ID, then save and click the link that is generated in order to sign in and allow OnSched to connect with your Calendar.

👍

googleCalendarId

The “Google email address” of the resources calendar you want to integrate with

To connect to a Google Calendar you must use a Google email address, this may be an @gmail or @company email address as long as it is hosted by Gmail. To connect your account, enter the Google email address as the Google Calendar ID, then save and click the link that is generated in order to sign in and allow OnSched to connect with your Calendar.

Outlook Calendar

To connect to an Outlook Calendar you must use an Outlook email address, this may be an @outlook, @hotmail, @live, or @company email address as long as it is hosted by Microsoft. To connect your account, enter the Outlook email address as the Outlook Calendar ID, then save and click the link that is generated in order to sign in and allow OnSched to connect with your external calendar.

👍

outlookCalendarId

The “Outlook email address” of the resources calendar you want to integrate with

To connect to an Outlook Calendar you must use an Outlook email address, this may be an @outlook, @hotmail, @live, or @company email address as long as it is hosted by Microsoft. To connect your account, enter the Outlook email address as the Outlook Calendar ID, then save and click the link that is generated in order to sign in and allow OnSched to connect with your external calendar.

❗️

Outlook Desktop

OnSched requires your external calendar to be cloud-based in order for the two to synchronize. Since Outlook Desktop is not cloud-based the 2-way sync feature may not be used. Should you require your appointments to be sent to an Outlook Desktop account, a .ics file may be added to the Resource email notifications which will allow your Resources to click the link and it will drop into your desktop calendar.

2-Way Synchronization

OnSched uses a 2-way synchronization process which allows you to either send all booked appointments to your external calendar and/or allow OnSched to read your availability from your external calendar. Using the 2-way option you may add events to your external calendar in order to block out times within your OnSched calendar availability without the need to visit the OnSched Portal at all!

1-Way Sync

2-Way Sync

Sends appointments booked in OnSched to the synched external calendar, but does not read events created in that calendar

Sends appointments to external calendar, and reads events created in that calendar and blocks within the OnSched Portal


Did this page help you?