system.kanoa.shift.addShiftBlock(scheduleBlockInfo, userId)
Adds a new shift block. All shiftBlockInfo keys are required
Parameters
scheduleBlockInfo Dictionary
| - crewSize | Float | |
| - endDate | DateTime | |
| - rruleStr | String | None if this is not a recurring event |
| - shiftId | Integer | |
| - startDate | DateTime |
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)