younifyd
Menu

collection

Retrieves a collection by its ID. A collection represents a grouping of products that merchants can display and sell as a group in their online store and other sales channels.

Use it in a workflow

  1. Add a step and choose the Shopify connector.
  2. Pick the collection action (under Collection).
  3. Fill in the fields below, then reference the result from later steps as {{collection.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 Collection($id: ID!) {
  collection(id: $id) {
    activeOperations {
      duplicate {
        collectionRole
        job
      }
    }
    availablePublicationsCount {
      count
      precision
    }
    descriptionHtml
    feedback {
      appFeedback {
        app
        channel
        feedbackGeneratedAt
        link
        messages
        state
      }
      details {
        app
        channel
        feedbackGeneratedAt
        link
        messages
        state
      }
      summary
    }
    handle
    id
    legacyResourceId
    productsCount {
      count
      precision
    }
    publishedOnCurrentChannel
    publishedOnCurrentPublication
    ruleSet {
      appliedDisjunctively
      rules {
        column
        condition
        conditionObject
        relation
      }
    }
    seo {
      description
      title
    }
    sortOrder
    sources {
      app {
        apiKey
        appStoreAppUrl
        appStoreDeveloperUrl
        availableAccessScopes
        banner
        description
        developerName
        developerType
        developerUrl
        embedded
        failedRequirements
        features
        feedback
        handle
        icon
        id
        installUrl
        installation
        isPostPurchaseAppInUse
        launchUrl
        navigationItems
        optionalAccessScopes
        previouslyInstalled
        pricingDetails
        pricingDetailsSummary
        privacyPolicyUrl
        publicCategory
        published
        requestedAccessScopes
        screenshots
        shopifyDeveloped
        title
        uninstallMessage
        uninstallUrl
        webhookApiVersion
      }
      description
      id
      title
    }
    storefrontId
    subCollectionEligibility {
      exclusion {
        eligible
        ineligibleReason
      }
      inclusion {
        eligible
        ineligibleReason
      }
    }
    templateSuffix
    title
    updatedAt
  }
}

Variables

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

idstringrequired

The ID of the `Collection` to return.

json
{
  "id": "string"
}

Response

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

activeOperationsobject
duplicatearray<object>
availablePublicationsCountobject
countnumber
precisionstring

One ofEXACTAT_LEAST

descriptionHtmlstring
feedbackobject
appFeedbackarray<object>
detailsarray<object>
summarystring
handlestring
idstring
legacyResourceIdstring
productsCountobject
countnumber
precisionstring

One ofEXACTAT_LEAST

publishedOnCurrentChannelboolean
publishedOnCurrentPublicationboolean
ruleSetobject
appliedDisjunctivelyboolean
rulesarray<object>
seoobject
descriptionstring
titlestring
sortOrderstring

One ofALPHA_ASCALPHA_DESCBEST_SELLINGMOST_RELEVANTCREATEDCREATED_DESCMANUALPRICE_ASCPRICE_DESC

sourcesarray<object>
appobject
descriptionobject
idobject
titleobject
storefrontIdstring
subCollectionEligibilityobject
exclusionobject2 fields
inclusionobject2 fields
templateSuffixstring
titlestring
updatedAtstring

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