Shopify Flow to Check for Unfulfilled Previous Orders

Shopify Flow to Check for Unfulfilled Previous Orders

Chloe_M
Tourist
12 0 1

Hi everyone,

 

I’m looking for some help setting up a Shopify Flow. Here’s what I want to achieve:

 

When an order is placed:

  1. Check if the customer who placed the order has any previous orders that have not yet been fulfilled.
  2. If such orders exist, take a specific action (e.g., send an email notification).

 

I would really appreciate detailed steps or examples on how to set this up.

 

Thanks in advance for your help!

Replies 11 (11)

Tal19
Shopify Partner
123 22 23

Try this condition:

Tal19_0-1720289163144.png

 

Need Shopify Development, Customization, or POS Support? PM Me!
Chloe_M
Tourist
12 0 1

Screenshot 2024-07-06 at 17.01.55.png


Thank you for your reply! Can you show me how did you create the "At least one of order/customer/orders" condition? Thanks again!

Screenshot 2024-07-06 at 17.03.26.png

Tal19
Shopify Partner
123 22 23

order -> customer -> orders -> displayFulfillmentStatus

Need Shopify Development, Customization, or POS Support? PM Me!

Kalen_Jordan
Shopify Partner
521 17 77

Hi Chloe - I'm not sure the route Tal19 suggested is accurate. I actually put together a flow template for this here if you're interested:

https://docs.flow-helper.com/templates/get-unfulfilled-orders-for-a-customer-when-they-place-a-new-o...

Screenshot 2024-07-07 at 9.44.27 AM.png

 

Currently it's looping over every unfulfilled order and sending an email that looks like this:

Screenshot 2024-07-07 at 9.45.02 AM.png

Tal19
Shopify Partner
123 22 23

for me it's working

Tal19_0-1720363830886.png

 

Need Shopify Development, Customization, or POS Support? PM Me!
Chloe_M
Tourist
12 0 1

Hi, I have tested out the flow, but I’m receiving an email every time a customer places an order. I presume this is because each new order counts into the order items. I tried adding a condition for ‘last order’ to be ‘unfulfilled’ as well, but it still seems to be malfunctioning. Do you have any idea how to fix this?

Again, thank you so much foe your help!

paul_n
Shopify Staff
1172 143 276

You would have to use Run code in order to parse those orders and remove the most recent one. 

 

You could also use the approach Kalen suggested

Paul_N | Flow Product Manager @ Shopify
- Finding Flow useful? Leave us a review
- Need Flow help? Check out our help docs.
- Building for Flow? Check out Flow's dev docs.
Chloe_M
Tourist
12 0 1

Thanks for the reply Paul. Can you show me how to do it?

paul_n
Shopify Staff
1172 143 276

Sorry I can't write the custom code for you. I may be able to provide feedback if you get stuck somewhere

Paul_N | Flow Product Manager @ Shopify
- Finding Flow useful? Leave us a review
- Need Flow help? Check out our help docs.
- Building for Flow? Check out Flow's dev docs.
Kalen_Jordan
Shopify Partner
521 17 77

But I can! Happy to help if you're interested in some paid help here - my rates are linked in my footer link below.

Kalen_Jordan
Shopify Partner
521 17 77

That’s just checking the status of the order that was place. I thought you wanted to find additional unfulfilled orders from that same customer.