Run a Shopify Admin Action
shopify_run_actionValidate and apply any Shopify Admin API mutation across up to 100 stores, defaulting to dry-run, with shared or per-store variables and incomplete-preview safeguards.
Instructions
Run any Shopify Admin API mutation on one to one hundred stores. Give a mutation name (a default document is built) or a full single-mutation document, plus variables shared by every store and/or variablesByStore (IDs differ per store). dryRun (the default) validates the document and variables against each store's API version and looks up every record ID in the variables and the document; nothing is changed. The preview says whether it is complete: targets chosen by a search, saved search, filter, or "all" flag, more than 250 IDs, or IDs that do not resolve make it incomplete, and then applying also needs acknowledgeIncompletePreview: true. dryRun false applies it; every ID is looked up again first, and IDs that do not resolve refuse the apply unless acknowledgeIncompletePreview is true. Destructive actions (delete, cancel, refund and similar) need confirm set to the mutation name. Mutations are never retried automatically. On a hosted server in per-user mode, Shopify limits this to what your own staff account may do.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dryRun | No | ||
| stores | Yes | ||
| confirm | No | For destructive actions: the mutation name (several destructive mutations: comma-separated, in document order). | |
| document | No | A full GraphQL document with exactly one mutation operation. | |
| mutation | No | Mutation name. Required unless document is given; if both are given, the document must call it. | |
| variables | No | Variables used for every store. | |
| variablesByStore | No | Per-store variables by alias, merged over variables. | |
| acknowledgeIncompletePreview | No | Required, with dryRun false, when the targets cannot all be listed in advance (search, saved search, filter, or "all" style arguments, or more than 250 IDs) or when a named ID does not resolve at apply time. Prefer narrowing the document to explicit IDs instead. |