Skip to main content

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.
  • maxFulfillments cannot exceed the number of included buildings. It caps how many ways an order may split; a backordered remainder sits outside it.
  • shortfallPolicy says what becomes of units no building can source. It defaults to BACKORDER_REMAINDER.
  • A strategy that sets destinationGrouping accepts only the policies that place every unit, BACKORDER_REMAINDER and SINGLE_FULFILLMENT, because the splitter refuses an order it cannot plan in full for a destination.
  • fallbackWarehouseId is 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, maxFulfillments exceeds 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_strategy permission
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.