Correlate app block extension requests with cart/order

Correlate app block extension requests with cart/order

jessicaparker
Shopify Partner
2 0 0

Hello! We created an app block extension that makes requests to our app via the app proxy. We would like to correlate these requests with the cart and order, if they are created later in the shopping process. `logged_in_customer_id` attached by the app proxy is not enough, since most users are not logged in and thus their id will be `null`.

 

One idea we had was to generate a correlation id, save it in localStorage, send it with each request and then send the cart/order id along with it, if we can capture it in the template. Is there a way to get the cart/order id in the template?

 

Is there a better way to approach this?

Replies 0 (0)