For discussing the development and usage of Checkout UI extensions, post-purchase extensions, web pixels, Customer Accounts UI extensions, and POS UI extensions
Hi all,
I've seen quite a few answers on this forum that refer to the Extension-UI React Hooks as being a convenient way to gain context regarding the originating order/customer/etc in the Extension-UI ecosystem, but that doesn't appear to be the correct path when building a post-purchase upsell extension.
So my question is: what is the idiomatic way to get details about the originating Order (pre-upsell)?
I need to show upsells that are based off the items that were bought in the primary checkout (pre-upsell), and I'm fairly confused how to discover what those may be. I'm also not clear on how I can discover the customerId or any other relevant details for the originating order.
Update: I realized the inputData object is available in the upsell code as referenced in https://shopify.dev/docs/api/checkout-extensions/post-purchase/api#:~:text=Represents%20the%20initia...
This is helpful and gets me a lot farther, however instead of an OrderId, the API surfaces a referenceId. What is this ID and can it be correlated to a Shopify Order? I tried looking through the Shopify API references and didn't see anything specific.