Try our conversational search powered by Generative AI!

Issue with multiple catalogs, multi site and product import from inRiver

Vote:
 

I have an issue where we use inRiver PIM to import products to Episerver. The setup is one channel and adapter for each site. The products and channel lives in the same PIM solution and each product can live in multiple channels.
Since Episerver PIM adapter works with using the old catalog import Mediachase.Commerce.Catalog.ImportExport.CatalogImportExport I don't see any way to set or check for the Primary Category for the product. I also get a System.Data.SqlClient.SqlException (0x80131904): Cannot insert duplicate key row in object 'dbo.NodeEntryRelation' with unique index 'IX_NodeEntryRelation_PrimaryRelation'. error when a product is imported in another channel but already existing.

I was hoping Epi would detect this automaticly and set the new Node as "Additional Category".

Is there a way to either duplicate the product so it can have a new Primary based on what Catalog it lives inn or set multiple primary categories?

#199637
Dec 04, 2018 10:55
Vote:
 

In theory the import process would detect that if the entry already has one primary node, and the importing catalog contains another primary node-entry relation, then the importing relation will override the existing one. This is possibly a bug that due to your catalog import structure, the import does not work properly. I'd suggest you to contact developer support for further assistance.

If you can share your catalog import file here, I can look into it. 

#199639
Dec 04, 2018 11:11
Vote:
 

Thank you Quan.

How does the import detect if a primary is already set?

What happens is that the product / variant has the same Code but different content guids in the database.

an example would be:

  1. Code: 12345, ContentGuid: 00123-0000-12345
  2. Code: 12345, ContentGuid: 00143-1000-12345

Code is based on ERP's product number and the ContentGuid is based on the InRiver channel systemid and the product number. I think this is default from the connector.

If the product has the same content guid the import will fail saying the content guid already exists.

I've also created a support ticket for this.

#199644
Edited, Dec 04, 2018 11:29
Vote:
 

That's very strange. Both code and content guid are supposed to match. I can't remember exactly what, but IIRC if code has higher priority so if code matches but content guid does not, content guid will be updated (it might very well be the opposite way, i.e. content guid has higher priority).

The import will try to load the existing relations to see if the entry has any primary relation or not, then decide. 

#199649
Edited, Dec 04, 2018 12:20
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.