Shopify Flow App - Draft Orders

Hi! I am trying to set up a new Shopify Flow and am looking for guidance on how to do so. I want to accomplish two things:

  1. If a draft order has a certain email address, then automatically change the order to $0
  2. Then, push the order through so the draft order is actually created as an order.

Can I do this using Flow, and how?

Thanks!

Start in the triggers
Then you may need to use advanced features to interact directly with the api for the draftOrderUpdate & draftOrderComplete mutations of similar.
You’ll want to think about where the addresses are stored and get updated, either in the automation itself or in metafields, etc.
You may want to look at the process of order-editing in the premade templates as well to be able to adjust orders line items and costs after the order is made from a draft.

If that’s too much for you to build on your own reach out to me or other partners for services to build custom automations.
Good Hunting.

Yes, this is possible. The shortest possible flow would be like below.

The flow will run as soon as “save” pressed on the draft order, add 100% discount and convert it to a “non-draft” order.

If you used to save draft order several times, this will not be compatible.

Draft order view:

Order view:

Hey @flownyc18

Thanks for posting this to the Shopify Community.

You can set this up using Shopify Flow, but it requires combining a few actions and conditions:

Steps to fix:

  1. Trigger: Use the “Draft order created” trigger.

  2. Condition: Add a condition to check if the draft order’s customer email matches the specific email address you want.

  3. Action 1: Use “Update order” to change the order total to $0. (Note: Shopify Flow can’t always directly edit line items to reach $0, so you may need a workaround such as applying a 100% discount automatically.)

  4. Action 2: Use “Create order from draft” to push the draft order through and finalize it.

Tips:

  • Ensure your Flow has proper testing with a sample draft order to verify the conditions and actions work.

  • Some Shopify plans restrict Flow actions for draft orders — make sure your plan supports these triggers and actions.

In order to guide you more precisely, could you please share your store URL so I can review your Flow setup and provide exact steps or a working example?

Waiting to hear back from you.
If this was helpful, don’t forget to like it and mark it as a solution.

Thanks

thank you so much!! this got me on the right track, what ended up working is:

draftorderUpdate:
{
“id”: “{{ draftOrder.id }}”,
“input”: {
“appliedDiscount”: {
“valueType”: “PERCENTAGE”,
“value”: 100.0,
“title”: “100% off”,
“description”: “Custom discount for email”
},
“shippingLine”: {
“title”: “Free Shipping”,
“priceWithCurrency”: { “amount”: “0.00”, “currencyCode”: “USD” }
}
}
}

draftorderComplete:
{
“id”: “{{ draftOrder.id }}”
}

thanks again!!

1 Like