-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handle product deletions and variant assignments #116
Comments
@lojzatran @butenkor Do you happen to know if this will be part of the new Importer API? |
@Oehmi It is being implemented in external library (https://github.com/commercetools/commercetools-node-variant-reassignment) and later integrated here. AFAIK new importer API will be using https://github.com/commercetools/commercetools-sync-java and here we will need to apply same logic: commercetools/commercetools-sync-java#132 |
Description
It might happen that product is created with wrong variant assignment. Example:
Product with key 1
:sku 1
Product with key 2
:sku 2
Product with key 3
:sku 3
At some point external data (CTP project, CSV, XML...) changes to:
Product with key 4
:sku 1
,sku 2
,sku 3
Currently this will lead to an error that
Product 4
can not be created as sku 1, 2 and 3 are already in use in other products. Handling above scenario manually is time intensive and error prone and it gets very problematic if the change has to be distributed for example from master to multiple another CTP projects.Expected Behaviour
Product 4
should be created with sku 1, 2 and 3 and all conflicting products or variants deleted.To clarify
Should product 1,2 and 3 be deleted or only its variants? Consider for example that Product 1 could have also variant assigned with sku 4?
Shall sync decide what to do in this case or rather provide callback so that the user of the library has control?
Consider optional migration of existing data* from deleted variant product 1, sku 1 to recreated one product 4, sku 1 variant.
Existing data: data which might be set only once by another import process and is not available in new variant/product data. Good candidates are prices or other attributes/flags like product approval.
Consider other use cases if above example is inverted.
Related
commercetools/commercetools-sync-java#132
The text was updated successfully, but these errors were encountered: