Skip to content

Availability | Schedules

Hemal Varambhia edited this page Jul 25, 2019 · 4 revisions

A persons schedule can also be Imported into the system using the Importer. A sample of the JSON below shows how someone can be made available on weekdays 9:00 to 17:00 and weekends 9:00 to 12:00.

{
  "name": "Billy Bob",
  "schedules": [
    "schedules_type": "custom",
    "shift_patterns": [
       {
          "frequency": "weekly",
          "start_date": "2019-01-01T00:00:00",
          "start_time": "09:00",
          "end_time": "17:00",
          "by_day": [
             "monday",
             "tuesday",
             "thursday",
             "friday"
          ],
          "except_date": [],
          "object_type": "shift_pattern",
          "company_external_ids": [ "12345678" ]
       },
       {
          "frequency": "weekly",
          "start_date": "2019-01-01T00:00:00",
          "start_time": "09:00",
          "end_time": "12:00",
          "by_day": [
             "saturday",
             "sunday"
          ],
          "except_date": [],
          "object_type": "shift_pattern",
          "company_external_ids": [ "87654321" ]
       }
     ],
     "object_type": "schedule"
  ]
}

You may wish to setup a repeating pattern of availability instead of specific days. For that you can use a method called shift patterns.

here

https://github.com/BookingBug/importer-guide-and-tools/tree/master/examples

If you want to split someones shift into two halves (maybe because of a lunch time) this can also be done.

{
  "name": "Billy Bob",
  "schedules": [
    {
      "when": "2018-07-01",
      "shift": [
        {
          "start_time": "09:00",
          "end_time": "12:00"
        },
        {
          "start_time": "13:00",
          "end_time": "17:00"
        }
      ]
    }
  ]
}

Clone this wiki locally