Skip to main content

system.kanoa.shift.addShiftBlock(scheduleBlockInfo, userId)

Adds a new shift block. All shiftBlockInfo keys are required


Parameters

scheduleBlockInfo Dictionary

- crewSizeFloat
- endDateDateTime
- rruleStrStringNone if this is not a recurring event
- shiftIdInteger
- startDateDateTime

userId Integer: Id of user executing the function


Returns

shiftBlockId Integer


Example

shiftBlockInfo = {
'shiftId': 1,
'startDate': system.date.parse("2025-11-05 06:00:00"),
'endDate': system.date.parse("2025-11-05 13:00:00"),
'rruleStr': None,
'crewSize': None
}
shiftBlockId = system.kanoa.shift.addShiftBlock(shiftBlockInfo, 123)