Once you have created your products, (for more information, see EP PXM Products API), you can use the Hierarchies API to organize your products into categories and sub-categories. You can do this by creating hierarchies. A hierarchy is a tree structure that consists of a root node with 1 or more children nodes. Each child node can also have one or more children nodes, and so on, creating a parent-child relationship between nodes.
- You can duplicate hierarchies. This enables you to quickly and easily create multiple hierarchies with similar nodes. For more information, see Duplicate a Hierarchy.
- You can move an existing node to a different location within the same hierarchy by changing its parent node. If the node has child nodes, they retain their relationship with the moved node. In other words, the node and all its children move to the new location in the hierarchy. For more information, see Create a Node in a hierarchy.
- Sibling nodes are nodes with the same parent. Sibling nodes must have unique names and unique slugs.
- Nodes that are in different locations in a hierarchy, or across multiple hierarchies, do not need unique names and slugs.
For example, a department store may have a hierarchy for major appliances.
- If you moved the Electric Ranges node to the Built-in node, all the children of the Electric Ranges node also move to the Built-in node.
- The nodes Electric Ranges and Gas Ranges are siblings. They must have unique names and slugs.
- The Double Oven nodes can have the same name because they have different parents.
You can create the Major Appliances hierarchy by performing the following steps.
- Using Create a Hierarchy, create a hierarchy whose name is Major Appliances. Each hierarchy has a hierarchy ID. In other words, the hierarchy ID is the ID of the root node.
- Using Create a Node in a hierarchy, create the following child nodes. When you create a node in a hierarchy, by default, the node is a child of the root node. Specify
sort_orderto configure the order of the nodes.
- Using Create a Node in a hierarchy, create the Electric Ranges node, specifying Ranges as the parent node.
- Using Create a Node in a hierarchy, create the following nodes, specifying Electric Ranges as the parent node.
- Electric Ranges 24ˮ
- Electric Ranges 30ˮ
- Double Oven
- Using Create a Node in a hierarchy, create the Gas Ranges node, specifying Ranges as the parent node.
- Using Create a Node in a hierarchy, create the following nodes, specifying Gas Ranges as the parent node.
- Gas Ranges 24ˮ
- Gas Ranges 30ˮ
- Gas Ranges 32"
- Double Oven
- Using Create a Node in a hierarchy, create the following nodes, specifying Dishwashers as the parent node.
- Standalone After you define hierarchies, you can associate products with nodes. A product can belong to multiple nodes within a hierarchy and across hierarchies. You cannot associate a product with the root node. For more information, see Create Node Product Relationships.
The hierarchies determine which products appear in the catalog, that is, only the products that are associated with the selected hierarchies are included in the catalog. You can improve how your customers search your store using the Catalog View API.
You can also specify the order you want your hierarchies to display in a published catalog. You can order your hierarchies on a catalog-by-catalog basis.
For more information, see Update a Catalog.
The Hierarchy Object
|The generated unique identifier for the hierarchy.|
|The name of the hierarchy, such as |
|A description of the hierarchy.|
|A unique slug for the hierarchy.|
The Node Object
|The generated unique identifier for the node.|
|The name of the node, such as |
|A description of the node.|
|A slug for the node. Slugs must be unique among sibling nodes in the hierarchy. Otherwise, a slug can be non-unique within the hierarchy and across multiple hierarchies.|