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

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? 

Reply 1 (1)

Shopify Staff (Retired)
624 104 188

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


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