How to reset PIM in V7

Database query:

DELETE FROM Products.BaseProductCategoryLinkActiveVariants;
DELETE FROM Products.BaseProductCategoryLink;
DELETE FROM Products.BaseProductProductListLinkActiveVariants;
DELETE FROM Products.BaseProductProductListLink;
DELETE FROM Products.RelationshipLink;
DELETE FROM Products.RelationshipTypeEntity;
DELETE FROM Products.PriceListItem;
DELETE FROM Products.InventoryItem;
DELETE FROM Products.UnitOfMeasurementEntity;
DELETE FROM Products.ProductList;
DELETE FROM Products.CategoryChannelLink;
DELETE FROM Products.Category;
DELETE FROM Products.Assortment;
DELETE FROM Products.VariantBundleLink;
DELETE FROM Products.VariantChannelLink;
DELETE FROM Products.Variant;
DELETE FROM Products.BaseProduct;
DELETE FROM FieldFramework.FieldDefinition WHERE AreaType = 'Litium.Products.ProductArea, Litium.Abstractions';
DELETE FROM FieldFramework.FieldTemplate WHERE AreaType = 'Litium.Products.ProductArea, Litium.Abstractions';
DELETE FROM Products.DisplayTemplate;
DELETE FROM Products.InventoryToCountryLink;
DELETE FROM Products.Inventory;
DELETE FROM Products.PriceListOrganizationLink;
DELETE FROM Products.PriceListToCountryLink;
DELETE FROM Products.PriceListGroupLink;
DELETE FROM Products.PriceListWebSiteLink;
DELETE FROM Products.PriceList;
DELETE FROM Products.UrlHistory
DELETE FROM Workflows.TaskMatchLink;
DELETE FROM Workflows.TaskAssignedLink;
DELETE FROM Workflows.Task;
DELETE FROM Workflows.Workflow;

If on clearing Assortment table error appears then you need to clear AssortmentSystemId from the Market table or clear Channel and Market tables before clearing Assortment table.

Clear the related rows in Common.Setting tables in order for Accelerator fields to be recreated.
Remember to restart your site so the definitions setups get implemented in the database.

2 Likes

@steve.redstorm Can you clarify what you mean with “If on clearing Assortment table error appears then you need to clear Channel and Market tables before that table.”?

If we clear those tables, that means all other entities (e.g. pages) connected to channel and market loses their connection?

(We got the error but solved it by manually removing assortment from market in backoffice, to be able to remove it from table)

@jonas.olsson Yes Jonas that is also a good option, depending on what entities you would like to keep. That also works good.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.