How to use Data Migration Studio to import category hierarchies

Dec 2, 2014 6:00:00 AM

How to use Data Migration Studio to import category hierarchies—the easy way

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.

Table Description
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.

Import Category Hierarchies 1

The migration in Data Migration Studio works as follows:

  1. Lookup the category hierarchy in EcoResCategoryHierarchy
  2. Lookup the parent product category in the EcoResCategory
  3. Update or insert the category in EcoResCategory
  4. Update or insert the translations in EcoResCategoryTranslation
  5. Lookup the product in the InventTable
  6. Update or insert the EcoResProductCategory

Ready to get practical? Download our .rar package and follow the next steps to configure:

  1. Import the included xpo, which includes a new entity BisEcoResCategory. This entity calculates the level and the nestedsetleft and nestedsetright.
  2. Import the migration ‘Items - Category, Text.xml’. This is the actual migration to import the product categories.
  3. 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.

Share this message
About Author
Pieter de Jong

Pieter de Jong

Business and Application Integration Specialist Pieter translates the business requirements of the industries and companies To-Increase serves into functionality in our Business Integration Solutions for Microsoft Dynamics AX. His specialized skills include model-driven development, Javascript, Java, HTML, XML, Visual Studio, and Eclipse. Before Pieter joined the team at To-Increase, he spent a career of close to 20 years as a software engineer and developer at Baan Info Systems and in other companies.

Get In Touch

Related Blogs

May 28, 2019 7:42:40 AM
Apr 9, 2019 9:27:11 AM
Dec 17, 2018 9:01:05 AM