Add condition: If All of the following conditions are true
Line item status > is > fulfilled.
Line item - Product ID > is not > [Line Item: Product ID].
Note: You’ll have to loop through all line items to check this condition. Shopify Flow supports “For each line item in order” to iterate over line items and run checks on each of them.
Actions
Add action: Order > Update line items.
Set Line item status to fulfilled for all line items.
You’ll want to look at using the Fulfillment Event Created trigger, then you an look at the order’s fulfillments.
In the Condition, you can write the check for the Product ID using order.fulfillments.fufillmentLineItems.lineItem.product.id, then add a sub-condition on the loop that iterates through fulfillments to check status. You can adjust the All/Any/None logic and adjust the test to suit your exact use case:
For the status update, Flow does not support that Action so you would need to use the Send HTTP Step (not available on Basic plan) to call the Admin API.
This is very helpful and seems close to solution. I’ve been trying to recreate and have a couple of follow-up questions:
In your image you have All of Order / Fulfillments box, then a All of Fulfillment line items box - how did you do this?
I still can’t wrap my head around the logic i.e. if an order contains product x AND all other products in the order are fulfilled THEN set product x to fulfilled
We have Shopify Advanced plan, so I’m happy to use the Send HTTP action to solve this
Thanks for your suggestion. I’m not sure the correct way to loop through through to order contains [Line Item: Product ID] AND all other products in the order are fulfilled THEN set [Line Item: Product ID] to fulfilled.
Do you know how I would do this?
I have also found that it’s not as simple as setting line item status to fulfilled as this is not yet an action, but I can cross that bridge with an HTTP request when I come to it.