Segmentation overview
Segmentation is the process of using criteria to separate data into smaller groups. You can use the GraphQL Admin API to retrieve, create, and update segmentation data.
This guide explains segmentation and how to query segment members.
How segments work
Anchor link to section titled "How segments work"A segment is a group of members (commonly customers) that meet specific criteria. Merchants can use segments to conduct marketing activities, access information that helps to inform a business decision, or learn more about certain segment member behaviors.
For example, a segment might include members that bought a particular product. A merchant could use the segment to take action by sending a targeted email message to the group members.
Segment members can belong to multiple segments.
Querying segments
Anchor link to section titled "Querying segments"Each segment contains a query argument, or a precise definition of the segment, indicating the condition or conditions that data must satisfy to be selected. Query arguments act as segment filters.
For example, a query can specify segment members that have left a checkout without completing their purchase in the last 30 days. For more information, refer to the query syntax reference.
Paging and sorting data
Anchor link to section titled "Paging and sorting data"Use GraphQL for paging and sorting segmentation data.
Limitations
Anchor link to section titled "Limitations"A segment can only include members from a single shop.
You can query a maximum of 250 segments. The maximum value that
first
andlast
arguments accept is250
.The Segmentation API is only supported for GraphQL.