supplyScheduleOrder
Schedules a supply order by setting its production timeline dates.
Authentication Requirements
Requires the supply:schedule_orders permission for the brand.
Business Rules
- Supply order must exist and belong to the authenticated brand
- Order must be in a valid status that allows scheduling transitions
- Start date must be before end date
- Target date (if provided) must be greater than or equal to end date
- Successfully scheduling an order transitions it to 'scheduled' status
Behavior
This mutation creates a scheduling event that updates the order's production timeline and automatically changes the order status to 'scheduled'. The scheduled order becomes non-editable and inventory pre-allocation is locked.
Possible Errors
- **GraphQL::ExecutionError**: "Supply order not found" - Order doesn't exist or doesn't belong to brand
- **ScheduleOrderError**: "Cannot schedule order from status..." - Order status does not allow scheduling
- **ScheduleOrderError**: "Start date must be before end date" - Invalid date range
- **ScheduleOrderError**: "Target date must be greater than or equal to end date" - Invalid target date
- **GraphQL::ExecutionError**: Authentication error - Missing or insufficient permissions
supplyScheduleOrder(
input: SupplyScheduleOrderInput!
): SupplyOrder!
Arguments
supplyScheduleOrder.input ● SupplyScheduleOrderInput! non-null input
Parameters for SupplyScheduleOrder
Type
SupplyOrder object
Represents a supply order in the supply chain management system.
Supply orders manage the flow of materials and products through different stages of the supply chain including manufacturing, assembly, and procurement operations. Each order tracks progress, costs, timelines, and associated items.
Order Types
- **Manufacturing**: Orders for producing new products from raw materials
- **Assembly**: Orders for assembling products from components
- **Procurement**: Orders for purchasing materials or products
Status Lifecycle
Orders progress through various statuses from pending to completed, with tracking of approval and completion by different parties.
Related Data
Each order includes associated items, warehouse/location information, party assignments, and comprehensive tracking of dates, costs, and performance metrics.