What's your biggest current challenge? Have your say in Community Polls along the right column.

Re: Is there a way to fulfill an order based on line item product tags?

Is there a way to fulfill an order based on line item product tags?

DomGrimDice
Visitor
3 0 4

We have just started with Shoppy Flow (were using a different app before) and looking for a solution on how we can close/fulfill an order that has one line item based on the tag for the line item:

 

1. Order created for Table (tagged with Table)

2. Flow identifies All of Order / Line Items has At Least One Of Product / Tags is Equal To Table
3. Next action would be to fulfill the order however I get an error about missing fulfillment data

 

Would it be instead to just jump to Archive Order (however does archiving the order mean that it is not fulfilled) ?

Thanks

Replies 4 (4)

paul_n
Shopify Staff
1445 157 334

I like that name, "Shoppy Flow" 🙂 

 

If you want to only fulfill the single line item, there isn't a dedicated action for that (there is an action to mark the whole shipment as fulfilled). But you can use "Send Admin API request" to call the "FulfillmentCreateV2" mutation, passing in that line item. 

 

Docs on that API: https://shopify.dev/docs/api/admin-graphql/2024-01/mutations/fulfillmentCreateV2

 

Regarding the structure, you request is exactly clear, but you could do something like:

 

Order created

Check if at least one order / tags == table

True: For each order / lineItems

If at least one of lineitem / product / tags == table

True: Send Admin API request (for fulfill that item)

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
798 37 143

No you wouldn't want to archive the order. Paul's suggestion should do the trick. Might be a little technical to get that working - if you need any help let me know.

DomGrimDice
Visitor
3 0 4

Just a quick confirmation, this would only run on an order that only had a table/tables on it - no other items - so would fulfilling it still be an issue?

Not concerned about fulfilling just one line item in an order if there are other things in the order as well

 

Cheers

paul_n
Shopify Staff
1445 157 334

That's not exactly what you said above. If you check if the order has at least one line item / product with "table" as a tag, it will have more than 1 line item sometimes. You could change that condition to check if "all of order / lineitems have at least one product / tag == table", but that will exclude orders that have two or more products. 

 

So not sure how to answer your question.

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.