Magidoc

How to ingest products

Products in Cloudshelf are made up of two parts, the Product and the Product Variants.

Therefore, when ingesting products you need to ingest the Product and then Product Variants.

First, call the UpsertProducts 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 UpsertProductVariants Mutation ; again optionally provide your own GlobalIds or, make a note of the IDs returned to you.

Finally, you should Report Expected Catalog Information .

That's it! You’ve ingested product data correctly, and you should be able to call the Product Query and see the variants.

Product and Variant Relationships

#

A Product can be thought of as a parent container for a collection of Variants. Products have very limited data as most of the data is related to a variant.

A Product Variant can be thought of as a child entity of the Product, and it cannot exist without a parent Product. A Product Variant contains all the information you would expect such as price & skus.

Therefore, using the above information we could see a relationship that looks something like this:

  • Product One
    • Variant One for Product One
    • Variant Two for Product One
  • Product Two
    • Variant One for Product Two
    • Variant Two for Product Two
    • Variant Three for Product Two
  • Product Three
    • Variant One for Product Three

A real world example here might look like:

  • Coca Cola Drink
    • Original
    • Diet Coke
    • Coca Cola Zero
    • Caffeine Free Coke
    • Diet Coke - Caffeine Free
    • etc…