Discount extention targeting cart.lines.discounts.generate.run not showing up in Admin -> Discounts -> Create

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"
1 Like

I have the same issue.

The guide for discount functions is using the deprecated product discount instead of the Discount API:
Build a product discount function

And when using the guide for Discount UI using Remix: Build a discounts UI with Remix
The app/discount function does not show.

Hey folks - thanks for flagging that these docs could be out of date, connecting with the relevant team to update these.