cancel
Showing results for 
Search instead for 
Did you mean: 

How to create a taxonomy using MDM API?

Former Member
0 Kudos

Hi All,

Are there any examples of creating a taxonomy using MDM API? I couldn't find any relevant API classes so far.

Thanks!

Roman D.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Roman,

Please have a look at the AddAttribute and LinkAttribute methods of the CatalogData class. AddAttribute allows you to create attributes and LinkAttribute links an attribute to a category. To create categories of course, you use the AddRecord method of the CatalogData class.

These three methods should allow you to create a full taxonomy.

Hope this helps,

Richard

Former Member
0 Kudos

Hi Richard,

Thanks for your response. I am looking to create a taxonomy structure, for example, Root Node ==> Child Node ==> Child node of child node, etc...

In other words, I want to create a brand new hierarchy using the API from top to down (about 4 nodes deep). Do you know which API classes can help me?

Thanks,

Roman

Former Member
0 Kudos

Hi Roman,

The AddRecord method has the following parameters

table - the table where records are to be added.

fields - list of field name/value pairs.

parentID - (if hierarchical table) the parent record/node ID.

position - (if hierarchial table) the position among siblings (zero-based).

and it returns the record id of the record just created.

Call it to create the root node and keep the record id.

Call it again and pass the record id of the root node and pass it as the parentID. Repeat until the whole hierarchy is created.

Hope this helps,

Richard

Former Member
0 Kudos

Thanks so much, Richard!

Roman D.

Answers (0)