Skip to main content

Display tiered and bulk pricing

Show quantity breaks and volume discounts on a product detail page so the buyer sees how the unit price drops.

Query

query GetBulkPrices($productId: Int!, $taxZone: String) {
product(productId: $productId) {
... on Product {
price(input: { taxZone: $taxZone }) {
gross
net
}
priceData {
bulkPriceDiscountType
}
bulkPrices(input: { taxZone: $taxZone }) {
gross
net
list
discount {
quantityFrom
}
}
}
}
}

Variables

{
"productId": 123,
"taxZone": "NL"
}

Response

{
"data": {
"product": {
"price": { "gross": 10.00, "net": 12.10 },
"priceData": { "bulkPriceDiscountType": "NET_PRICE" },
"bulkPrices": [
{ "gross": 8.50, "net": 10.29, "list": 10.00, "discount": { "quantityFrom": 10 } },
{ "gross": 7.00, "net": 8.47, "list": 10.00, "discount": { "quantityFrom": 50 } }
]
}
}
}

How it works

Each entry in bulkPrices is the unit price that applies from discount.quantityFrom up to the next tier's threshold. The bulkPriceDiscountType tells you how the tier price was derived: NET_PRICE is a fixed unit price, LIST_PRICE_MIN is a percentage off the list price and COST_PRICE_PLUS is the cost price plus a margin. The list field always shows the original list price for reference. Below the first threshold the regular price applies.

See also