Problem with product/price list import using Litium integration kit

Since upgrading from Litium 7.2.3 to 7.6.1 we have noticed some problem with our price-list import.

It works sporadically, sometimes 2/6 times per day but some days not at all.

I believe it’s coupled with the dataservice batching, the error is:
Cannot insert duplicate key row in object ‘Products.PriceListItem’ with unique index ‘IX_PriceListItem_VariantSystemId_PriceListSystemId_MinimumQuantity’. The duplicate key value is (79893fd1-f496-420d-8ff6-939e71a5e0ac, 9d5cd4f8-f630-4442-9d6e-cff6f27d8991, 0.0000).
The statement has been terminated.

The second key( “9d5cd4f8-f630-4442-9d6e-cff6f27d8991” ) is present on all error occasions.

Down below is the PostProcess method.

Litium version: 7.6.1

The input should be fine, since we can confirm that no errors occurs on the 7.2.3 version with the same input.

Any ideas how to solve this?

Seems like you’re not checking if the price item already exists before trying to create it again. Could you swap the order of delete and create?

Thanks for your answer. That was my guess as well and I actually tested that yesterday.

I then receive this error:
Messages: Violation of PRIMARY KEY constraint ‘PK_PriceListItem’. Cannot insert duplicate key in object ‘Products.PriceListItem’. The duplicate key value is (cc79e0f7-995b-446e-87b0-aeac6ca60007).
The statement has been terminated.

Worth noting:
This import task runs in intervals of every other hour. Yesterday the first task went through and succeeded with the import. The run 2 hours after that failed and produced the error above.

Still the same error on the runs today.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.