How to Split Orders in Shopify Flow to Exclude Non-Fulfillable Products

Sometimes merchants sell products in their Shopify store that cannot be fulfilled by their fulfillment partner. A common example is when you sell a bundle product: a virtual product that doesn’t physically exist as a single SKU, but is instead made up of multiple other products.

If you send this “bundle” line item to your fulfillment company, they won’t know what to do with it—since it’s not a real product to be picked and packed. To solve this, you can use Shopify Flow together with the Admin API to split these orders automatically.


The Problem

  • You have orders that contain a bundle-product SKU.
  • Your fulfillment partner should only receive the real physical products.
  • Without adjustments, the bundle-product line item would be sent to the fulfillment partner, causing errors.

The Solution

We set up a Shopify Flow automation that:

  1. Triggers when an order is created and paid.
  2. Checks each fulfillment order for line items.
  3. If a line item has the SKU bundle-product, we split it from the fulfillment order.
  4. The split item is moved to a different location so it won’t be sent to the external fulfillment company.

This way, your fulfillment partner only gets what they can actually fulfill.


This will be the result of an order in shopify which has the mentioned sku

The Flow Setup

Here’s what the Shopify Flow looks like:

Step-by-step:

  1. Trigger: Order created → Check if fully paid.
  2. Loop: For each fulfillment order, check the line items.
  3. Condition: If the SKU is equal to bundle-product.
  4. Action 1: Split the fulfillment order (remove the bundle line item).
  5. Action 2: Move the split fulfillment order to a different location (so it won’t be sent to the fulfillment company).

Admin API Requests

The magic happens with two Admin API requests inside Flow.

1. Split the Fulfillment Order

This separates the bundle-product from the main fulfillment order:

{
    "fulfillmentOrderSplits": [
        {
            "fulfillmentOrderLineItems": [
                {
                    "id": "{% for lineItems_item in fulfillmentOrdersForeachitem.lineItems %}{% if lineItems_item.sku =='bundle-product' %}{{lineItems_item.id}}{% endif %}{% endfor %}",
                    "quantity": 1
                }
            ],
            "fulfillmentOrderId": "{{fulfillmentOrdersForeachitem.id}}"
        }
    ]
}

2. Move the Split Fulfillment Order

After splitting, we move the item to a specific location (instead of sending it to the fulfillment company):



{
    "id": "{% for fulfillmentOrderSplits_item in sendAdminApiRequest.fulfillmentOrderSplits %}{{fulfillmentOrderSplits_item.remainingFulfillmentOrder.id}}{% endfor %}",
    "newLocationId": "gid://shopify/Location/{LOCATION_ID}"
}

👉 You can find your LOCATION_ID in Shopify Admin → Settings → Locations. When you click on a location, the ID will be in the URL.



if your location id = 123, the value should be gid://shopify/Location/123


Why This Is Helpful

  • Prevents errors when sending orders to fulfillment partners.
  • Ensures only fulfillable products are sent out.
  • Automates the process—no manual intervention needed.
  • Keeps fulfillment clean and efficient.

Final Thoughts

This approach is especially useful for merchants who use bundles, digital products, or custom items that shouldn’t go to a fulfillment partner. With Shopify Flow and the Admin API, you can fully automate the process of splitting and redirecting those items, saving time and preventing fulfillment mistakes.

Leave a Reply

Your email address will not be published. Required fields are marked *