Unable to delete expired Subscriptions
As part of testing I pushed a few subscriptions twice via the subscribe soap api call. Thankfully, zuora handled those cases, and expired the first entry of the duplicate subscriptions. However, I wanted to delete all those expired subscriptions and start afresh via the delete soap call as following:
<ns1:delete> <ns1:type>Subscription</ns1:type> <ns1:ids>2c91a0995c639c38015c81966702189b</ns1:ids> </ns1:delete>
However in this case I am getting the following response:
<ns1:deleteResponse xmlns:ns1="http://api.zuora.com/"> <ns1:result> <ns1:errors> <ns1:Code>INVALID_VALUE</ns1:Code> <ns1:Message>You are looking at a previous version or snapshot of an existing subscription, which cannot be deleted.</ns1:Message> </ns1:errors> <ns1:id>2c91a0995c639c38015c81966702189b</ns1:id> <ns1:success>false</ns1:success> </ns1:result> </ns1:deleteResponse>
Which is true though. but i want my system clean, and would like to remove these expired subscriptions altogether. Please note that I'm able to delete the active ones through the same delete soap call. Any ideas on how to delete the expired ones?
Re: Unable to delete expired Subscriptions
If you want a clean system, the quickest and easiest route is to delete the account, which will cascade delete all the related records.
Otherwise, it is a tedious process of deleting the active versions. After deleting the active versions, the prior expired versions become the active version. Rinse and repeat.
Oracle, Salesforce and Zuora Consultants