Hierarchy Fields

Created by Nicolas Wussler, Modified on Tue, 16 Aug, 2022 at 8:25 AM by Igor Galic

In this article, we will be going over what Hierarchy Fields are, how they behave while mapping, and when and where they should be applied.

 

 

Hierarchy is a basic concept in data and database theory and helps to show the relationships between smaller and larger components in a database or data file. It is used to give a better sense of understanding about the components of data and how they are related.

 

 Below is our resource format for hierarchy nodes:

 

Field name

Type

Mandatory

Description

id

int

true

Internal hierarchy item id.

value

string

false

Unique hierarchy item value.

label

string

true

Hierarchy item label.

parent

string

false

Parent item value.

 

There are 4 options of usage for our Hierarchy Fields and those are :

 

Create:

Single or batch creation of hierarchy nodes.

 

NOTE: This endpoint accepts multiple hierarchy nodes in request body. That means that instead of a single object, array of nodes to be created could be provided.

 

These are the paramaters that Create has:

  • template_id    - ID of template  (Number)

  • entity_id          -ID of data type to which this field belongs (Number)

  • field_id            -ID of hierarchy field which is configured (Number)

 

Retrieve:

Retrieve all hierarchy nodes. Use optional parameters for filtering result.

 

Depending on the data type, The request will be different.

 

These are the paramaters that Retrieve has:

  • template_id -ID of template (Number)

  • entity_id - ID of data type to which this field belongs (Number)

  • field_id -ID of hierarchy field which is configured (Number)

  • parent - Value of parent node. If Null i specified, Root nodes will be returned (String)

    Example :clothes Default: null

  • includeSubitems -If parameter is true, full tree is retrieved ( Bool)

    Example: true. Defaulth: false

 

 

Update:

Updates single hierarchy node.

 

These are the paramaters that Update has:

  • template_id    - ID of template  (Number)

  • entity_id          -ID of data type to which this field belongs (Number)

  • field_id            -ID of hierarchy field which is configured (Number)

  • node_id           -ID of hierarcy Node. (Number)

 

 

Delete:

Deletes single hierarchy node.

 

These are the paramaters that Delete has:

  • template_id    - ID of template  (Number)

  • entity_id          -ID of data type to which this field belongs (Number)

  • field_id            -ID of hierarchy field which is configured (Number)

  • node_id           -ID of hierarcy Node. (Number)

 

Hierarchy Field has a connection of nodes as "Parent" and "Child" in which you can have multiple "Child" nodes in one "Parent" node and you can have multple "Parent" nodes if needed. It can contain Multiple Values  if needed as shown in the screenshot below:

 

Here is shown the configuration of Hierarchy Field.

 

 

 

 

When you get to the mapping of the Hierarchy Fields, there are some possibilites.

 

If needed, you can use your Root Node that you created as Fallback Value, and you choose which of your Nodes you want to use in your Configuration.

 

 Let's give an example if you have multiple Nodes:

 

You can use one Node for Fallback Value, and the other one as Destination Attribute

 

 

Extra Information is found here

 


We hope you found this Article helpful :)

 

If you still have any questions or inquiries left unanswered, please email us at [email protected].

Additionally, you can shoot us a message via our website's chat widget or get in touch with us on our Facebook page, and our Customer Support Representatives will be more than happy to assist you.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article