Shopify Flow is an ecommerce automation platform that enables you to automate tasks and processes within your store and across your apps.
Hi everyone,
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:
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.
The send email action could be changed to highlight only the orders with these fulfillments (likely want to change the subject line too):
The unfulfilled orders:
{% for getOrderData_item in getOrderData %}
{% assign in_transit_count = getOrderData_item.fulfillments | where: "inTransitAt" | size %}
{% assign fulfillments_count = getOrderData_item.fulfillments | size %}
{% if in_transit_count != fulfillments_count %}
- {{getOrderData_item.name}} - ${{getOrderData_item.currentTotalPriceSet.shopMoney.amount}}
{% endif %}
{% endfor %}
I'm not 100% certain on the liquid but this should give you a good start.
Thanks for the question!
Ryan
Hi Ryan,
Thank you for the help and feedback! I implemented your suggested changes and am also still working on the liquid for the email piece.
It does look like the 'check if' action is returning some orders from the query with an 'empty' inTransitAt date.
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!
That "where" is effectively like a loop. I'm not sure that it properly respects "blank" or other special variables like "empty". I might try instead:
{% for getOrderData_item in getOrderData %}
{% assign in_transit_count = 0 %}
{% assign fulfillments_count = getOrderData_item.fulfillments | size %}
{% for f in getOrderData_item.fulfillments %}
{% if f.inTransitAt != blank %}
{% assign in_transit_count = in_transit_count | plus: "1" %}
{% endif %}
{% endfor %}
{% if in_transit_count != fulfillments_count %}
- {{getOrderData_item.name}}
- ${{getOrderData_item.currentTotalPriceSet.shopMoney.amount}}
{% endif %}
{% endfor %}
Thanks Paul for the assistance!
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"?
Appreciate the help with this.
Hmmm I think that plus: "1" needs to be plus: 1...it's probably just silently skipping it
Could you please share how you created the "get order data" entry? I would like to duplicate this flow but can't figure it out.
Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025Discover opportunities to improve SEO with new guidance available from Shopify’s growth...
By Jacqui May 1, 2025