younifyd
Menu

segmentFilterSuggestions

A list of filter suggestions associated with a segment. A segment is a group of members (commonly customers) that meet specific criteria.

Use it in a workflow

  1. Add a step and choose the Shopify connector.
  2. Pick the segmentFilterSuggestions action (under Segment).
  3. Fill in the fields below, then reference the result from later steps as {{segmentfiltersuggestions.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 SegmentFilterSuggestions($search: String!, $first: Int!, $after: String) {
  segmentFilterSuggestions(search: $search, first: $first, after: $after) {
    edges {
      cursor
      node {
        localizedName
        multiValue
        queryName
      }
    }
    nodes {
      localizedName
      multiValue
      queryName
    }
    pageInfo {
      endCursor
      hasNextPage
      hasPreviousPage
      startCursor
    }
  }
}

Variables

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

searchstringrequired

Returns the elements of a list by keyword or term.

firstnumberrequired

The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql).

afterstring

The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql).

json
{
  "search": "string",
  "first": 0,
  "after": "string"
}

Response

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

edgesarray<object>
cursorobject
nodeobject
nodesarray<object>
localizedNameobject
multiValueobject
queryNameobject
pageInfoobject
endCursorstring
hasNextPageboolean
hasPreviousPageboolean
startCursorstring

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

Was this page helpful?