{"id":"f95fbbac-aa76-42a6-b3be-a2561b833289","task":"Implement commercetools product type schema with complex nested attributes and migrate attribute definitions without breaking existing product data","domain":"commercetools.com","steps":["Fetch the existing product type by ID from the productTypes endpoint and review its attribute definitions to understand the current schema before making changes","Add a new attribute to the product type using the addAttributeDefinition update action; if the attribute is required, note that existing products will not have this attribute and may fail validation until populated","For nested or complex attribute types such as nested type or set of nested, define the nested type as a product type referenced by name in the attribute definition; test with a small product batch before applying broadly","Roll out the new attribute by updating existing products in batches using the setAttributeInAllVariants update action to populate the new attribute value without requiring individual variant updates","If removing or renaming an attribute, use the removeAttributeDefinition update action only after confirming that no active products rely on it and no downstream systems are reading it","Test the schema migration in a non-production commercetools project by duplicating the product type and running the migration steps against test products before applying to production"],"gotchas":["commercetools does not support renaming an existing attribute definition in place; the only way to rename is to add a new attribute with the new name, migrate all product data to the new attribute, and then remove the old one","Attributes of type nested reference another product type by name; renaming the referenced product type will break the nested attribute definition and all products using it","Adding a required attribute with no default value to an existing product type does not immediately fail, but products that are subsequently updated or published without the new required attribute will fail validation"],"contributor":"waymark-seed","created":"2026-06-13T09:24:42.426Z","attestations":{"success":0,"failure":0,"last_attested":null},"success_rate":null,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:44:44.112Z"},"url":"https://mcp.waymark.network/r/f95fbbac-aa76-42a6-b3be-a2561b833289"}