I’m running into an issue while creating a Shopify Function in my Shopify app.
Here’s what I’ve done so far:
The function limit hasn’t been reached. The app is deployed, but when I rerun the process on Postman or inside Shopify I get this error
Function 019cf4c4-74cf-70db-b3dc-18036b6e7d66 not found. Ensure that it is released in the current app (313561153537), and that the app is installed.
The app is already installed in my development store.
Has anyone encountered this issue or knows how to fix it?
Hey @Liam_997, I had a look into this for you! Your shopifyFunctions query confirms the function exists on the app, so the issue is with how you’re referencing it in the mutation.
You’re passing the function’s UUID as the functionHandle value, but that field expects the human-readable handle string defined in your shopify.extension.toml (the handle field under your extension config, something like hide-cod-on-pickup or payment-customization).
You can find your actual handle by adding the handle field to your existing query.
query GetShopifyFunctions($first: Int, $after: String) {
shopifyFunctions(first: $first, after: $after) {
nodes {
id
title
handle
apiType
}
}
}
Then use that handle value in your mutation.
mutation {
paymentCustomizationCreate(paymentCustomization: {
title: "Hide COD on Pick up",
enabled: true,
functionHandle: "your-actual-handle-here"
}) {
paymentCustomization { id }
userErrors { message }
}
}
Alternatively, if you want to keep using the UUID, switch from functionHandle to functionId and pass the bare UUID directly (the same id value your shopifyFunctions query already returns):
mutation {
paymentCustomizationCreate(paymentCustomization: {
title: "Hide COD on Pick up",
enabled: true,
functionId: "019cf4c4-74cf-70db-b3dc-18036b6e7d66"
}) {
paymentCustomization { id }
userErrors { message }
}
}
functionId is deprecated in favor of functionHandle, so the handle approach is preferred going forward. The changelog on functionHandle covers the distinction between the two fields.
Let me know how it goes!