Discussing Shopify Functions development, deployment, and usage in Shopify apps.
We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more
discountAutomaticAppCreate mutation returns "Shipping functions are not yet supported" error in production app, but works fine on our staging and dev environments.
mutation CreateAutomaticDiscountMutation( $discount: DiscountAutomaticAppInput! ) { discountAutomaticAppCreate(automaticAppDiscount: $discount) { automaticAppDiscount { discountId } userErrors { code extraInfo message field } } }
With the following payload
{ "discount": { "functionId": "XXXXXXXXXXXXXXXX", "title": "Xxxxx", "startsAt": "2023-08-18T19:51:13.886Z" } }
I get the following response
{ "data": { "discountAutomaticAppCreate": { "automaticAppDiscount": null, "userErrors": [ { "code": "INVALID", "extraInfo": null, "message": "Shipping functions are not yet supported", "field": [ "automaticAppDiscount", "functionId" ] } ] } }, "extensions": { "cost": { "requestedQueryCost": 10, "actualQueryCost": 10, "throttleStatus": { "maximumAvailable": 10000, "currentlyAvailable": 9990, "restoreRate": 500 } } } }
The Shipping Discount Functions API is only available to stores in the checkout extensibility developer preview.
I recently reached out to Shopify Partners Support to ask for a timeline on when this API would be come generally available. Here's the response:
[NAME REDACTED] (Shopify) Oct 27, 2023, 19:11 EDT Hi Tobe, [NAME REDACTED] here from Shopify Partner Support. Thank you for your email and question about our Functions Shipping Discount API. You are correct here that our Functions Shipping Discount API is currently in beta and only available in the checkout extensibility developer preview. While we work to providing access to this API to a larger audience, it is expected behaviour for requests to this API on a non checkout extensibility developer preview store to result in an error. Here while I do not have an exact timeline on when this API will be available to a larger audience, here I can recommend following our Partner news sources for updates on its availability: Should you have any other questions about what we have discussed, please feel free to respond directly to this email or reach out to our live support channels through the support link in your partner dashboard. Kind regards. [NAME REDACTED] | Shopify Partner Support Shopify News: What’s New for Shopify Partners and Developers |
Having same error even though I believe it's in stable version and available now?
Not sure what the problem is.
Same. From the docs this looks like it should be stable now.