Try our conversational search powered by Generative AI!

Commerce Catalog Import API - Issue with EntryRelations


Hi there!

We are checking some strange behavior in our Catalog Import process, and I have found something in the Epi code that I would like to see if anyone has experience the same.

Let's assume the following scenario:

  • We have Products and Variants.
  • We have a product with the Code: 911819619
  • We have two variants with codes 670097 and 680255.
  • There is a EntryRelation (ProductVariation) between 911819619 and 670097.

Attached you can find the DB queries in a screenshot.

We now want to add a new EntryRelation, between the Product 911819619 and the second variant 680255.
So, we prepare the following XML file and use the CatalogImport API (Mediachase.Commerce.Catalog.ImportExport.Import).

<?xml version="1.0" encoding="utf-8"?>
<Catalogs xmlns:xsi="" xmlns:xsd="">
<Catalog name="Products" lastmodified="2020-10-07T01:03:37.9880275Z" startDate="2020-10-07T01:03:37.988029Z" endDate="2040-10-07T01:03:37.9880304Z" defaultCurrency="usd" weightBase="lbs" defaultLanguage="en" sortOrder="0" isActive="true">
<Nodes totalCount="0">
<Entries totalCount="0">
<EntryRelation isActive="true">

After we run the import, nothing happens and the new relation is not being added.

While digging into the code in the Import, I found something that called my attention in the EntryRelationsReader.cs

It seems that if the Parent Entry already has a RelationType (in this case "ProductVariation") existing for any other item, the relation is not added (since it seems it goes to the else section).

I have confirmed this while doing some testing, for instance, removing the existing relation and adding both of them together in the XML seems to be working fine.

This is Commerce 13.23.X

Is anyone aware of an issue here?
Maybe this is done due to a restriction that I may not be aware?


Edited, Oct 20, 2020 21:38

This looks like a newly introduced bug to me. I will file a bug to Commerce team. Thank you for bringing this to our attention and apologies for any inconveniences it caused.

Oct 21, 2020 8:03
Peter Wind - Nov 27, 2020 11:01
Any news on this bug Quan?

We are apparently experiencing the same (

I think we can do some workaround in the meantime.

Thanks Quan!

Oct 21, 2020 14:35

The bug (COM-12349) is now fixed and is waiting for release. 

Nov 27, 2020 11:01
Peter Wind - Nov 27, 2020 11:03
Thank you Quan - Do you have a best guess on when we can expect it to be released?
Quan Mai - Nov 27, 2020 11:05
I don't know, ping-ed Commerce team about it. Maybe 2 weeks, maybe a bit longer. it's up to them now

For anybody having the same issue - The fix was released in the end-of december and we have just confirmed that it works in our solutions.

Jan 05, 2021 19:13
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* 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.