We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more

Retrieve a cart associated with a customer

Retrieve a cart associated with a customer

Jeansantanna
Shopify Partner
2 0 0

Is it possible with Shopify’s latest APIs to natively retrieve a customer’s abandoned cart, even after they sign out, without relying on cookies or storing the cart ID in sessions? I understand that a cart can be associated with a customer through buyerIdentity, but I would like to know if there are any method that allow carts to be restored automatically upon the customer’s next login.

Replies 2 (2)

richardcobain
Trailblazer
160 7 22

Yes, with Shopify's latest APIs, you can retrieve a customer’s abandoned cart even after they sign out by utilizing the buyerIdentity feature to associate the cart with the customer’s account. However, for the cart to be restored automatically upon the customer's next login, you would need to implement a solution that saves the cart data to the customer's account in your backend, as Shopify does not currently support native automatic restoration of carts without session or cookie tracking.

Jeansantanna
Shopify Partner
2 0 0

Got it, thank you. My issue now is because looks like is not possible to associate a cart with a customer using the new customer api, looks like the generated customer token by the storefrontCustomerAccessTokenCreate doesn't have relation with the authenticated customer.