We are having an issue with our product import. We are using Service API bulk import to import a catalog.xml file that has both entries and relations in it.
I have been investigating this for a couple of days and I'm stuck. The XML we send looks good and if I import it again (via Service API or Commerce Manager) the relations are correctly created. No matter how many times I try to import it again, I never get the behaviour that relations are missing. It's only when I run through our job that send them in in batches of 500 products and 250 relations that I get the error. And it's not even the same files / products that causes it, it seems random, which is a headache. I tried to turn down the batch size to 1 but to my surprise I still got missing relations.
What I have now turned to that at least works, is bulk importing the entries and then using Service API REST API to create the relations.
What I do to debug it is to look in the relations table and see if there are any new products (the import resets the create date to today) that does not have a parent.
select *
from CatalogEntry CE
left join CatalogEntryRelation R on CE.CatalogEntryId = R.ChildEntryId
where StartDate > '2020-09-02'
and R.ParentEntryId is null and ClassTypeId = 'Variation'