Expected Behavior
When building a Shopify app that uses the Discount Function API, a common expectation is that clicking a discount in the Shopify Admin should redirect the merchant to a specific page inside the app (for example, a discount editor or configuration screen).
Observed Behavior
When a discount created using the Shopify Discount Function API is clicked in the Shopify Admin:
-
Shopify always opens the embedded app root (e.g.
/apps/<app-handle>). -
The request contains standard embedded app parameters such as
shop,host,hmac,session, etc. -
No discount-specific context (such as
discountId,discountNodeId, or any custom parameter) is included in the URL. -
The app has no way to determine which discount was clicked based solely on the incoming request.
Looking for a way that makes the expected behavior possible.