Skip to main content

system.kanoa.lot.updateRoute(routeInfo, userId)

Updates a route. A route can be associated with an itemId or an itemClassId


Parameters

routeInfo Dictionary: All keys are required unless otherwise stated.

- enabledBoolean
- itemClassIdIntegerAn itemId or an itemClassId is required
- itemIdIntegerAn itemId or an itemClassId is required
- routeDescriptionStringNot required
- routeIdInteger
- routeNameString

userId Integer


Returns

# of records modified Integer
message String None if success


Example

# Update an existing route with a new description
routeInfo = {
"routeId": 12,
"routeName": "Assembly Line 3",
"routeDescription": "Updated assembly flow for Widget C",
"itemId": 102,
"itemClassId": None,
"enabled": True
}
recordsModified, msg = system.kanoa.lot.updateRoute(routeInfo=routeInfo, userId=123)

# Disable a specific route
routeInfo = {
"routeId": 15,
"routeName": "Packaging Route",
"routeDescription": "Temporarily disabled for maintenance",
"itemId": 205,
"itemClassId": None,
"enabled": False
}
recordsModified, msg = system.kanoa.lot.updateRoute(routeInfo, 123)