Menu
collectionByIdentifier
Fetch a single collection by its ID.
Use it in a workflow
- Add a step and choose the Shopify connector.
- Pick the collectionByIdentifier action (under Collection).
- Fill in the fields below, then reference the result from later steps as
{{collectionbyidentifier.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.
query CollectionByIdentifier($identifier: CollectionIdentifierInput!) {
collectionByIdentifier(identifier: $identifier) {
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.
{
"identifier": {
"id": "string",
"customId": {
"key": "string",
"value": "string",
"namespace": "string"
},
"handle": "string"
}
}
Response
Read the result with {{collectionbyidentifier.response.data.data.collectionByIdentifier}}. If the API returns errors, the step fails and they are at {{collectionbyidentifier.response.data.errors}}.
Need more? See the Shopify guide for connection setup and behaviour shared by every action.
Was this page helpful?