Skip to main content

customerCartSummary

Requires a customer (portal or buyer app) session.

Returns the item count and total of the signed-in customer's cart, for a header badge. It uses the same customer and address as the cart.

Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.

Example:

query CustomerCartSummary {
customerCartSummary {
itemCount
subtotal
}
}

Response:

{
"data": {
"customerCartSummary": {
"itemCount": 0,
"subtotal": 0
}
}
}
customerCartSummary: CartSummary!

Type​

CartSummary object​

The cart's totals.