How to hard delete product records in bulk

vinod.agarwal
vinod.agarwal Spryker Solution Partner Posts: 12 🧑🏻‍🚀 - Cadet

Hi Team,

I accidentally imported lots of data with incorrect skus. So is there a way I can delete all products without running destructive pipeline.
I checked in Product Facade, but it does not have hard delete api available.

Answers

  • Fred Jung
    Fred Jung Spryker Customer Posts: 24 ✨ - Novice

    I can suggest you some "unofficial" way to get rid of them.

    If you only imported the products (without publishing) you can easily delete them via SQL. Could be a couple of cascaded deletes on different tables. If they are already published, you should update the products first (is_Active = false) and retrigger product events to make sure the products getting deleted from Elastic, etc. Afterwards you can delete the rows and cleanup.

  • vinod.agarwal
    vinod.agarwal Spryker Solution Partner Posts: 12 🧑🏻‍🚀 - Cadet

    Hi @Fred Jung ,

    Thanks for your detailed explanation,

  • Fred Jung
    Fred Jung Spryker Customer Posts: 24 ✨ - Novice

    @vinod.agarwal your answer was cutted :)