Use cases for one fulfillment with multiple fulfillment orders

Hello, I’m working on a fulfillment service app and noticed in the graphql docs that fulfillment entity can have multiple fulfillment orders. But at the same time each fulfillment belongs to 1 order and 1 fulfillment service/location, and line items from an order are grouped by location into 1 fulfillment order. Hence the question: how is it possible to have several fulfillment orders inside a single order for single shipping location, and even more so - to have a single fulfillment created for all/some of them?

I suppose this may happen due to:

  • stock issues (e.g. 4 items were ordered, but only 3 available at the moment, and after restock 1 more was requested)
  • order updates (e.g. “Item1” was ordered and later “Item2” was added)

But I’d like to know for sure if this is the case, and how often do situations like this occur

Hi there,

I made this happen during testing, ended up with several separate fulfillment orders for the same order and location but with different line_items. But I was messing about quite a bit so thats probably why it happened. Your thoughts are correct though, I forced it because of moving a line Item from one fulfillment location to another, and instead of adding it to the already existing fulfillment_order (even thought it was open) it simply created a new one.

If there are multiple fulfillment orders for the same order and the same location you can group them into a single fulfillment.

so line_items_by_fulfillment_order is an array right, so you just pack your separate fulfilment orders for the order into the array and voila. done and dusted.

I doubt it happens all too often but it would be a good idea to combine them into a single fulfillment.

Cheers,

Gary