Skip to main content

Fetch a cluster with options

Retrieve a cluster with its option groups (add-ons like monitors, warranty plans or accessories).

Query

query GetClusterOptions($clusterId: Int!, $taxZone: String!) {
cluster(clusterId: $clusterId) {
clusterId
names { language value }
options {
clusterOptionId
names { language value }
isRequired
hidden
defaultProduct {
productId
names { language value }
}
products {
productId
sku
names { language value }
price(input: { quantity: 1, taxZone: $taxZone }) {
gross
net
}
}
}
}
}

Variables

{
"clusterId": 30,
"taxZone": "NL"
}

Response

{
"data": {
"cluster": {
"clusterId": 30,
"names": [{ "language": "NL", "value": "Dell Optiplex 7010 bundel" }],
"options": [
{
"clusterOptionId": 31,
"names": [{ "language": "NL", "value": "Monitor" }],
"isRequired": "Y",
"hidden": "N",
"defaultProduct": { "productId": 890, "names": [{ "language": "NL", "value": "Dell P2422H 24\"" }] },
"products": [
{ "productId": 890, "sku": "DELL-P2422H", "names": [{ "language": "NL", "value": "Dell P2422H 24\"" }], "price": { "gross": 249, "net": 301.29 } },
{ "productId": 891, "sku": "DELL-P2723QE", "names": [{ "language": "NL", "value": "Dell P2723QE 27\" 4K" }], "price": { "gross": 449, "net": 543.29 } }
]
},
{
"clusterOptionId": 32,
"names": [{ "language": "NL", "value": "Garantie" }],
"isRequired": "Y",
"hidden": "N",
"defaultProduct": null,
"products": [
{ "productId": 895, "sku": "SVC-3Y-NEXT", "names": [{ "language": "NL", "value": "3 jaar next business day" }], "price": { "gross": 89, "net": 107.69 } },
{ "productId": 896, "sku": "SVC-5Y-NEXT", "names": [{ "language": "NL", "value": "5 jaar next business day" }], "price": { "gross": 159, "net": 192.39 } }
]
}
]
}
}
}

How it works

Options are add-on product groups. When isRequired is Y, the customer must select a product from that option to complete the configuration. Products inside an option have their clusterId set to the clusterOptionId, not the parent cluster's ID.

See also