Parent / child relationships

// Contents

Introduction
Child products
Parent products
Grandparent products
How to set up relationships via a product feed
How to set up relationships via an API connection

// Introduction

Another important thing to consider before starting to sell products via marketplaces is multiple variants of the same product. For example a t-shirt: this comes in several sizes and in some cases also in multiple colors.

In order to get several sizes connected and variations (children) connected to the same product (the parent), the children need to include the parent's unique identifiers. For an example, see the XML-file below:

<Products>
    <Product>
        <Id>25320</Id>
        <MerchantProductNo>001201-blue</MerchantProductNo>
        <Name>T-shirt with short sleeves BASIC</Name>
        <Description>
        <br><br> Basic t-shirt with short sleeves. The model has a tight fit and is available in 2 colors.
        <br><br>Material:</br> 92% cotton 8% elastane.
        </Description>
        <Price>15.00</Price>
        <MSRP>24.99</MSRP>
        <PurchasePrice>10.00</PurchasePrice>
        <Stock>0</Stock>
        <ShippingCost>3.95</ShippingCost>
        <ShippingTime>
        Ordered on working days before 17:00, delivered the next day.
        </ShippingTime>
        <Brand>MyBrand</Brand>
        <Url>http://www.myshop.com/shirt-basic-blue</Url>
        <ParentMerchantProductNo/>
        <ParentId/>
        <ImageUrl>http://feeds.channelengine.net/shirt-basic-blue.jpg</ImageUrl>
        <Category>Women > Tops > T-shirts > Shortsleeve > Basic</Category>
        <VendorProductNo>120675B</VendorProductNo>
        <Color>Blue</Color>
        <Size/>
        <EAN/>
        <Type>parent</Type>
    </Product>
    <Product>
        <Id>25321</Id>
        <MerchantProductNo>001201-blue-S</MerchantProductNo>
        <Name>T-shirt with short sleeves BASIC Blue: S</Name>
        <Description>
        <br><br> Basic t-shirt with short sleeve. The model has a tight fit and is available in 2 colors.
        <br><br>Material:</br> 92% cotton 8% elastane.
        </Description>
        <Price>15.00</Price>
        <MSRP>24.99</MSRP>
        <PurchasePrice>10.00</PurchasePrice>
        <Stock>0</Stock>
        <ShippingCost>3.95</ShippingCost>
        <ShippingTime>This product is currently out of stock</ShippingTime>
        <Brand>MyBrand</Brand>
        <Url>http://www.myshop.com/shirt-basic-blue</Url>
        <ParentMerchantProductNo>001201</ParentMerchantProductNo>
        <ParentId>25320</ParentId>
        <ImageUrl>http://feeds.channelengine.net/shirt-basic-blue.jpg</ImageUrl>
        <Category>Women > Tops > T-shirts > Shortsleeve > Basic</Category>
        <VendorProductNo>120675BS</VendorProductNo>
        <Color>Blue</Color>
        <Size>S</Size>
        <EAN>8719351029609</EAN>
        <Type>child</Type>
    </Product>
    <Product>
        <Id>25322</Id>
        <MerchantProductNo>001201-blue-M</MerchantProductNo>
        <Name>T-shirt with short sleeves BASIC Blue: M</Name>
        <Description>
        <br><br> Basic t-shirt with short sleeve. The model has a tight fit and is available in 2 colors.
        <br><br>Material:</br> 92% cotton 8% elastane.
        </Description>
        <Price>15.00</Price>
        <MSRP>24.99</MSRP>
        <PurchasePrice>10.00</PurchasePrice>
        <Stock>3</Stock>
        <ShippingCost>3.95</ShippingCost>
        <ShippingTime>Ordered on working days before 17:00, delivered the next day.</ShippingTime>
        <Brand>MyBrand</Brand>
        <Url>http://www.myshop.com/shirt-basic-blue</Url>
        <ParentMerchantProductNo>001201</ParentMerchantProductNo>
        <ParentId>25320</ParentId>
        <ImageUrl>http://feeds.channelengine.net/shirt-basic-blue.jpg</ImageUrl>
        <Category>Women > Tops > T-shirts > Shortsleeve > Basic</Category>
        <VendorProductNo>120675BM</VendorProductNo>
        <Color>Blue</Color>
        <Size>M</Size>
        <EAN>8719351029610</EAN>
        <Type>child</Type>
    </Product>
    <Product>
        <Id>25323</Id>
        <MerchantProductNo>001201-blue-L</MerchantProductNo>
        <Name>T-shirt with short sleeves BASIC Blue: L</Name>
        <Description>
        <br><br> Basic t-shirt with short sleeve. The model has a tight fit and is available in 2 colors.
        <br><br>Material:</br> 92% cotton 8% elastane.
        </Description>
        <Price>15.00</Price>
        <MSRP>24.99</MSRP>
        <PurchasePrice>10.00</PurchasePrice>
        <Stock>11</Stock>
        <ShippingCost>3.95</ShippingCost>
        <ShippingTime>Ordered on working days before 17:00, delivered the next day.</ShippingTime>
        <Brand>MyBrand</Brand>
        <Url>http://www.myshop.com/shirt-basic-blue</Url>
        <ParentMerchantProductNo>001201</ParentMerchantProductNo>
        <ParentId>25320</ParentId>
        <ImageUrl>http://feeds.channelengine.net/shirt-basic-blue.jpg</ImageUrl>
        <Category>Women > Tops > T-shirts > Shortsleeve > Basic</Category>
        <VendorProductNo>120675BL</VendorProductNo>
        <Color>Blue</Color>
        <Size>L</Size>
        <EAN>8719351029611</EAN>
        <Type>child</Type>
    </Product>
</Products>

The XML-file contains 1 parent (SKU 25320) and 3 children in 3 different sizes. If there, for example, is also a yellow variant of the same item, a similar tree could be created with something like 001201-yellow being the parent.

// Child products

A "child" (sometimes referred to as a simple) product is the actual sellable product for a marketplace. This product will have specific unique product attributes like its EAN, MerchantProductNo (SKU), size and color to differentiate it from other product. Most marketplaces will use the SKU or GTIN/EAN as the unique identifier for a product.

Please note: it is important that every child has its own price, stock, MerchantProductNo, and EAN. If you for example only use 1 EAN for multiple sizes, most marketplaces will reject this or only list one product.

// Parent products

"Parents" are generally speaking unsaleable products, but are necessary to set up correctly in ChannelEngine so these products are grouped together with proper relationship to each other. This is needed in order to correctly set parent-child relations for marketplaces that support this. Also, please realize some marketplaces use the generic data like the description from the parent product. An example marketplace for this behaviour is Amazon: 

The Clothing, Accessories and Luggage, Sports and Outdoors, and Beauty categories display best-selling parent products in search results and on product detail pages. This means that display elements such as product title and description appear from the data associated with the parent product.
https://sellercentral.amazon.co.uk/gp/help/help.html?itemID=G202135360&

While some CMS, PIM or ERP systems allow sizes or colors to be an ‘option’ of a parent product and this works fine for your own webshop(s), this will make it very hard or impossible to sell these individual products (children) on marketplaces.

// Grandparent products

In some cases, a "grandparent" product can also exist (but not many marketplaces support this) to add an extra level for the hierarchy of a product family. This would the common parent of a particular type (parent) and could also be applied to the previous XML example. This would result in:

<MerchantProductNo>001201</MerchantProductNo>
	<MerchantProductNo>001201-yellow</MerchantProductNo>
		<MerchantProductNo>001201-yellow-S</MerchantProductNo>
		<MerchantProductNo>001201-yellow-M</MerchantProductNo>
		<MerchantProductNo>001201-yellow-L</MerchantProductNo>
	<MerchantProductNo>001201-blue</MerchantProductNo>
		<MerchantProductNo>001201-blue-S</MerchantProductNo>
		<MerchantProductNo>001201-blue-M</MerchantProductNo>
		<MerchantProductNo>001201-blue-L</MerchantProductNo>

This grandparent is optional and usually only relevant in case of fashion products.

// How to set up relationships via a product feed

Setting up relationships via the API works the same way as for product feeds, however, it might be a bit unclear when to use what attribute to identify the level above. Basically the relationship is set up that each level refers to its immediate parent via a specific (grand)parent sku field.

  • Child product --> refers to its parent by placing the MerchantProductNo of its parent in the Parent sku field. Be aware that a 'child' does not have its own reference to a Grandparent sku, as that will mess up the relationship. 

  • Parent product --> refers to its parent (the grandparent) by placing the MerchantProductNo of its parent in the Grandparent sku field.

  • Grandparent product --> does not need any references to its children or grandchildren

Please be aware that parent and grandparent products have to exist in ChannelEngine in order to be properly used for marketplaces. Therefore they are required to be included as individual products in your product feed(s) or if this is not possible to can let these be generated automatically.

/ Generate parents and grandparents

It is possible to automatically have ChannelEngine generate parent (and grandparent) products if you can not supply them yourselves. In that case, you will enable the ' Generate parent products' or 'Generate grandparent products' setting at the top of the product feed mapping. All information that is shared among the individual child products having the same '(grand)parent sku', will be automatically added to the product data of the (grand)parent product. 

To successfully use this option there is one requirement: there already has to be a shared unique identifier for that 'parent' available on the products. With other words, there needs to be an existing shared reference to an attribute that can be used as the MerchantProductNo for the (grand)parent.

// How to set up relationships via an API connection

Setting up relationships via the API works the same way as for product feeds, however, it might be a bit unclear when to use what attribute to identify the level above. Basically the relationship is set up that each level refers to its immediate parent via a specific ParentMerchantProductNo field.

  • Child product --> refers to its parent by placing the MerchantProductNo of its parent in the ParentMerchantProductNo field.
  • Parent product --> refers to its parent (the grandparent) by placing the MerchantProductNo of its parent in the ParentMerchantProductNo2 field.
  • Grandparent product --> does not need any references to its children or grandchildren

To visualize this with an example:

[
    {
        "Ean": null,
	"Description": "Grandparent product of awesome product",
        "MerchantProductNo": "GP-AwesomeProduct",
        "Name": "Awesome Product",
        "ParentMerchantProductNo": null,
        "ParentMerchantProductNo2": null
    },
    {
        "Ean": null,
	"Description": "Parent product of awesome product",
        "MerchantProductNo": "P-AwesomeProduct",
        "Name": "Awesome Product - Yellow",
        "ParentMerchantProductNo": null,
        "ParentMerchantProductNo2": "GP-AwesomeProduct"
    },
    {
        "Ean": "8712345678941",
	"Description": "Awesome product itself which can be sold on marketplaces",
        "MerchantProductNo": "AwesomeProduct",
        "Name": "Awesome Product - Yellow - Size L",
        "ParentMerchantProductNo": "P-AwesomeProduct",
        "ParentMerchantProductNo2": null
    }
]

Please note: unlike with product feeds, there's no option to automatically generate parents and/or fetch data from the parent. It is required to include parent and grandparent product(s) with all relevant data in the API-calls.