Orphaned Split Fulfillment Being Left In Limbo?

I work with a lot of fulfillment flows lately, and they tend to be a lot of trouble when you’re mixing a third party fulfillment provider and some of the Shopify flow action blocks.

I have a Flow for when an order is “ready to be fulfilled”

We have several unfortunate duplicated trees, but there is one particular branch that will result in an action to “Move Fulfillment Location”, wait a moment, and then “Submit Fulfillment Request”.

On some recent runs, we have noticed that the “Move Fulfillment Location” had resulted in a fulfillment order being split. The subsequent “Submit Fulfillment Request” then submitted a fulfillment request for the sliver of a fulfillment order that was left behind post-split. The newly created split off fulfillment, the orphan, has been left in a limbo state! The fulfillment order exists, the location has inventory, and yet the creation of this fulfillment order did not seem to trigger a new instance of “Ready order to fulfill”, nor did the original “submit fulfillment request” try to submit fulfillment on the orphan (which I can understand, as it is not the original triggering fulfillment order anymore).

This has left many orders in a weird fulfillment state that we haven’t been able to easily automate. There seems to be no way to send a newly created fulfillment order through our Flow which evaluates a lot of business logic. The only solution is to somehow track down these orders before the auth expires, and then fulfill the order manually with the button choices.

Tracking down fulfillment flows has been the worst, and recently the only bandage I have been able to apply is to tag orders with the numerical fulfillment order id so I can search those in Flow runs.

It would be great if Flow could provide more detailed logs on the mutations the action blocks execute. As far as I can see a given order, now with 2 fulfillment orders, only has a single order ready to fulfill flow where the flow successfully moved fulfillment and submitted a request. Given the results, I would expect two fulfillment flows, 1 move fulfillment, 2 requests submitted.

Is this something that can be alleviated with additional fulfillment settings modifications or what? Do I send Workflow logs to Flow team members?

This is the worst time for fulfillment issues.

Could you use a scheduled time trigger + get fulfillment order data action to find those orphaned fulfillment orders and clean them up?

Alternatively, if you used the Send Admin API request to Move the location, you might be able to use the returned fulfillment order list and loop over them.

The hard part here Paul is identifying these orphaned fulfillment orders. This is a store that deals with omnichannel orders and order imports and market managers like Global E and protection services like Signifyd that leave most fulfillments open for a long time as they have elongated “review some data, wait a few hours, review again etc”. I can’t exactly tag fulfillment orders to see which ones haven’t started the process yet and which ones are in the middle.

Using the Admin API to move the fulfillment and read the data might work. If I move a fulfillment order, and the move results in a split fulfillment I assume I can get all resulting fulfillments back in a list? If the fulfillment order id is NOT the current one, I know an orphan of sorts was created and needs… well I don’t know what. That orphan may not be one I want to submit a fulfillment request on, but maybe it is?

Circling back to this now, and just thinking out loud.

A new thing I learned, and that if a Flow has many jobs still running, and the Flow is deactivated, then all running jobs are cancelled. This makes complete sense to me, I just didn’t expect there to be a Flow switch on a high order volume store during this weekend. This has resulted in 100s of unfulfilled orders left in an annoying limbo, and unfortunately it’s not possible to send an order through fulfillment flows ago with “More Actions” to say “hey, run all the fulfillments through this Flow for eval”

Our current fulfillment flow goes through many duplicate “then otherwise” chains of looking for Signified or GlobalE tags, and if they are not found we then wait x hours and check again until we either fulfill or the order goes to a dead end.

Because we cannot exactly tag / mutate a fulfillment order with data, it’s a little bothersome to try a “Get Data” based Flow for fulfillment orders. Frankly I just don’t know how to even begin to figure this out with Flow, and I feel like I have to move over to a custom solution with web hooks and DataJet to avoid these issues. Let’s say I go for get data… how do I avoid pulling the same fulfillment orders again and again? A fulfillment isn’t resolved right away, and can take between “right away” and 72 hours, I don’t know what kind of query I could dream of to say “Only get fulfillment order data for fulfillment data that have not reached this evaluation point” or “Only get fulfillment order data for fulfillment data that has reached this evaluation point” if I split the logic into multiple Flows.

If I go the custom route, I could listen for fulfillment web hooks, and then update the parent order with tags. I can listen to order/update and check for those tags by keeping track of the change in tags. If a new fulfillment based tag is added, I can delegate from there and let the cycle continue as such. This may be where I have to go with this, but now the client can’t easily modify this logic like they can with Flow blocks.