Delete Warehouse Product

Hi, community!

We have some “fictitious products” in my warehouses that i want to remove because the inventory sais that we have 10 millions and isn’t truth, but i’m not sure how to compose the mutation code. Example, i want to delete the product with SKU: XXX from my Warehouse:YYY so i think the code should be like:

mutation{
  warehouse_product_delete(
    data: {
      sku:"XXX"
      warehouse_id:"YYY"
    })
}

Is that correct? And what is the difference between this action and mutate the quantity on hand to 0 for this product on this warehouse?

Hi @Eduardo !

That should work if you want to delete the Product from that warehouse

You could also use the inventory to 0 using the Public API, but to be able to provide a detailed explanation I first need to ask, are you on a Dynamic Slotting account?

Thanks in advance!

Tom

Hi @tomasw ! Thanks for your reply.

Sorry but I don’t know what is Dynamic Slotting and i don’t even know if my company has it implemented. Because that, i think the easiest way could be delete the product.

My apologies for the lack of context then @Eduardo !
In case it helps, this article explains briefly what is the Slotting types on ShipHero.
In that case, you can try by deleting the product :+1:
Let me know if there is anything else I could help you with.
Thanks again!
Tom

Hi , @tomasw. I’ve tried to execute the mutation of the first comment but it returned the error:

“Field “warehouse_product_delete” of type “MutationOutput” must have a sub selection.”

I didn’t find an example or more info in the docs. Thanks in advance!

Hi @Eduardo!
There might be a missing argument on that Mutation … all fields with ! are required. Do you happen to have the request_id for that?
Thanks again!
Tom

Hi @tomasw , the request id is 603cff9ee87c8915421a97d9.

Thanks for that @Eduardo!
Is there any chance that warehouse_id might be invalid?

I run the following Query while logged into that account and not see that identifier:

query {
  account {
    request_id
    complexity
    data {
      warehouses {
        id
      }
    }
  }
}

Thanks again!
Tom

Hi @tomasw!

It’s true, the warehouse don’t appear in the warehouse list but when i use the warehouse_product query with this warehouse_id, there I find a huge list of products in this warehouse (request_id: 603f51ec96f844b35994ce60) with the product that i want to delete (cursor: YXJyYXljb25uZWN0aW9uOjYwMw==).

This isn’t an isolate problem, because i try to delete a product that is in a warehouse that appear in the list and the query return me an error with code 22 (request_id: 603f4f3ed51c1d0e203477e3).

Related to this topic, I created the other one (Active field in Warehouses info) in which I talked about the “active” field for warehouses, because having this field, we could use the warehouse_product query filtering by active products and active warehouses.

Thanks in advance and sorry for my large reply!

Hi @tomasw! Any update on this topic? Thanks in advance!

Hi @Eduardo!
I apologize for the delayed response about this.
It might be related to it being a Kit, and having Vendors associated with those.
Are you able to delete this product using the UI? at https://app.shiphero.com/dashboard/products by searching for the SKU & Warehouse and selecting the check box and Bulk Delete?

Want me to try that for you?
Thanks again!
Tom

Hi @tomasw! Thanks for your reply.

I’m using a 3P account and i haven’t user in the app so i can’t remove the products.
Can I send you an email with the list of warehouse and product id to remove them from the app?