Help Debut Function Admin UI Save failure

Hi – need some help.

My discount function works, its very simple, uses tags to identify products eligible for discounts and then applies them in quantities of two, i.e. 2 for 25, each eligble product is 12.50. This part works, has worked for over a year, but when I try and use the Shopify tutorial as a basis for saving the metafield I cannot save the updated configuration:

How can I debug (there are no log files for the UI) what is failing? I have the tutorial code working EXACTLY and I’ve checked the shopify.extension.toml files and they all see good to go:

Function:

api_version = "2025-04"

[[extensions]]
name = "t:name"
handle = "somenameredacted-2-for-xx"
type = "function"

description = "t:description"

  [[extensions.targeting]]
  target = "purchase.product-discount.run"
  input_query = "src/run.graphql"
  export = "run"

  [extensions.build]
  command = ""
  path = "dist/function.wasm"

  

[extensions.input.variables]
namespace = "$app:example-discounts--ui-extension"
key = "function-configuration"

[extensions.ui]
handle = "discount-ui-js"

And here is the UI:

api_version = "2024-10"

[[extensions]]
# Change the merchant-facing name of the extension in locales/en.default.json
name = "t:name"
description = "t:description"
handle = "discount-ui-js"
type = "ui_extension"


# Only 1 target can be specified for each Admin block extension
[[extensions.targeting]]
module = "./src/DiscountFunctionSettings.jsx"
# The target used here must match the target used in the module file (./src/DiscountFunctionSettings.jsx)
target = "admin.discount-details.function-settings.render"

Any help greatly appreciated . Note: I am currently not using the metafields yet in my function, I just want to save them and then I can use them in both run.graphql and my run.js .

Check following :
API Version:

  • The function extension uses API version 2025-04, while the UI extension uses 2024-10. Mixing API versions can sometimes cause compatibility issues, especially with newer features like metafield handling. Ensure that both extensions are aligned with a compatible API version (e.g., 2025-04 for both, as it’s the latest stable version as of your current date, June 27, 2025).

Common Issues with Metafield Saving:

  • Permissions: Your app must have the necessary scopes to write metafields (e.g., write_discounts, write_metaobjects).

check in your toml file
[access_scopes]
scopes = “write_discounts,write_own_merchant_managed_metafields”

Thanks for reporting this issue @Floyd_Wallace.

We experienced some issues when creating and updating automatic app discounts on June 26th. A fix was shipped later in the day. Can you please try updating your discount again?

Let us know if you continue to experience any issues!