When querying the Shopify Admin API via GraphQL, I’m unable to read order details for an order that was created by my sales channel via the Draft Orders API.
e.g. on the order page in.a ,merchant’s admin, it shows “January 26, 2021 at 3:32 pm from My Sales Channel” (via import)
Even though I can see the order was attributed to my sales channel, the GraphQL query returns null.
Is this a bug in Shopify’s implementation? Shouldn’t I be able to read this type of order?
It works on my dev app/store which doesn’t have the read_only_own_orders permission applied
Despite the draft order being created by your sales channel, the actual completion of the draft order in this instance is done by a different channel.
The message sales channel (via import) is sourced from the draft order which confuses things. For the sales channel app to have access to the draft order, the sales channel app would have to complete the draft. In this instance using the GraphQL API, a mutation call to draftOrderComplete would result in an order with the sales channel linked to the app that made the draftOrderComplete call.
Hope this help provide some clarity. If you have any other questions let me know.
So it sounds like for my sales channel to be able to read an order, it must have been completed end to end in the sales channel. Is there any chance this restriction may be relaxed in the future? Or are there any exceptions for allowing reading of orders created in the flow of: sales channel generates draft order, user places order using online store?
Yes you got it, for your channel to be attributed on the order your channel has to complete the draft. I’ve actually had a similar ask earlier this week and I’ve shared this and your feedback with our orders team. I will try and follow-up if something changes on this front.