Skip to content

Shopify Dude Fix

Shopify Order Routing Functions Can Rank Multiple Fulfillment Groups: What the Beta Actually Does

Shopify’s unstable order routing Function API can rank locations across fulfillment groups. Learn eligibility, ranking limits, caching and how to test split fulfillment safely.

Quick answer: Shopify’s unstable Order Routing Location Rule Function API can rank fulfillment locations across multiple fulfillment groups, not just within a single group. It is a request-only beta for eligible Shopify Plus merchants, not a replacement for fulfillment-order moves or a generally available way to split orders.
On this page

The routing problem behind the feature

Imagine an order with items that can ship from a warehouse and a retail location. A routing preference that looks correct for one group can produce a poor overall allocation when the order is split across multiple groups. The updated Function model makes cross-group ranking possible so custom logic can express broader location preferences. That is different from assigning an existing fulfillment order to a different location after purchase.

Check eligibility before building

Shopify documents the Order Routing Location Rule Function API under unstable. It is available only by request for Shopify Plus merchants, and merchants need the Shopify Partners setup described in the documentation to deploy custom apps and location rules. Don’t promise this capability to every merchant or deploy an unstable schema as though it were a stable API.

Design the rule around constraints, not just priorities

  1. Document the actual business objective: nearest qualified warehouse, product-specific finishing location, market-specific dispatch, capacity balancing, or inventory rotation.
  2. Identify the fulfillment groups and eligible locations in the Function input. A location must be associated with a group to be ranked.
  3. Generate a deterministic location ranking. Keep the rule explainable: for example, prefer a dedicated finishing location for qualifying merchandise, then rank remaining eligible warehouses.
  4. Preserve Shopify’s inventory, fulfillment and delivery constraints. A location ranking is a preference signal, not permission to fulfill unstocked items or bypass fulfillment services.
  5. Use a post-order fulfillment-order split/move workflow for requirements that genuinely occur after order creation. Do not assume routing Functions perform those administrative actions.

The documented target is cart.fulfillment-groups.location-rankings.generate.run. To scaffold a prototype in an eligible development environment:

shopify app generate extension --template order_routing_location_rule

Inspect the generated Function’s input query and output schema for your installed unstable version before adding ranking operations. Shopify may reuse a prior routing result for the same delivery-related data for up to 15 minutes, so a changing external capacity signal is not guaranteed to be recalculated on every page view.

Where the beta runs

Shopify documents support for B2B, checkout, cart, Create Order API and draft orders, with limitations on POS and order editing. It does not support recurring subscription orders. These differences matter when testing a warehouse policy that must behave consistently across storefront, back-office and B2B sales.

Common misunderstanding: Ranking multiple fulfillment groups does not mean a Function can freely move or split any fulfillment order after checkout. Routing decisions and post-order fulfillment-order operations are different parts of the workflow. Also, unstable and request-only beta are not production-wide availability claims.
How to test this

  1. Confirm the merchant is enrolled in the beta before generating the extension.
  2. Set up two products, two eligible locations and a mixed cart that yields multiple fulfillment groups.
  3. Capture the Function input and resulting location rankings; verify every ranked location belongs to the intended group.
  4. Test one-location stockouts, different delivery addresses, B2B purchasing context and mixed quantities.
  5. Repeat a request within 15 minutes, then after delivery data changes; account for routing-result caching.
  6. Place test orders and inspect the resulting fulfillment orders. Verify that any separate split/move automation still behaves correctly.
  7. Check unsupported surfaces before enabling the rule in a real operational workflow.