Hello I am trying to figure out how to work with Product and variants in shopify and have some trouble to get my problem solved.
Here is what I have at the moment:
I am using SAP ERP ECC 6.o and have products and variants stored there.
What I am trying to do is to create Baseproducts with one call and their respective variants with another and use SAP BTP Integration Suite for this problem.
Now I was able to create baeproducts using productCreate but now I have the problem to create the respective variants one-by-another.
My biggest problem is, that if I create a baseproduct with options and values the respective variants are created automaticly.
Now I have a problem, because there exit productVariantByIdentifier but no productVariantByOptions.
Now I found that there productSet exist, but this one only works, when I create Products with all their variants at once, but this will not happen.
is there a way to create variants and update the options at the same time?
here is what I had in mind:
- MATMAS of variant comes in
- check if variant exist by identifier
- if yes update → 8
- if not the get baseproduct id
- check if baseproduct exist by identifier
- if yes
- check if options exist (in loop)
- if no update option with value
- if yes create new option with value
- create variant
- check if options exist (in loop)
- if no create baseproduct with variant using productset
- end
This was my idea but I don’t know how to realisie this baseproduct update with new variantoptions
the identifier will be the matnr ov the vairant/baseproduct
I hope some can give me the right hints how to solve my problem.
Cheers,
Serdar