Developer forum

Forum » Integration » Product Grouping from ERP system

Product Grouping from ERP system

Asim Shahzad
Reply

Hi,

We have this issue where we are getting the products and all the product grouping information from our ERP system. We are getting this information for 2 different shops e.g. Shop1 and Shop2.

when we are shoping the products of SHOP1 for some reason it is also showing the products of SHOP2. We do have live integration enabled so when the user view the products, a live call is sent to ERP to get latest information regarding the products. In that call it is also sending products from SHOP2 to SHOP1 URL. In response we are getting error that "this product is not found".

We think there is something wrong in the grouping information for both the SHOPS. Has anybody faced this kind of issue ?

Also can we know which tables in DW are related to product groups and how they are related to each other ?

or an SQL query which is used by DW product catalogue app to show the selected products in the web.

Regards

Asim Shahzad


Replies

 
Dmitriy Benyuk Dynamicweb Employee
Dmitriy Benyuk
Reply

Hi Asim,
the tables to check the relations:
EcomShopGroupRelation
EcomGroupRelations
EcomGroupProductRelation
You need to check what settings do you have in your product catalog module: show products from specific shop, or slected correct groups from just one shop, index with query with correct shop filter.
Regards, Dmitrij
 

 
Asim Shahzad
Reply

Hi Dmitriy,

Thank you for your response and your tips. That was actually an error on our part, our indexes in the module did not take ShopId into account, so that part is now fixed. 

HOWEVER, the error still persists unfortunately. 

We think the problem is related to this here. In our product batch we get these two tables: EcomGroupProductRelation and EcomGroups. EcomGroups's unique key is the combination of both GroupID and GroupLanguageID, whereas in EcomGroupProductRelation we only get the GroupID and not the GroupLanguageID. So if the IDs for multiple ProductGroups are the same, it will add the product to the first group it finds with that ID, which happens to be tied to SHOP1. And so, all of our products, even the ones with other ShopIds, are added to the same groups in SHOP1. 

Where is this GroupLanguageID supposed to be gotten from?

 
Dmitriy Benyuk Dynamicweb Employee
Dmitriy Benyuk
Reply

Hi Asim,
yes, the GroupID with the same value among two shops is a problem. So you can choose from this options:
1) change it in the ERP
2) change the code unit that fill that values for the GroupIds/GroupParentIds with some prefix e.g. "Shop1.Group1". That will require to be consistent across all codeunit code and change that group id values for the all passed tables xml's (EcomGroups, EcomShopGroupRelation, EcomGroupRelations, EcomGroupProductRelation)
3) You can make the prefixes in the batch Data Integration import jobs. Save the xml content returned from the ERP with a groups/products data from Shop1 to some xml file.
Create the XmlProvider -> DynamicwebProvider DI job that will be used in the scheduled task for the impot (do not use the option "Create mappings at runtime" and point it to your xml file for Shop1 and make table to table manual mappings). In the mappings add the prefixes:

Do the same prefixes for the all tables: EcomGroups, EcomShopGroupRelation, EcomGroupRelations, EcomGroupProductRelation

Regards, Dmitrij

 

You must be logged in to post in the forum