Order created from draft order - sometimes new order has no backreference to that draft order

jankadlec
Shopify Partner
12 0 0

Hi, we created app that uses draft order API. It uses draft order checkout URL to redirect user to checkout and pay for that draft order. On Thank You page we need to find the originating draft order. But sometimes it's not filled and instead this message is in timeline of order: "placed this order on Draft Orders (checkout #7103155339300)"

 

Is there reliable way how to find originating order by full order ID please?

Or set something on draft order that is copied to order so we can use it for lookup?

 

Thank you 

 

Jan

 

vs.

Replies 2 (2)
jankadlec
Shopify Partner
12 0 0

as far as I can see, when I add some URL parameters fields from permalinks like 

checkout[email]

checkout[shipping_address][first_name]

 

etc. see https://help.shopify.com/en/themes/customization/cart/use-permalinks-to-preload-cart

 

order will not have reference to originating draft order, but only to some checkout ID...

 

Jan

 

 

KapCave
New Member
1 0 1

Hi,

We are facing this same issue. Our workflow is gather orders from a separate source like Google form and then use an app to send invoices to selected orders.

We create draft orders and send invoices. Customer sees the email and completes purchase and an order is created. We cancel the unpaid drafts later and just list on website. 

However, there are a few cases where a checkout is created (like above) when customer completes purchase, customer doesn’t get confirmation email. They complete purchase again using the same invoice email and the second time the order is mapped against the draft order and they get confirmation. But this creates two orders for the same invoice.

This adds in confusion for the customer and more work for us to verify all orders are unique. I’d appreciate understanding why this happens and how to avoid it.