For discussing the development and integration of subscription-enabled shops using Shopify's Subscription APIs.
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.
Solved! Go to the solution
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!
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!
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!
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.
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!
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.
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
Shopify advised me that it is something they are working on. To be honest, I don't think they actually are.
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.
Hye Chase, problem persists for a year now, have you found a solution? Thanks
Hye Chase, who is 'they'? You mean I have to ask the support? Thanks
Erasing a customer's data is available via the drop down menu underneath a customer's profile.
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.
I would like to give this topic a push. I created a few test customers with subscriptions.
All subscriptions are deleted now but I am unable to delete the customers.
Is there any solution for this now? I don´t want erase personal date. I want delete the complete customers because they are just self-created test-customers.
Thank you.