Cancel/Archive unpaid orders after X amount of days

goldemmemories
Tourist
7 0 1

Hi, my orders for some reason doesn't get cancelled automatic. Their status keep "Pending payment" for ever.

I want to cancel orders that has the "not authorized" status and orders that have "pending payment" status after 5 days or something.

I couldn't do it myself, so I`d like some help if possible. Thanks in advance.

Replies 3 (3)

paul_n
Shopify Staff
790 118 190

I don't understand the context. Why would your orders get cancelled automatically? 

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.
goldemmemories
Tourist
7 0 1

Not paid orders should be cancelled. mine doesn't cancel unpaid orders. they stay "pending" increasing my revenue.

paul_n
Shopify Staff
790 118 190

What is "Mine" referring to? Shopify? If you are building an automation, it helps to be very specific or your might build the wrong thing.

 

Roughly speaking, if you want to do something after 5 days, you could do Order created -> Wait 5 days -> if unauthorized and unpaid -> Cancel. 

 

You could also do something like:
Every day -> get order data (unpaid, older than 5 days, unauthorized) -> for each order -> cancel 

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.