--- title: Segment - GraphQL Admin description: >- A group of [customers](https://shopify.dev/docs/api/admin-graphql/latest/objects/Customer) that meet specific criteria defined through [ShopifyQL query](https://shopify.dev/docs/api/shopifyql/segment-query-language-reference) conditions. Common use cases for segments include customer analytics, targeted marketing campaigns, and automated discount eligibility. The segment's [`query`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Segment#field-query) field contains ShopifyQL conditions that determine membership, such as purchase history, location, or engagement patterns. Tracks when the segment was created with [`creationDate`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Segment#field-creationDate) and when it was last modified with [`lastEditDate`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Segment#field-lastEditDate). api_version: 2026-01 api_name: admin type: object api_type: graphql source_url: html: 'https://shopify.dev/docs/api/admin-graphql/latest/objects/Segment' md: 'https://shopify.dev/docs/api/admin-graphql/latest/objects/Segment.md' --- # Segment object Requires `read_customers` access scope. Also: The user must not have restricted access. A group of [customers](https://shopify.dev/docs/api/admin-graphql/latest/objects/Customer) that meet specific criteria defined through [ShopifyQL query](https://shopify.dev/docs/api/shopifyql/segment-query-language-reference) conditions. Common use cases for segments include customer analytics, targeted marketing campaigns, and automated discount eligibility. The segment's [`query`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Segment#field-query) field contains ShopifyQL conditions that determine membership, such as purchase history, location, or engagement patterns. Tracks when the segment was created with [`creationDate`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Segment#field-creationDate) and when it was last modified with [`lastEditDate`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Segment#field-lastEditDate). ## Fields * creationDate * id * lastEditDate * name * query *** ## Map ### Fields and connections with this object * [DiscountCustomerSegments.segments](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountCustomerSegments#field-DiscountCustomerSegments.fields.segments) * [PriceRuleCustomerSelection.segments](https://shopify.dev/docs/api/admin-graphql/latest/objects/PriceRuleCustomerSelection#field-PriceRuleCustomerSelection.fields.segments) * [SegmentConnection.nodes](https://shopify.dev/docs/api/admin-graphql/latest/connections/SegmentConnection#returns-nodes) * [SegmentEdge.node](https://shopify.dev/docs/api/admin-graphql/latest/objects/SegmentEdge#field-SegmentEdge.fields.node) *** ## Queries * segment * segments *** ## Segment Queries ### Queried by * [segment](https://shopify.dev/docs/api/admin-graphql/latest/queries/segment) * [segments](https://shopify.dev/docs/api/admin-graphql/latest/queries/segments) *** ## Mutations * segmentCreate * segmentUpdate *** ## Segment Mutations ### Mutated by * [segment​Create](https://shopify.dev/docs/api/admin-graphql/latest/mutations/segmentCreate) * [segment​Update](https://shopify.dev/docs/api/admin-graphql/latest/mutations/segmentUpdate) *** ## Interfaces * Node *** ## Segment Implements ### Implements * [Node](https://shopify.dev/docs/api/admin-graphql/latest/interfaces/Node)