Menu
standardMetafieldDefinitionTemplates
Retrieves preset metafield definition templates for common use cases. Each template provides a reserved namespace and key combination for specific purposes like product subtitles, care guides, or ISBN numbers.
Use it in a workflow
- Add a step and choose the Shopify connector.
- Pick the standardMetafieldDefinitionTemplates action (under Standard).
- Fill in the fields below, then reference the result from later steps as
{{standardmetafielddefinitiontemplates.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 StandardMetafieldDefinitionTemplates($constraintSubtype: MetafieldDefinitionConstraintSubtypeIdentifier, $constraintStatus: MetafieldDefinitionConstraintStatus, $excludeActivated: Boolean, $first: Int, $after: String, $last: Int, $before: String, $reverse: Boolean) {
standardMetafieldDefinitionTemplates(
constraintSubtype: $constraintSubtype
constraintStatus: $constraintStatus
excludeActivated: $excludeActivated
first: $first
after: $after
last: $last
before: $before
reverse: $reverse
) {
edges {
cursor
node {
description
id
key
name
namespace
ownerTypes
type
validations
visibleToStorefrontApi
}
}
nodes {
description
id
key
name
namespace
ownerTypes
type {
category
name
supportedValidations
supportsDefinitionMigrations
valueType
}
validations {
name
type
value
}
visibleToStorefrontApi
}
pageInfo {
endCursor
hasNextPage
hasPreviousPage
startCursor
}
}
}
Variables
Pass these as a JSON object in the step's Variables field.
{
"constraintSubtype": {
"key": "string",
"value": "string"
},
"constraintStatus": "CONSTRAINED_AND_UNCONSTRAINED",
"excludeActivated": false,
"first": 0,
"after": "string",
"last": 0,
"before": "string",
"reverse": false
}
Response
Read the result with {{standardmetafielddefinitiontemplates.response.data.data.standardMetafieldDefinitionTemplates}}. If the API returns errors, the step fails and they are at {{standardmetafielddefinitiontemplates.response.data.errors}}.
Need more? See the Shopify guide for connection setup and behaviour shared by every action.
Was this page helpful?