Adobe Commerce only. Learn more
allCustomerSegments query
This query is part of the Storefront Compatibility Package. It will be added to Adobe Commerce 2.4.8-beta4.
The allCustomerSegments
query returns information about the available customer segments.
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{allCustomerSegments {namedescriptionapply_to}}
Reference
The allCustomerSegments
reference provides detailed information about the types and fields defined in this query.
-->
Example usage
The following call returns a list of all active customer segments.
Request:
Copied to your clipboard{allCustomerSegments {namedescriptionapply_to}}
Response:
Copied to your clipboard{"allCustomerSegments": [{"name": "Guests","description": "All shoppers who are not logged in","apply_to": "VISITOR"},{"name": "Registered","description": "Applies to all logged-in customers","apply_to": "REGISTERED"}]}