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:
-
PRS__PRODUCT_DEFINITION_NOT_FOUND: The
cspmb__Product_Definition_Name__cpicklist 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 thecspmb__Product_Definition__clookup -- both must be set correctly. -
Variant must only have a Master: A CP with Role = "Variant" has its
cspmb__Master_Price_item__cfield pointing to a CP that does not have Role = "Master". Variants can only reference Master CPs as their parent. -
CNS__SKU_MISMATCH: The
__SKU__attribute on the Product Configuration does not match thecspmb__Price_Item_Code__con 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
- Open the Product Definition assigned to the affected CP
- Locate the
__SKU__attribute - Set its value to match the
cspmb__Price_Item_Code__cexactly - 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__cpicklist 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.jsonattachment on failed publications for specific error details -- the UI may not show the underlying cause
Priyanka Bhotika
Comments