SchedulingGroups
Segments users into groups within a Teams schedule to streamline shift assignments and reporting.
Table Specific Information
Select
Query the SchedulingGroups table by retrieving everything from teams or by specifying TeamId with = and IN operators. By default only the scheduling groups for teams of the groups you are a member of will be returned. To retreive scheduling groups for teams of all groups in your organization, set IncludeAllGroups property to true. The add-in will use the Microsoft Teams API to process WHERE clause conditions built with the following columns and operators. The rest of the filter is executed client side within the add-in.
- TeamId supports the '=' and IN operators.
- Id supports the '=' operator.
For example, the following query is processed server side:
SELECT * FROM SchedulingGroups WHERE TeamId = 'da838338-4e77-4c05-82a6-79d9f0274511' AND Id = 'TAG_357350ce-2fa2-498d-9967-494296509c32'
Insert
To insert a scheduling group for a team, you need to specify TeamId and at least one another field among DisplayName, IsActive, iconType.
INSERT INTO SchedulingGroups (TeamId, DisplayName, IsActive) VALUES ('da838338-4e77-4c05-82a6-79d9f0274511', 'Cashiers', 'true')
Update
To update a scheduling group Id and TeamId are required in WHERE clause. You can update DisplayName and IsActive fields.
UPDATE SchedulingGroups SET DisplayName = 'Supervisors' WHERE Id = 'TAG_357350ce-2fa2-498d-9967-494296509c32' AND TeamId = 'da838338-4e77-4c05-82a6-79d9f0274511'
Delete
To delete a scheduling group Id and TeamId are required in WHERE clause.
DELETE FROM SchedulingGroups WHERE TeamId = 'acabe397-8370-4c31-aeb7-2d7ae6b8cda1' AND Id = 'TAG_101f11df-e7c0-49f2-8d5c-a9ad085c97aa'
Columns
| Name | Type | ReadOnly | Description |
| Id [KEY] | String | False |
The unique identifier for the scheduling group within the team. |
| TeamId | String | False |
The identifier of the Microsoft Team to which this scheduling group belongs. |
| CreatedDateTime | Datetime | False |
The date and time when the scheduling group was initially created. |
| LastModifiedBy_application_displayName | String | False |
The display name of the application that most recently modified the scheduling group. |
| LastModifiedBy_application_id | String | False |
The application ID of the app that last updated the scheduling group. |
| LastModifiedDateTime | Datetime | False |
The date and time when the scheduling group was last modified. |
| DisplayName | String | False |
The name displayed for the scheduling group in Microsoft Teams. |
| IsActive | Bool | False |
Indicates whether the scheduling group is currently active and available for use when creating or modifying shifts and schedules. |
| UserIds | String | False |
A comma-separated list of user IDs who are members of this scheduling group. Each ID represents a user assigned to this group. |