Servicely Configuration
Schedule
10 min
javascript knowledge is recommended schedules are used to define either working hours or holidays for the purpose of service level management (slm) docid 8mviwggwq0fxgcrnt1epi configuration list schedules to find the existing list of schedules, find administration > configuration > schedules navigation menu and click on “schedules” create schedules to create a schedule, populate the following fields and click on the create button field name field type example name string monday to friday 9am to 5pm, no public holidays number auto sequence \<you may leave this blank> description string weekly schedule of monday to friday 9am to 5pm without public holidays active boolean true script script examples public holidays public holidays can be defined as a separate schedule record name it accordingly, e g “australia core holidays 2023” and you may use script below as example and substitute the dates accordingly schedulemanager create() withgenerator( rangegenerator( rangegenerator holiday, { holidays \[ new datetime(\[2023, datetime january, 1]), // new years day new datetime(\[2023, datetime january, 28]), // australia day new datetime(\[2023, datetime april, 7]), // good friday new datetime(\[2023, datetime april, 25]), // anzac day new datetime(\[2023, datetime june, 12]), // king's birthday new datetime(\[2023, datetime december, 25]), // christmas day new datetime(\[2023, datetime december, 26]) // boxing day ] } ) ); you will need to update this yearly if some of the dates you put in change every year public holidays adding to another set of public holidays if a location like a province or a state has their own public holidays on top of the state one, for example victoria state having their own holidays on top of the australian national holiday, you can create a different schedule for them and then include the national holiday schedule record by its name schedulemanager create() withgenerator( rangegenerator( rangegenerator holiday, { holidays \[ datetime(\[2023, datetime september, 29]), // friday before afl grand final datetime(\[2023, datetime november, 7]) // melbourne cup ] } ) ) include('australia core holidays 2023'); you will need to update this yearly if some of the dates you put in change every year working schedule with public holidays similar to a public holiday schedule can include another schedule, schedules for working hours can also do the same thing example below if we have a monday to friday 9am to 5pm schedule with victoria public holidays included slas using this schedule will not run its clock on the included public holidays schedulemanager create() withgenerator( rangegenerator( rangegenerator workday, { starthour 9, endhour 17 } ) ) include('victoria holidays 2023'); schedule with non rounded hours to configure a schedule that for example runs monday to friday, 9 45am to 4 20pm schedulemanager create() withgenerator( rangegenerator( rangegenerator workday, { starttime \[9,45,0], endtime \[16,20,0] } ) ); working schedule 24 x 7 usually applicable for high priority tickets like a priority 1, to which your organisation may be obligated to work through to resolution regardless of time and day schedulemanager create() withgenerator( rangegenerator( rangegenerator workday, { starthour 0, endhour 24, workdays \[ datetime monday, datetime tuesday, datetime wednesday, datetime thursday, datetime friday, datetime saturday, datetime sunday ] } ) ); working schedule with different set of hours if you need to configure a schedule for two different set of hours for different days in the week, for example 9am to 5pm on monday and friday and 11am to 4pm on saturday and sunday schedulemanager create() withgenerator( rangegenerator( rangegenerator workday, { starthour 9, endhour 17 } ) ) withgenerator( rangegenerator( rangegenerator workday, { starthour 11, endhour 16, workdays \[ datetime saturday, datetime sunday ] } ) );