Start a conversation

E-Commerce Catalogue Publication Fails with Product Definition, Master/Variant, or SKU Errors

Symptom

E-Commerce catalogue publication fails. The errors.json attachment on the csb2c__E_Commerce_Publication__c record shows one or more of these errors:

  • PRS__PRODUCT_DEFINITION_NOT_FOUND: "Pricing service data failure. Product Definition not found."
  • Variant must only have a Master: "Commercial Product should have only a Master as Master."
  • CNS__SKU_MISMATCH: "Configurator service data failure. Product configuration attribute SKU value is not equal to product code."

The summary.json shows catalogue: null, products: null indicating the publication aborted before processing.

Cause

These errors indicate data configuration issues on the Commercial Product (CP) records:

  1. PRS__PRODUCT_DEFINITION_NOT_FOUND: The cspmb__Product_Definition_Name__c picklist field on one or more CPs is set to "Sample Product" (the default package value) instead of a valid Product Definition name. Note: this is a separate picklist field from the cspmb__Product_Definition__c lookup -- both must be set correctly.

  2. Variant must only have a Master: A CP with Role = "Variant" has its cspmb__Master_Price_item__c field pointing to a CP that does not have Role = "Master". Variants can only reference Master CPs as their parent.

  3. CNS__SKU_MISMATCH: The __SKU__ attribute on the Product Configuration does not match the cspmb__Price_Item_Code__c on the Commercial Product. Either the attribute is empty or the product code was changed without updating the SKU.

Resolution

Step 1: Check the errors.json file

Open the failed publication record in Salesforce. Download the errors.json attachment and identify which CPs are failing and with which error code.

Step 2: Fix PRS__PRODUCT_DEFINITION_NOT_FOUND

Query the affected CPs:

SELECT Id, Name, cspmb__Product_Definition_Name__c
FROM cspmb__Price_Item__c
WHERE cspmb__Product_Definition_Name__c = 'Sample Product'

Update cspmb__Product_Definition_Name__c to match the correct Product Definition name for each CP. If the correct PD name is not in the picklist values, add it via Setup > Object Manager > Commercial Product > Fields > Product Definition Name > Values.

Step 3: Fix Master/Variant relationship

For the affected Variant CP, verify that its cspmb__Master_Price_item__c lookup points to a CP with cspmb__Role__c = "Master". If the Master CP does not exist or has the wrong Role, correct it.

Step 4: Fix CNS__SKU_MISMATCH

  1. Open the Product Definition assigned to the affected CP
  2. Locate the __SKU__ attribute
  3. Set its value to match the cspmb__Price_Item_Code__c exactly
  4. Recompile the Product Definition

Step 5: Re-run pricing sync

After fixing data issues, re-run the pricing synchronization before retrying publication:
Navigate to the Pricing Service UI and trigger synchronization.

Step 6: Retry catalogue publication

Publish the catalogue again and verify the summary.json shows successful processing.

Additional Notes

  • The cspmb__Product_Definition_Name__c picklist field ships with "Sample Product" as its only default value. Always update this field when creating new Commercial Products.
  • The publication process validates both the picklist field AND the lookup field -- they must both reference the same valid Product Definition
  • The __SKU__ attribute is a required attribute per the E-Commerce Data Modelling guide (Section 4.1). It must be unique across the catalogue.
  • Always check the errors.json attachment on failed publications for specific error details -- the UI may not show the underlying cause
Choose files or drag and drop files
Was this article helpful?
Yes
No
  1. Priyanka Bhotika

  2. Posted

Comments