26 September 2024
Product catalogGraphQL
We introduced Product Tailoring of Attributes in public beta.
You can now customize product attributes for specific brands or countries, modeled with Stores, to enhance your product offering in different markets.
Changes:
- [API] Added ProductTailoringAttribute to the Product Tailoring API.
- [API] Added optional
attributesfield to ProductVariantTailoring and ProductVariantTailoringDraft. - [API] Added ProductTailoringSetAttributeAction and ProductTailoringSetAttributeInAllVariantsAction update actions to the Product Tailoring API.
- [API] Added optional
attributesfield to ProductTailoringAddVariantAction. - [GraphQL API] Added the
attributesRawfield to theProductVariantTailoringtype. - [GraphQL API] Added the
attributesfield to theProductVariantTailoringInputtype. - [GraphQL API] Added the
SetProductTailoringAttributeandSetProductTailoringAttributeInAllVariantstypes to the GraphQL schema. - [GraphQL API] Added the
setAttributeInAllVariantsandsetAttributefields to theProductTailoringUpdateActiontype. - [GraphQL API] Added the
attributesfield to theAddProductVariantTailoringtype.
The following changes were introduced in terms of GraphQL SDL:
extend type ProductVariantTailoring {
"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta"
attributesRaw: [RawProductAttribute!]!
}
extend input ProductVariantTailoringInput {
"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta"
attributes: [ProductAttributeInput!] = []
}
extend input AddProductVariantTailoring {
"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta"
attributes: [ProductAttributeInput!] = []
}
extend input ProductTailoringUpdateAction {
setAttribute: SetProductTailoringAttribute
setAttributeInAllVariants: SetProductTailoringAttributeInAllVariants
}
input SetProductTailoringAttribute {
variantId: Int
sku: String
name: String!
value: String
staged: Boolean = true
}
input SetProductTailoringAttributeInAllVariants {
name: String!
value: String
staged: Boolean = true
}