Developer forum

Forum » PIM » Automatically create variant family and assign variants using data integration and ecom provider

Automatically create variant family and assign variants using data integration and ecom provider

Stephen Anthony Jackson
Stephen Anthony Jackson
Reply

Hello. Does anyone know how I can automatically create a family and group variants under it using data integration with ecom provider and no additional logic like in a tablescript?

Given the following list

ID, Model, Family

1, AA, 6210

2, AB, 6210

3, FFG, 6210

I would like to create a variant family using the "family" column to to determine which products belong to the master product

Cheers


Replies

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Stephen,
In such situations, I usually create a family using the interface, and then export the data to see how they relate to each other.

If it is a simple setup, you should look into: EcomProducts, EcomVariantGroups, EcomVariantOptions, EcomVariantGroupProductRelation.

Based on this data, you can decide how you will import it.

Keep in mind that DW will automatically generate VariantID and VariantGroupIds. If you have predetermined values, you can supply the IDs as long as they are just alphanumeric strings. Any special characters or spaces could mess up the data structure. In your example,VariantOptionIds would be AA, AB, FFG. If it is possible, I suggest though to keep a consistent string length of the VarianOptionIDs.

Also, keep in mind that Variants of a Model are connected using the same ProductID which in this case would be your ModelId (6210 in your example).

I hope this helps.

Adrian

 
Stephen Anthony Jackson
Stephen Anthony Jackson
Reply

Thanks Adrian. Thats kinda what I was leaning towards doing, but just wanted to check if it was possible

Cheers

//Steve

 

You must be logged in to post in the forum