registerRoutingStrategy
Registers a new routing strategy for the current company.
Business Rules
- The name is required, must be 1-255 characters, and unique within the company.
- Every building must belong to the current company.
maxFulfillmentscannot exceed the number of included buildings. It caps how many ways an order may split; a backordered remainder sits outside it.shortfallPolicysays what becomes of units no building can source. It defaults toBACKORDER_REMAINDER.- A strategy that sets
destinationGroupingaccepts only the policies that place every unit,BACKORDER_REMAINDERandSINGLE_FULFILLMENT, because the splitter refuses an order it cannot plan in full for a destination. fallbackWarehouseIdis retired and must be omitted or null.
Error Scenarios
- **
NOT_FOUND**: when the company or a building does not exist. - **
BAD_REQUEST**: when the name is missing, too long or already 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:register_routing_strategypermission
registerRoutingStrategy(
input: RegisterRoutingStrategyInput!
): RoutingStrategy
Arguments
registerRoutingStrategy.input ● RegisterRoutingStrategyInput! non-null input common
Parameters for RegisterRoutingStrategy
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.