Mutation
mutation SyncUserWorkingHours($input: SyncUserWorkingHoursInput!) {
syncUserWorkingHours(input: $input) {
userWorkingHours {
id
userId
timezone {
name
}
isEnabled
nextStatusTransitionAt {
unixTimestamp
iso8601
}
nextStatusTransitionTo
}
error {
message
type
code
fields {
field
message
type
}
}
}
}Variables
{
"input": {
"timezone": "string",
"isEnabled": true,
"slots": [
{
"weekday": "MONDAY",
"startsAt": "string",
"endsAt": "string"
}
]
}
}Response
{
"data": {
"syncUserWorkingHours": {
"userWorkingHours": {
"id": "id",
"userId": "id",
"timezone": {
"name": "string"
},
"isEnabled": true,
"nextStatusTransitionAt": {
"unixTimestamp": "string",
"iso8601": "string"
},
"nextStatusTransitionTo": "ONLINE"
},
"error": {
"message": "string",
"type": "VALIDATION",
"code": "string",
"fields": [
{
"field": "string",
"message": "string",
"type": "VALIDATION"
}
]
}
}
}
}Mutations
syncUserWorkingHours
Replace a user’s working hours schedule in full. When isEnabled is true, the user’s status is automatically switched to ONLINE at the start of each slot and to OFFLINE or AWAY (depending on workspace settings) at the end. Omit userId to configure the currently authenticated user’s own schedule.
MUTATION
syncUserWorkingHours(input: SyncUserWorkingHoursInput!): SyncUserWorkingHoursOutput!Arguments
input
required
Returns
userWorkingHours
error
Mutation
mutation SyncUserWorkingHours($input: SyncUserWorkingHoursInput!) {
syncUserWorkingHours(input: $input) {
userWorkingHours {
id
userId
timezone {
name
}
isEnabled
nextStatusTransitionAt {
unixTimestamp
iso8601
}
nextStatusTransitionTo
}
error {
message
type
code
fields {
field
message
type
}
}
}
}Variables
{
"input": {
"timezone": "string",
"isEnabled": true,
"slots": [
{
"weekday": "MONDAY",
"startsAt": "string",
"endsAt": "string"
}
]
}
}Response
{
"data": {
"syncUserWorkingHours": {
"userWorkingHours": {
"id": "id",
"userId": "id",
"timezone": {
"name": "string"
},
"isEnabled": true,
"nextStatusTransitionAt": {
"unixTimestamp": "string",
"iso8601": "string"
},
"nextStatusTransitionTo": "ONLINE"
},
"error": {
"message": "string",
"type": "VALIDATION",
"code": "string",
"fields": [
{
"field": "string",
"message": "string",
"type": "VALIDATION"
}
]
}
}
}
}Was this page helpful?

