Edit in GitHubLog an issue
Adobe Commerce only. Learn more

customerSegments query

The customerSegments query returns information about the customer segments associated with the current customer or guest.

Customer segments allow merchants to dynamically display content and promotions to specific customers, based on various properties. Examples include customer address, order history, and shopping cart contents.

Syntax

Copied to your clipboard
{
customerSegments(
cartId: String!
): [CustomerSegment!]
}

Reference

The customerSegments reference provides detailed information about the types and fields defined in this query. -->

Example usage

The following call returns segments currently applied to the visitor.

Request:

Copied to your clipboard
{
customerSegments(cartId: "kw6mLEvl6vjjPNsjtJqwpamv5o0iT1bc") {
name
description
apply_to
}
}

Response:

Copied to your clipboard
{
"customerSegments": [
{
"name": "Guests",
"description": "All shoppers who are not logged in",
"apply_to": "VISITOR"
}
]
}
  • Privacy
  • Terms of Use
  • Do not sell or share my personal information
  • AdChoices
Copyright © 2025 Adobe. All rights reserved.