We’re seeking assistance with a custom Shopify Flow workflow designed to identify and notify us about potentially missed pickups or stuck orders.
Desired Functionality:
Trigger: Flow should run automatically for orders meeting the following criteria:
Created within the last 2 days
Fulfilled status
Not cancelled
Shipping/transit status indicating the order is NOT in transit
Action: Send an email notification to a designated recipient(s) containing relevant order information.
Unfortunately, we haven’t been able to achieve the desired functionality with our current Flow setup. We’d appreciate any insights, suggestions, or existing solutions that could help us track and address these potentially missed pick-ups. Please see screenshots and query below:
created_at:<=‘{{ scheduledAt | date_minus: “2 days” }}’ AND fulfillment_status:fulfilled AND NOT status:cancelled AND fulfillments_item.inTransitAt is not NONE
Hi There, unfortunately the “inTransitAt” property of a fulfillment is not part of the orders query in the Admin GraphQL API (this is what backs the “Get Order Data” task). However, a condition could be used to ensure that at least one of the orders has a fulfillment that has no value for “inTransitAt” (see screenshot). This condition would replace the existing condition and count steps.
However the liquid is not filtering in any order numbers to return. I tried printing out both the count variables you created and and they are equivalent, so it is not registering these ‘empty’ inTransitAt fields… maybe it is always being evaluated as True even if it is empty? I haven’t used liquid before so I am trying to find the appropriate condition to try and flag these orders. I tried == empty, ==blank, and ==null.
I also tried printing out all of the inTransitAt records in the email, and see this error for some orders: {“inTransitAt”=>Maestro::Util::LiquidHelper::MissingVariableDrop}
So inTransitAt appears to be missing which makes sense, but any idea how to check for this in the liquid so that these orders are flagged?
Also, is there any way to test the liquid more easily? It is a challenge to experiment with as we only get one flow run every email. Also if there’s any other more detailed liquid documentation that would be helpful. Much appreciated!
I tried your logic and I am no longer getting that “MissingVariableDrop” error, but these ‘empty’ inTransitAt dates are still not getting flagged. When I print out the field in quotes I get a blank/empty string (``). But it seems like these missing dates still !=blank so the counts are the same for every order.
I’ve tried a few combinations such as: f.inTransitAt != nil and f.inTransitAt != “” and f.inTransitAt !=blank and f.inTransitAt !=empty but the condition is still being met for these ‘empty’ orders. I also tried if f.inTransitAt and that is evaluated as True as well.
It seems like we are close and if we could just correctly identify these ‘empty’ dates Are there any other special values that could correspond to this field when it is “empty”?