How can I add tags only to orders requesting a return?

Solved

How can I add tags only to orders requesting a return?

gkk
Shopify Partner
12 0 2

Hello,

 

I have created a flow in which i need to add a tag to an specific order with has requested return.

In the flow that i created the flow is adding tag to every order once it finds that the condition is true.

What i want is that the tag should be applied only to orders that have requested the return.

 

gkk_0-1712219641176.png

 

Accepted Solution (1)
paul_n
Shopify Staff
1336 151 304

This is an accepted solution.

I don't think you are understanding. In that condition, you need to add a criteria and select the "Get order data item" and then return status. You then need to move your tag action back to on the "Do this for each item" path

 

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.

View solution in original post

Replies 11 (11)

paul_n
Shopify Staff
1336 151 304

You question suggests that the condition is working as expected. Can you elaborate more on the expected behavior ?

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.
gkk
Shopify Partner
12 0 2

The expected behaviour should be like......

When there is a return request from the customer the flow should be able to add a tag to that specific order and not to all the order.

In the image that i shared of my flow at the end the flow adds the tag to all the order's which is not expected.

paul_n
Shopify Staff
1336 151 304

What query are you using to get orders? 

 

What is in that condition? 

 

Can you share a screenshot of the "run page" where it doesn't work as expected?

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.
gkk
Shopify Partner
12 0 2

So this is how the system is currently working:

Step 1: When a return is requested by the customer the admin is able to see that inside the order as Return In Progress.

gkk_0-1712288912110.png

 

gkk_1-1712288912112.png

 

Step 2: On the main orders page I need to add a tag that say’s ReturnRequested.

 

gkk_2-1712288912116.png

 

Step 3: So my flow so work in a way that when a return is in progress the flow should add a tag to the order in the tags section.

I’m using get order data to get the order details.

 

Step 4: So what happens in this flow is that when the flow is executed every order in the order’s list get tagged as ReturnRequested.

 

gkk_3-1712288912121.png

 

In the above only the order that has requested returns should get tagged whereas in my case all the orders are getting tagged.

 

The expected output is that only the orders with return requested should get tagged and not all the orders.

paul_n
Shopify Staff
1336 151 304

Without seeing your query and condition I can't tell why that might happen. One or both of them is likely not configured correctly

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.
gkk
Shopify Partner
12 0 2

Hello,

The condition for the return status that i have is:

gkk_0-1715574238242.png

And the add order tag action only works when it is for " Do this for each item ".Because of the every order in my order list is getting tagged which i don't should not happen.

paul_n
Shopify Staff
1336 151 304

You selected the "Get order data" data in the condition, so it's checking if any of those orders have a return status. You need to check the individual order in that for each loop. 

 

 

 

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.
gkk
Shopify Partner
12 0 2

In the check if section there are only 3 options available which are : Get Order Data Item, Shop, Get Order Data so i have to select one of the "Get order data" data to get the return status as "Shop" does not provide a return status option.

gkk_0-1715658006313.png

 

And the other thing is that "Add order tags" action does require a "Do this for each item" action and also a "Get order data" action to get the order list. In the below image i have changed the condition for the "Add order tags" error to be displayed.

gkk_1-1715658092719.png

paul_n
Shopify Staff
1336 151 304

You want the "Get order data 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.
gkk
Shopify Partner
12 0 2

Yes that's how I'm able to access the orders. And if the order have a return requested the " Returned " tag should be applied to that specific order only.

 

paul_n
Shopify Staff
1336 151 304

This is an accepted solution.

I don't think you are understanding. In that condition, you need to add a criteria and select the "Get order data item" and then return status. You then need to move your tag action back to on the "Do this for each item" path

 

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.