Developer forum

Forum » Integration » Product import to a specific group

Product import to a specific group

Johan Ulff
Reply

Hi, we have problems when importing products to the PIM in Dynamicweb from BC. We want all not imported products  in a special group called for example "New arrivals". This is easy to set up of course, settings a  constant value to the GroupRelationGroupId field in EcomGroupProductRelation table. But if a user then moves the product from "New arrivals" to another group to flag the product as "processed", we dont want the product to show up in "New arrivals" again when the next import is run.

Is it possible to do this?


Replies

 
Dmitriy Benyuk Dynamicweb Employee
Dmitriy Benyuk
Reply
This post has been marked as an answer

Hi Johan,

this can be solved by implementing a custom TableScript class that will implement a custom ProcessInputRow mehod.
You should use that TableScript for the EcomGroupProductRelation table and do not use any constant values, instead everything should reside
in the ProcessInputRow method. In this method you can check what product is currenly imported so you can then fill the correct value in the 
GroupRelationGroupId field, e.g. if it is a new product - use your "New arrivals" group, if not then keep its existing Dynamicweb group.
You can read about how to implement the script here:
https://doc.dynamicweb.com/training/t3-platform-developer/t3-platform-developer/3-6-extending-integration#sideNavTitle1-2

BR, Dmitrij

Votes for this answer: 1
 
Johan Ulff
Reply

Thanks for the quick and detailed answer Dmitriy! laugh

 

You must be logged in to post in the forum