November 18, 2026 · 5 min read

Order Routing Functions Across Fulfillment Groups: What Changes?

Shopify order routing can now batch identical location rankings across fulfillment groups. Learn the input query, limits, and safe fallback.

Order Routing Functions Across Fulfillment Groups: What Changes?

Order Routing Location Rule Functions can now apply one identical location ranking to multiple fulfillment groups, rather than returning a separate ranking operation for every group. The change reduces output for split carts, but it does not turn location ranking into a global fulfillment optimizer: eligibility and ranking still have to make sense for each group.

Key takeaways

  • The multi-group operation is available in the unstable Function API, not something to assume exists in a pinned 2026-10 build.
  • Batch groups only when they genuinely need identical rankings; otherwise emit a separate operation per group.
  • Query group handles and eligible location handles first, then add only the location or line fields your rule uses.
  • A lower rank wins, but ranking a location does not make it eligible for a group.

What changed, exactly?

On November 5, 2026, Shopify added the ability to rank locations across multiple fulfillment groups. Previously, the straightforward output was one fulfillmentGroupLocationRankingAdd operation per group. The unstable schema also describes a multi-group operation: one rankings list and a fulfillmentGroupHandles list. Shopify treats it as equivalent to applying the same single-group operation to each listed group, in list order. Unknown group handles are ignored.

This is principally an output-shape improvement. A cart split into several groups can produce repetitive output when the same warehouse-first policy applies to every group. Batching those operations reduces that repetition and helps avoid the Function output-size limit. It does not merge the groups or promise that all their lines will ship from one warehouse. Compare the unstable reference with the 2026-10 reference before changing a deployed extension.

ApproachUse it whenTrade-off
One operation per groupDestination, products, or eligible locations differMore output, but each decision is explicit
One multi-group operationThe groups require the same location handles and ranksSmaller output, but a careless batch can hide group-specific rules
Shopify's configured routing rulesStandard priorities meet the requirementLess custom control and no Function code to maintain

Structure the input query around the decision

The Function receives only fields selected in its input query. Start with group identity and eligibility, then join those handles to location data. For a warehouse-first rule backed by a location metafield, the Order Routing Location Rule schema supports a query shaped like this:

query RunInput {
  fulfillmentGroups {
    handle
    inventoryLocationHandles
  }
  locations {
    handle
    metafield(namespace: "routing", key: "warehouse") {
      value
    }
  }
}

Here, locations supplies attributes; each group's inventoryLocationHandles supplies its candidates. Do not rank every location returned by locations for every group. Shopify ignores a ranked location that is not among that group's inventory locations. If the policy depends on where a group is going, add fulfillmentGroups { deliveryAddress { provinceCode } }. If it depends on products, query lines under each group. Avoid pulling addresses, product data, and metafields merely because an example query includes them.

For a catalog with 10,000+ SKUs, I would keep the rule independent of product fields unless the routing policy truly needs them. Otherwise the query and decision path become harder to inspect for no benefit.

Build identical rankings before you batch

Implement the ranking as a pure per-group calculation first. For this example, a location whose routing.warehouse metafield has the string value "true" gets rank 0; other eligible locations get rank 1. Then batch only groups whose computed rankings are identical, including location handles and ranks.

const warehouseByHandle = new Map(
  input.locations.map((location) => [
    location.handle,
    location.metafield?.value === "true",
  ]),
);

const batches = new Map();

for (const group of input.fulfillmentGroups) {
  const rankings = group.inventoryLocationHandles
    .map((locationHandle) => ({
      locationHandle,
      rank: warehouseByHandle.get(locationHandle) ? 0 : 1,
    }))
    .sort((a, b) => a.locationHandle.localeCompare(b.locationHandle));

  const key = JSON.stringify(rankings);
  const batch = batches.get(key) ?? {fulfillmentGroupHandles: [], rankings};
  batch.fulfillmentGroupHandles.push(group.handle);
  batches.set(key, batch);
}

return {
  operations: [...batches.values()].map((batch) => ({
    fulfillmentGroupsLocationRankingAdd: batch,
  })),
};

Use your extension's unstable schema and generated types to validate the multi-group operation before deployment. Sorting here is for a stable comparison key, not to influence Shopify's choice: the rank values determine priority. This conservative batching scheme may miss opportunities to combine groups with different candidate sets, but it avoids pretending that their rankings are identical.

Where the new operation still falls short

The output contract and ranking rules impose boundaries worth testing explicitly:

  • It ranks eligible locations; it does not add candidates. A location handle outside a group's inventoryLocationHandles is ignored.
  • It cannot make a hard exclusion by omission. Omitted inventory locations rank last, so use an appropriate constraint when a location must not fulfill an item.
  • It does not guarantee a cross-group outcome. A shared preference is not a promise of one shipment, reserved capacity, or a globally cheapest allocation.
  • Other rules still matter. Shopify evaluates location-rule outputs by configured priority for each group and uses the next rule to break rank ties. Equal ranks are not a deterministic warehouse choice on their own.
  • Availability is limited. The API remains a request-only beta for Shopify Plus merchants. The documented surface support also varies; for example, order edits in admin apply the rule only to new items, while checkout order edits are unsupported.

There is a timing consideration, too. Shopify's Function reference says it can reuse a result for unchanged delivery-related cart data from the preceding 15 minutes. Do not assume that changing an external capacity figure will immediately change a checkout's routing result.

Verify the result with split carts

Test with an enrolled development store and a fixture containing at least two fulfillment groups. Inspect both the Function result and the eventual assigned locations:

  1. Give two groups identical eligible locations and assert that one multi-group operation contains both handles.
  2. Remove one eligible location from the second group and assert that the groups produce separate operations.
  3. Give groups different delivery provinces or product requirements, if your rule reads those fields, and check that the policy still evaluates each independently.
  4. Change the order-routing rule priority and test a tie; inspect which rule resolves it.
  5. Re-run after changing cart lines or delivery address, and account for cached results when interpreting repeated checkout tests.

The location-rule build tutorial still provides the single-group implementation pattern. Start there, make the per-group calculation correct, then add batching and assert that expanding every batch back into single-group operations produces the same rankings. That equivalence test is the safest next step before using the new output shape.

If you need this built rather than doing it in house, Lintel, the studio I run, takes on Shopify Functions development projects like this.

shopify functionsorder routingfulfillmentgraphqlshopify plus

Frequently asked questions

Can one Order Routing Function operation rank several fulfillment groups?

Yes. The unstable Order Routing Location Rule Function API supports a multi-group operation that applies an identical rankings list to the listed fulfillment groups. Check the schema version pinned by your extension before using it.

Does a multi-group ranking force every group to use the same warehouse?

No. Ranking expresses location preference within each group's eligible inventory locations. It does not merge groups, add eligible locations, or guarantee a single shipment.

Which fields belong in an order routing input query?

Start with fulfillment group handles, inventory location handles, and only the location attributes your ranking rule reads. Add group delivery addresses or lines only when the policy depends on them.

Seven years of Shopify, on one page.

Roles, projects, stack and certifications are on the resume.

Resume Download PDF LinkedIn