Solved

Identify an order from Draft Orders via Order API

sasawatc
Tourist
11 1 3

I am trying to identify orders based on their sales channel name, thanks to Rumo, by retrieving the app_id from Order object. However, the app_id of orders that in the Admin reporting tool, under sales channel name, as "Draft Orders" have the same app_id as my other sales channel. Is there a reason to that and how can I identify the same way as the admin reporting tool do?

 

Btw, the source_name is always "web" and, for some reason, is not "shopify_draft_order"

 

Thanks!

Accepted Solution (1)

Busfox
Shopify Staff (Retired)
628 49 110

This is an accepted solution.

Hi @sasawatc,

 

You could look at the order's landing page. For orders created from draft orders where the customer used the web checkout, the landing page would look like this: /shop_id/invoices/token

 

If the path includes invoices, then it came from a draft order and completed through the web checkout.

To learn more visit the Shopify Help Center or the Community Blog.

View solution in original post

Replies 2 (2)

Busfox
Shopify Staff (Retired)
628 49 110

This is an accepted solution.

Hi @sasawatc,

 

You could look at the order's landing page. For orders created from draft orders where the customer used the web checkout, the landing page would look like this: /shop_id/invoices/token

 

If the path includes invoices, then it came from a draft order and completed through the web checkout.

To learn more visit the Shopify Help Center or the Community Blog.

sasawatc
Tourist
11 1 3

Thank you and apologize for the late reply @Busfox, your solution seems to work for your scenario. However, it's quite a pain since if the order were completed in Shopify Admin then the landing_site will be null but in that case the source_name would be shopify_draft_order. I'm intrigued that the Shopify Admin Report feature can just find draft order so easily through the sales channel name column but the API requires checking data from two attributes. I hope there's an easier way to do this.