How to ingest product groups
There are two steps to ingesting Product Groups into Cloudshelf, and it is important to understand the relationships between a Product Group and Products. So before we jump into how to do this, we are going to look at a real-world example of what a product might look like in Cloudshelf.
The Product Group and Product Relationship
#
A Product Group can be thought of as a parent container for a collection of Products. Product Groups have very limited data as they are intended to work a bit like an Asile in a store. However, it's important to remember that a Single Product can be part of many groups which can make understanding the relationship hard.
Therefore, using the above information we could see a relationship that looks something like this: (These two relationships are identical, but showing them from different points of view)
- Product Group One
- Product One
- Product Two
- Product Three
- Product Group Two
- Product Two
- Product Three
- Product One
- Product Group One
- Product Two
- Product Group One
- Product Group Two
- Product Three
- Product Group One
- Product Group Two
A real world example here might look like:
- All Soda
- Coca Cola
- Fanta
- Fruit Flavored Soda
- Fanta
- Sprite
- Coca Cola
- All Soda
- Fanta
- All Soda
- Fruit Flavored Soda
- Sprite
- All Soda
- Fruit Flavored Soda
Ingesting data:
#
As mentioned above there are two steps, you need to ingest the Product Group (the parent object), and then add products to those groups.
First, call the UpsertProductGroups Mutation ; optionally provide your own GlobalIds or, make a note of the IDs returned to you; you’ll need to know one of these for the next step.
Second, call the UpdateProductsInProductGroup Mutation ; again optionally provide your own GlobalIds or the ones that have been provided to you during Product Group & Product Creation.
That's it! You’ve ingested product data correctly, and you should be able to call the ProductGroup Query and see the products in the group.
Product Ingestion
availablePDPBlocks