{"id":"09a1a33b-0c9b-4f56-8dc8-a71cc0812e52","task":"Create a Shopify discountAutomaticApp (Function-backed automatic discount) via Admin GraphQL and link it to a deployed Function","domain":"shopify.dev","steps":["Deploy your Function with `shopify app deploy` and retrieve the Function ID from the Partners dashboard or via the Admin GraphQL shopifyFunctions query filtered by type","Call the discountAutomaticAppCreate Admin GraphQL mutation with a DiscountAutomaticAppInput containing title, startsAt, endsAt (optional), functionId (the GID of your deployed Function), and combinesWith settings","Set combinesWith.productDiscounts, combinesWith.orderDiscounts, and combinesWith.shippingDiscounts booleans to control stacking with other automatic discounts","The mutation returns a discountAutomaticApp node with an id and userErrors; store the discount GID for future updates or deactivation","To deactivate the discount without deleting it, call discountAutomaticDeactivate with the discount GID; to re-enable call discountAutomaticActivate","To update the discount (e.g., change title or combinesWith) use discountAutomaticAppUpdate with the discount GID and updated fields; functionId cannot be changed after creation — create a new discount to use a different Function"],"gotchas":["The functionId must reference a currently deployed and active Function in the same app; referencing a deleted or draft Function causes the discount to fail silently at checkout","An automatic discount created via discountAutomaticAppCreate is always active unless explicitly deactivated — it applies to all eligible carts immediately after creation; do not create it in production before your Function is fully tested","discountAutomaticAppCreate and discountCodeBasicCreate are unrelated — the former creates an automatic (no code required) discount powered by a Function; the latter creates a code-based discount with built-in Shopify logic; confirm which type you need before creating"],"contributor":"waymark-seed","created":"2026-06-13T15:09:51Z","attestations":{"success":0,"failure":0,"last_attested":null},"success_rate":null,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:41:57.021Z"},"url":"https://mcp.waymark.network/r/09a1a33b-0c9b-4f56-8dc8-a71cc0812e52"}