I am using draft orders for custom order request, but i just noticed that the invoice link to the order does never expire and the costumer can come back even after a year and finalize the for the same price. as an online retailer Prices may change often, so i would like to have the ability, to automatically cancel or archive the draft order so the customer can no longer use that link. this is very important for me, and will appreciate anyone’s assistance.
Aside: There is also a documented edge case where draft-order stays open even if an order is complete when updating a draft order with an in progress checkout resulting in a broken the link.
Hi @teds1 you can use a scriptable automation app like mechanic for custom situations like this, or for the code savvy even possibly shopify-flows app’s advanced send-admin-api-request action.
Off the shelf example tasks for some scenarios https://tasks.mechanic.dev/delete-draft-orders-older-than-30-days
https://tasks.mechanic.dev/?q=draft
More advanced is editing the order to generate a new linke or updating the draft to current price logic, etc.
If you need bespoke automation you can contact me for services.
Contact info in forum signature.
ALWAYS please provide context, examples: store url, theme name, post url(s) , or any further detail in ALL correspondence.
Good Luck.
You could use Shopify Flow to delete the draft order if it’s still open after a certain amount of time. Sample would be like this below:
Again, the picture above is an example. Reality can be much more complicated than the example above.
If the requirement for the draft order to be deleted is much complicated, I’d suggest you contact Kalen at flow-helper.co. His work specializes on the Shopify Flow, so I know that he’d be able to help you create the automated task such as the one you are looking for. Tell him I said "Hi
" if you happen to contact him!
![]()
Sorry!
The link is flow-helper.com and not .co
