Schedules
Returns business hour schedules, including name, time zone, and interval details.
Table-Specific Information
Select
The following query is processed server-side while other filters are processed client-side within the provider.SELECT * FROM Schedules WHERE Id = '123'
Insert
The Name and TimeZone columns are required to insert. This operation is allowed for logged-in users with the "admin" role only.
INSERT INTO Schedules (Name, TimeZone) VALUES ('test', 'Eastern Time (US & Canada)')
Update
You must specify the Id of the schedule to update. This operation is allowed for logged-in users with the "admin" role only.
UPDATE Schedules SET Name = 'EMEA', TimeZone = 'London' WHERE Id = '123'
You can update the intervals of a schedule by issuing a separate update statement.
UPDATE Schedules SET Intervals = '[{\"start_time\": 3420, \"end_time\": 3900}]' WHERE Id = '123'
Delete
You must specify the Id of the schedule to delete it. This operation is allowed for logged-in users with the "agent" role.
DELETE FROM Schedules WHERE Id = '123'
Columns
| Name | Type | ReadOnly | References | Description |
| Id [KEY] | Long | True |
The Id automatically assigned to the schedule upon creation. | |
| Name | String | False |
The name of the schedule. | |
| TimeZone | String | False |
The time zone of the schedule. | |
| Intervals | String | False |
The array of time intervals defined for the schedule. | |
| CreatedAt | Datetime | True |
The time the schedule was created. | |
| UpdatedAt | Datetime | True |
The time the schedule was last updated. |