Menu
productProjectionVariantAttributes
The attribute definitions available on product projection variants, for building search filters/facets.
Use it in a workflow
- Add a step and choose the Commercetools connector.
- Pick the productProjectionVariantAttributes action (under Product).
- Fill in the fields below, then reference the result from later steps as
{{productprojectionvariantattributes.response.data}}.
Query
This is the query the action sends by default. Edit it in the step's Query field to change which fields come back.
query ProductProjectionVariantAttributes($id: String, $key: String, $staged: Boolean!, $includeAttributeNames: [String!]!, $localeProjection: [Locale!], $includeChannelIds: [String!]) {
productProjectionVariantAttributes(
id: $id
key: $key
staged: $staged
includeAttributeNames: $includeAttributeNames
localeProjection: $localeProjection
includeChannelIds: $includeChannelIds
) {
productId
productKey
attributes {
name
type
labelAllLocales {
locale
value
}
}
variants {
id
sku
key
availability {
noChannel
channels
}
attributesRaw {
name
value
attributesRaw
referencedResource
referencedResourceSet
}
}
}
}
Variables
Pass these as a JSON object in the step's Variables field.
{
"staged": false,
"includeAttributeNames": [
"string"
],
"id": "string",
"key": "string",
"localeProjection": [
"string"
],
"includeChannelIds": [
"string"
]
}
Response
Read the result with {{productprojectionvariantattributes.response.data.data.productProjectionVariantAttributes}}. If the API returns errors, the step fails and they are at {{productprojectionvariantattributes.response.data.errors}}.
Need more? See the Commercetools guide for connection setup and behaviour shared by every action.
Was this page helpful?