updateRoutingStrategy
Updates an existing routing strategy. Only the provided fields change.
Business Rules
- The strategy must exist within the current company.
- At least one field must be provided.
- A provided name must be 1-255 characters and unique within the company.
- Provided buildings must belong to the current company, and
maxFulfillmentscannot exceed the included buildings. shortfallPolicysays what becomes of units no building can source. The rule is the resulting pair, not either field alone: whether the policy arrives on this update or is already stored, it must be one that places every unit —BACKORDER_REMAINDERorSINGLE_FULFILLMENT— oncedestinationGroupingis set.- Pass
destinationGroupingas null to return the strategy to unsplit routing. fallbackWarehouseIdis retired and must be omitted or null.
Error Scenarios
- **
NOT_FOUND**: when the strategy or a building does not exist. - **
BAD_REQUEST**: when no field is provided, the name is invalid or in use, the strategy is unknown,maxFulfillmentsexceeds the included buildings, the shortfall policy is unknown or is one the destination grouping disallows, or a fallback building is given.
Permissions Required
orders:update_routing_strategypermission
updateRoutingStrategy(
input: UpdateRoutingStrategyInput!
): RoutingStrategy
Arguments
updateRoutingStrategy.input ● UpdateRoutingStrategyInput! non-null input common
Parameters for UpdateRoutingStrategy
Type
RoutingStrategy object orders
Routing Strategy
A reusable, company-owned definition of how an order's fulfillments are split across buildings: which buildings and in what priority, the algorithm, and the maximum number of fulfillments. Applied to an order to create its fulfillments.