How to ingest product groups
Product Groups in Cloudshelf are essentially a way to group products together. They are intended to be used in a similar way to how you would use an Asile in a store.
Therefore, 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.
Finally, you should Report Expected Catalog Information .
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.
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
 
 
Ingest Products