Today, I will show you how to import category hierarchies by using To-Increase Data Migration Studio for Microsoft Dynamics AX 2012. Category hierarchies can be extremely helpful when you want to organize products and for procurement. For example, you can order office supplies in the category ‘office supplies’ without creating a product in the database. With Data Migration Studio, the import tasks is quite simple.
The retail category hierarchy is particularly interesting. By using retail categories you can maintain product attributes and properties at the category level.
Now, with a good sense of what category hierarchies are about, let’s dig into the tables. The table below lists the tables which are required to import the category hierarchies.
|InventTable||This table includes the released product information. In this tutorial we are using the InventTable to lookup the product RecId which is used for the relation between the EcoResProductCategory.|
|EcoResProductCategory||This table is a cross reference table between the products and the categories.|
|EcoResCategoryHierarchy||This table is the hierarchy you are using during the import. In this tutorial we are assuming that the hierarchy exists. Thus, we are only looking for the provided hierarchy. If the hierarchy not exists the import throws an error.|
|EcoResCategory||This table is the actual category.|
|EcoResCategoryTranslation||This table is a translation for each category.|
The diagram below gives insight in the relations between the above-mentioned tables.
The migration in Data Migration Studio works as follows:
- Lookup the category hierarchy in EcoResCategoryHierarchy
- Lookup the parent product category in the EcoResCategory
- Update or insert the category in EcoResCategory
- Update or insert the translations in EcoResCategoryTranslation
- Lookup the product in the InventTable
- Update or insert the EcoResProductCategory
Ready to get practical? Download our .rar package and follow the next steps to configure:
- Import the included xpo, which includes a new entity BisEcoResCategory. This entity calculates the level and the nestedsetleft and nestedsetright.
- Import the migration ‘Items - Category, Text.xml’. This is the actual migration to import the product categories.
- Run the migration ‘Items – Category’ and select the tutorial file ‘Item_category.txt’. Please note that you have to adjust the information in the file according your Microsoft Dynamics AX 2012 environment.
For more background information on categories, do contact us.