Flow workflow sends Slack notifications even when an order includes a line item with 0 available inventory. The “Order ready to be fulfilled” trigger doesn’t validate stock; it only indicates the order is processed and line items are assigned to fulfillment orders. The Flow team plans to rename this trigger to avoid confusion.
Recommended approach before sending Slack:
Add Conditions to check stock availability, considering partial fulfillment policies.
Use order.fulfillable to see if any line items can be fulfilled.
Validate per line item quantities according to the inventory scope you care about:
Location level: order/lineItems/variant/inventoryItem/inventoryLevels/available (note: available is deprecated in favor of quantities; behavior untested).
Key consideration: Decide whether to notify only when all items are in stock or when at least one item is fulfillable, and build that logic into the workflow.
Outcome/status: The original poster will implement these checks and report back if needed; no final resolution yet.
I’m trying to configure Flow to check if a newly created order’s line items are available in inventory and then use Slack to notify our shipper that the order is ready to go if all items are in stock. I’ve run into an issue with my test runs where Flow still sends a Slack notification when one of the items in the order is at 0 for “available” in Shopify inventory.
I thought it would be as simple as the following, which is still sending messages when the available stock is 0:
Trigger (Order ready to be fulfilled) >> Action (Send Slack Message with order name)
Do I need to do something like this?
Trigger (Order created) >> Action (Get order data by order number and fulfillable) >> Action (Send Slack message…)
We are working to change the name on that trigger as it implies something that isn’t true, since “ready to fulfill” has different meanings for different merchants. What it means is that the order has been processed and line items are assigned to fulfillment orders.
You could check order.fulfillable to see if any lineItems can be fulfilled on the order. You could also check quantity for each lineItem in the order. Just know that if you have a partially fulfillable order, you need to think about how to handle that.
If you provide more detail about your scenario we might be able to help further.
Yes, I think Paul is suggesting that you could add a Condition that checks each lineItem’s quantity before sending the message. You can have it check if all lineItems have quantity available, or at least one – depending on when you want to send the message. As Paul mentioned, a partially fulfillable order will need to be a consideration you build into the workflow.
Thanks Dave. Just to show where the inventory is located if you are working with an order, first you need to know if you are checking the product (across variants), variant (across locations), or location inventory.