Hi,
I just finished working on a discount function using the examples at Build a discounts UI with Remix however with the new 2025-04 API’s the examples here are now outdated. When I create a new extension with the shopify CLI targeting discount
this doesn’t show up in the admin create discount UI even though the function record exists when I search via graphql. I assume I’m missing something, but the docs arent super clear on where I should be looking.
{
"app": {
"title": "title",
"handle": "my-apps-handle"
},
"apiType": "discount",
"title": "Customer Discount",
"id": "----",
"useCreationUi": true
}
TOML for reference
api_version = "2025-04"
[[extensions]]
name = "t:name"
handle = "customer-discount"
type = "function"
description = "t:description"
[[extensions.targeting]]
target = "cart.lines.discounts.generate.run"
input_query = "src/generate_cart_run.graphql"
export = "generate-cart-run"
[extensions.build]
command = ""
path = "dist/function.wasm"
[extensions.ui.paths]
create = "/app/customer-discount/:functionId"
details = "/app/customer-discount/:functionId/:id"