Edit in GitHubLog an issue

customerSegments query

The customerSegments query provides encoded ID of Customer Segments assigned to the Logged-in Customer or Guest shopper.

To retrieve customer segments for a customer, we recommend you use customer tokens in the header of your GraphQL calls. However, in case of guest information, token should not be passed.

Syntax

{ customerSegments(cartId: String!) {[CustomerSegmentStorefront!] } }

Example usage

The following call returns encoded ID of customer group for logged-in customer or guest. Provide the customer's token in the header section of the query in case of logged-in customer.

Request:

Copied to your clipboard
{
customerSegments(cartId: "jkdldskfdjsdkdsljds==") {
uid
}
}

Response:

Copied to your clipboard
{
"data": {
"customerSegments": [
{
"uid": "Nq=="
}
]
}
}
  • Privacy
  • Terms of Use
  • Do not sell or share my personal information
  • AdChoices
Copyright © 2025 Adobe. All rights reserved.