younifyd
Menu

segment

Retrieves a customer Segment by ID. Segments are dynamic groups of customers that meet specific criteria defined through ShopifyQL queries.

Use it in a workflow

  1. Add a step and choose the Shopify connector.
  2. Pick the segment action (under Segment).
  3. Fill in the fields below, then reference the result from later steps as {{segment.response.data}}.

Query

This is the query the action sends by default. Edit it in the step's Query field to change which fields come back.

graphql
query Segment($id: ID!) {
  segment(id: $id) {
    creationDate
    id
    lastEditDate
    name
    query
  }
}

Variables

Pass these as a JSON object in the step's Variables field.

idstringrequired

Find a segment by ID.

json
{
  "id": "string"
}

Response

Read the result with {{segment.response.data.data.segment}}. If the API returns errors, the step fails and they are at {{segment.response.data.errors}}.

creationDatestring
idstring
lastEditDatestring
namestring
querystring

Need more? See the Shopify guide for connection setup and behaviour shared by every action.

segment — Shopify — Documentation