Can you provide some checkout_ids where this information wasn't available from the
As far as I know, the order information you're looking for should almost always be available through that object. The only time I expect the information to not be available is if order processing was delayed, which happens very rarely.
For context on delayed order processing: In normal circumstances, Shopify receives a successful payment response from the gateway, generates the order in our database, and then redirects the customer to the thank_you page which contains the order number. When order processing is delayed, this means Shopify needs more time to generate the order after receiving confirmation of payment. Note that this happens very rarely, but can occur due to increased server load or network issues. When order processing is delayed, the customer is redirected to the thank_you page before the order is generated (rather than leaving them staring at a spinner on the processing page). In this case since the order number hasn't been generated yet, the page shows a message advising it will come in an e-mail. This is the only scenario I'm aware of where the order_id won't be available in the
Shopify.checkout object, and it shouldn't happen often enough for you to notice. If you send along those checkout_ids I can dig deeper to see what's happening.
Thanks for the response. An example Order ID that has this issue is 2480764026993(note this is an Order ID and not a checkout id as there is no checkout). This order has not Shopify.checkout object and Shopify.Checkout.token is null as well. I believe this affects any order that is created as a Draft order by the merchant, however on these orders(and all orders) apps still need to be able to get information about the order itself.
It looks like that order actually originated from an import, not a draft. Since imported orders don't have a checkout associated, it's expected in this case for the Shopify.checkout object to be unavailable. I'll submit feedback to our product teams to see if it's possible to add any order data to this page as a JS object. I can't make any promises as to if/when this will be implemented, but I'll post back here if there are any updates to share.