Solved

Cannot Delete Customer with Cancelled Subscription

alexchristie
Shopify Partner
4 0 3

We are using the Subscription API. We have some customers in our production database that we need to delete because they are test accounts. We've removed all associated subscription and orders from these customers but we cannot delete them in either the CMS or via GraphQL mutation. We get the following error:

 

"Customer cannot be deleted because of existing subscription contracts."\

 

We have verified at all subscriptionContracts associated with this user are cancelled.

 

Any help in deleting these customers would be immensely appreciated.

Accepted Solution (1)

ChaseKaneki
Shopify Staff
38 5 2

This is an accepted solution.

Update from DM:

1. Not being able to delete customers with an existing subscription is actually by design as of right now. We have "Erase Personal Data" button, screenshot, that can be used for GDPR compliance.

 
2. We have an error message that pops up when trying to delete a customer from the GUI stating you cannot delete a customer because of an "Active" subscription, which is incorrect. Our GraphQL error states that you cannot delete a customer because of an "Existing" subscription, which is correct. So we need to sync up the language and that's a bug I am working on fixing at them moment. 

 

3. There's still ongoing discussions around the ability to delete a customer with an existing subscription. It's caused confusion on multiple occasions and each occasion raises its priority. So thank you for creating this forum post and being so patient with me!

Chase Dougherty

View solution in original post

Replies 14 (14)

ChaseKaneki
Shopify Staff
38 5 2

Hello @alexchristie!

Apologies for the frustrating experience dealing with customer deletion subscription validation. Can you send me information about specific customer ids that you are trying to delete so I can inspect the data? I can look them up in our database while cross referencing our validations to hopefully provide you with a solution.

 

Looking forward to it!

Chase Dougherty
alexchristie
Shopify Partner
4 0 3

Thanks @ChaseKaneki . Just sent you a DM.

ChaseKaneki
Shopify Staff
38 5 2

This is an accepted solution.

Update from DM:

1. Not being able to delete customers with an existing subscription is actually by design as of right now. We have "Erase Personal Data" button, screenshot, that can be used for GDPR compliance.

 
2. We have an error message that pops up when trying to delete a customer from the GUI stating you cannot delete a customer because of an "Active" subscription, which is incorrect. Our GraphQL error states that you cannot delete a customer because of an "Existing" subscription, which is correct. So we need to sync up the language and that's a bug I am working on fixing at them moment. 

 

3. There's still ongoing discussions around the ability to delete a customer with an existing subscription. It's caused confusion on multiple occasions and each occasion raises its priority. So thank you for creating this forum post and being so patient with me!

Chase Dougherty
alexchristie
Shopify Partner
4 0 3

That makes general sense, however this seems to be a stop gap. It looks like it takes 10 days for a data erasure to go through or take effect.

 

Additionally, it might be helpful to have a distinction between "existing" and "active", right? Like, a user could have an active subscription, it could expire at some point, but you might also want to just get rid of the subscription and customer later.

 

I guess the thing that would be helpful to solve and have documentation around is testing subscriptions in a production environment. We're only running into this problem because we've created test users and test subscriptions in prod to ensure that we're connected correctly to some custom third party integrations. And, again, this ended up clogging up our webhook queue and caused some problems in the days following our release. In that way, it might also be great to get some documentation or insight into terminating failing webhooks. For example, if bad data gets into the webhook pipeline, what's the best way to tell Shopify to just stop trying to rerun a webhook that you know is going to fail?

 

In whatever case, thanks for looking into this. Here's hoping for a solution in the near future.

ChaseKaneki
Shopify Staff
38 5 2

I appreciate the honesty @alexchristie! I will be sure that your feedback on wanting to delete customers with subscriptions and have more information about testing in production is heard at the right level. 

As for webhooks go, we do have a best practices guide that could be helpful. If you have a webhook that you know will fail, I would suggest returning a 200 response and then Shopify will stop trying to rerun the data for that specific webhook. The idea is to have a quick response time, so enqueue a job and then let Shopify's API know that you have successfully received the data. Then in your job you could handle the particular case scenario that is causing you problems. I say this without knowing your particular webhook and the context with it, so the solution might need a bit more curtailing. If this doesn't work for you, and if the best practices documentation isn't enough to get you there, please let me know!

Chase Dougherty
Pandaboomer
Excursionist
19 2 9

I believe administrators should have the capability to delete customer accounts, particularly in a testing environment. I have conducted tests with approximately eight customer accounts, due to testing with other apps. Despite the website being in a non-live state and the orders being created in testing mode, I am unable to delete these customer accounts. I concur with @alexchristie  viewpoint on this matter. There has to be a better way. 

 

I have contacted support, but Im yet to hear back. 

 

Re Picture: The order has been canceled and deleted, no subscription is connected. Yet I still get this message from all customer accounts.

 

Screenshot 2023-06-22 192758.png

organicsocean
Visitor
1 0 6

So...how are we supposed to delete and clear out our test orders and sub customers with this bug?  I have spent hours with your support, pointing the finger at the apps, but this is a shopify issue.  When will this be resolved and what is the work around? this affects our stats so its' pretty uncool tbh. thx

Pandaboomer
Excursionist
19 2 9

Shopify advised me that it is something they are working on. To be honest, I don't think they actually are. 

Taz416
Shopify Partner
3 0 1

Struggling to get Shopify to understand that test data does not need to be persisted due to GDPR and still cannot delete customers. Using Recharge subscription app and they have assured that there are no subscriptions for the customers indicated.

MagaliWD
Shopify Partner
18 0 2

Hye Chase, problem persists for a year now, have you found a solution? Thanks

ChaseKaneki
Shopify Staff
38 5 2
Deleting will not be an option, but they can erase a customer.
Chase Dougherty
MagaliWD
Shopify Partner
18 0 2

Hye Chase, who is 'they'? You mean I have to ask the support? Thanks

ChaseKaneki
Shopify Staff
38 5 2

Erasing a customer's data is available via the drop down menu underneath a customer's profile.

Screenshot 2024-04-02 at 9.57.31 AM.png

Chase Dougherty
MagaliWD
Shopify Partner
18 0 2

Screenshot 2024-04-02 at 16.06.14.png

This message appears even if subscriptions no longer exist in recharge.

Please read the messages above!

Even deleted subscriptions remain in the customer’s orders and deleting the customer is impossible.