How to know if an order was created from draft order on mobile apps?

Highlighted
New Member
1 0 0

For orders created from draft orders on the webpage, the `source_name` of the orders will be `shopify_draft_order`. But for orders created from draft orders on the mobile app, the `source_name` seems to be `android` instead (note: I have not test it on iOS). I saw another post saying to use the `landing_site` but for my case the `landing_site` is null. So how do I identify this? 

0 Likes
Highlighted
Shopify Staff (Retired)
Shopify Staff (Retired)
624 102 127

Hey @yukari ,

 

'source_name' would be the best field to check for to determine if the order was originally from a draft order, but as you may have already noticed, if the order is completed (PUT /admin/draft_orders/#{draft_order_id}/complete.jsonusing the DraftOrders API, then the "source_name" value will be set to the API client which completed the order.

 

If the draft order was made through Cash on Deliver or Other payment form (rather than credit card) you can also check “gateway” and see if it is set to ‘manual’, as a potential solution to to see if it came from draft orders 

 

As the most fool proof solution, you can set a note on the Order or a tag in order to specifically indicate that this order originated as a draft order

 

Hassain | Developer Support Specialist @ Shopify
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Click Accept as Solution 

0 Likes