What's your biggest current challenge? Have your say in Community Polls along the right column.
Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Disassociate Customer from Checkout - Storefront API

Disassociate Customer from Checkout - Storefront API

EthanJames
Shopify Partner
5 0 3

I'm working on a headless storefront that allows customers to checkout using the web url that gets returned from the Storefront API (2022-10), and I'm having trouble persisting customer data between the headless site and the web checkout experience.

 

After some trial and error, I found that the steps outlined in this article worked for persisting logged-in customer information in the checkout. However, I'm still having trouble removing that information from the checkout if the customer logs out during the session – even if customer data is no longer accessible on the headless site, it still pre-populates when the customer is sent to the checkout web url.

 

When I check the docs, it looks like the checkoutCustomerDisassociateV2  mutation could be used to wipe the customer info, but I'm not having any success with it. The mutation fires successfully, I don't get any errors, but it doesn't have any noticeable effect when I actually visit the checkout.

 

Has anyone had experience with this? I can't find much discussion/documentation online, and I want to make sure my approach is correct. Happy to provide more detail where needed.

Replies 3 (3)

Caleb_Brown
Shopify Partner
3 0 1

Did you ever find a fix for this one? I'm experiencing exactly this issue.

EthanJames
Shopify Partner
5 0 3

Unfortunately not 😕. Our team determined this wasn't a priority issue for us and this ticket is still sitting in our backlog. 

zachsitka
Shopify Partner
12 1 2

I am also experiencing this issue. Whenever I use this mutation, there does not seem to be any discernible change in the checkout. The checkout comes back with an email still listed on the object and when the customer goes to the checkout url, the email is pre-populated for them. It still prompts them to login, but it would make sense to remove that email if the customer is dissociated from the order.