Start a conversation

Basket Save Fails Due to Duplicate Attribute Definitions on Product Definitions

Problem

When attempting to save a basket or solution, the operation fails with a 500 error. The CloudWatch logs show errors similar to:

Duplicate attribute definition name "POP Value" for product definition "Local Access" (a0gOZ000000fPKEYA2). Attribute definitions must have unique names.
Duplicate attribute definition name "Target MRC" for product definition "Port" (a0gOZ000000fPX7YAM). Attribute definitions must have unique names.
Duplicate attribute definition name "Target NRC" for product definition "Port" (a0gOZ000000fPX7YAM). Attribute definitions must have unique names.
Duplicate attribute definition name "Margin Category" for product definition "Port" (a0gOZ000000fPX7YAM). Attribute definitions must have unique names.

This prevents any configuration or basket updates from completing.

Root Cause

Multiple attribute definitions with identical names exist on the same product definition. CloudSense enforces uniqueness constraints on attribute definition names within a product definition. When duplicates exist, save operations fail validation.

This commonly occurs when:
- Attribute definitions are created via API or integration (e.g., CI/CD pipelines, data migration scripts)
- Manual duplication during configuration changes
- Concurrent attribute definition creation without proper uniqueness checks

Resolution Steps

  1. Identify the Affected Product Definitions:
  2. Review the error message to identify which product definitions have duplicate attribute definitions
  3. Note the product definition IDs and duplicate attribute definition names

  4. Navigate to Product Definition Setup:

  5. Go to Setup > Custom Settings > Product Definitions
  6. Search for the affected product definition by ID or name (e.g., "Port", "Local Access")

  7. Locate Duplicate Attribute Definitions:

  8. Open the product definition record
  9. Navigate to the Attribute Definitions related list
  10. Look for multiple attribute definitions with the same name
  11. Check the "Created By" and "Created Date" fields to identify which ones are duplicates (often created by integration users or on the same date)

  12. Remove Duplicate Attribute Definitions:

  13. Select the duplicate attribute definition(s) to delete
  14. Keep the original or most recently updated version
  15. If unsure which to keep, verify with the business owner or check if any configurations reference specific attribute definition IDs
  16. Delete the duplicate records

  17. Verify and Retry Save Operation:

  18. After removing duplicates, attempt to save the basket or solution again
  19. The operation should complete successfully without the 500 error

Prevention

To prevent duplicate attribute definitions from being created:

  • Implement uniqueness checks in integration scripts before creating attribute definitions
  • Use upsert operations based on name matching rather than always creating new records
  • Review CI/CD pipeline logic to ensure attribute definitions are not recreated on every deployment
  • Establish naming conventions and governance for attribute definition creation

Important Notes

  • Deleting an attribute definition that is actively referenced by product configurations may cause data integrity issues. Always verify usage before deletion.
  • If attribute definitions are managed via version control or deployment scripts, update those sources to prevent duplicates from being recreated.
  • This validation applies to all product definition types (products, product components, product options, etc.).
Choose files or drag and drop files
Was this article helpful?
Yes
No
  1. Priyanka Bhotika

  2. Posted

Comments