Product_delete not working as expected

We think this query should result in a deleted product:

mutation {
  product_delete(
		data: {
      sku: "Par_F-TRV-0086"
      customer_account_id: "QWNjb3VudDo2ODA1MA=="
    }
  ) {
    request_id
    complexity
  }
}

But instead we get an error

{
  "errors": [
    {
      "message": "Unexpected Error",
      "operation": "product_delete",
      "field": "product_delete",
      "request_id": "62e5130e7ca5720090ab140c",
      "code": 22
    }
  ],
  "data": {
    "product_delete": null
  }
}

Can you advise us pls?

Hey @ajitdsa,

Thanks for reaching out!
I’ll look into this and have an update for you shortly.

Best,
RayanP

Hey @ajitdsa,

Thank you for your patience!
Wanted to let you know we’re still actively investigating this issue.

Best,
RayanP

Hey @ajitdsa,

Apologies for the delay. The issue with this SKU I believe is that it is part of a recursive kit. A recursive kit is a kit (kit a) where the component of the kit is a kit (kit b) itself, and that kit’s (kit b) component is the original kit (kit a). I’ve been looking into recursive kits and how to replicate them but haven’t been able to yet, which is the cause of this delay.

I’d recommend running a kit_clear mutation on this SKU and then try to use product_delete.

mutation {
  kit_clear(data: { sku: "Par_F-TRV-0086" customer_account_id:"QWNjb3VudDo2ODA1MA==" }) {
    request_id
    complexity
  }
}

Please let me know if you have any questions or concerns.

Best,
RayanP

Hi @sh-agent ,

Having the same issue. This is costing me a lot, we can’t delete these products and I believe it is something about this issue, because all of the products that I’m trying to delete are marked as kits.

This is related with the other issue that I posted recently: Removing "is kit" from item? - #5 by marioreinike

Please, this is urgent, we need to delete these products.

Hey @marioreinike,

Thanks for reaching out!

Would you mind sharing some example request id’s so I can take a better look at what’s going on?
Let me know if there’s anything I can do to assist.

Best,
RayanP

Hi @sh-agent !

For example, you can see request ID 637e266d0a611c72eb48ada6. But hey, I found a way to delete them, I did it through the Shiphero Web App. First I deleted all the product locations associated to those products, and then I deleted all of the products.

I believe this issue has something related to the product that are kits and have been associated to locations. If you delete all the product locations, then the mutation to delete products works correctly.

But this doesn’t solve the main issue that we have (see link above), that one cannot deactivate a product as a kit. For this instance I could just delete them, because they were new products. But if for some error we activate it on another existing product, it would cause a giant problem because we could’t delete it.

1 Like