Skip to content

discount-app-action-link: fix misleading {functionId} URL guidance - #421

Merged
loic-d merged 1 commit into
mainfrom
loic/discount-intent-static-url-guidance
Jul 21, 2026
Merged

discount-app-action-link: fix misleading {functionId} URL guidance#421
loic-d merged 1 commit into
mainfrom
loic/discount-intent-static-url-guidance

Conversation

@loic-d

@loic-d loic-d commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

Problem

The discount-app-action-link template tells partners they can template {functionId} into the intent url (e.g. /discounts/{functionId}/new) and that the platform fills it from the functionId matchValue in intent-schema.json.

That doesn't work. functionId arrives as an optional intent input (intents can't declare required inputs), so the platform can't fill a required URL path segment from it. matchValue only routes/pins the intent to your app — it is not interpolated into the URL.

Fix

Updated the guidance in shopify.extension.toml.liquid and README.md:

  • Use a static route. Don't use a {functionId} placeholder.
  • If you need the function ID in the path, include it directly (e.g. /discounts/019f…/new).

The {id} param on the edit route is unaffected — it's filled from the top-level intent value, not from an inputSchema property.

The template told partners to template {functionId} into the intent url
(e.g. /discounts/{functionId}/new) and claimed the platform fills it from the
functionId matchValue. That doesn't work: functionId is an optional intent input
(intents can't require inputs), so it can't fill a URL path segment. matchValue
only routes the intent to the app; it isn't interpolated into the url.

Guidance now: use a static route and, if you need the function ID in the path,
include it directly.

Assisted-By: devx/544990ff-9f89-4bd0-8c23-777a2f097188
@loic-d
loic-d force-pushed the loic/discount-intent-static-url-guidance branch from c8df260 to f6f1d3e Compare July 18, 2026 18:17
@loic-d
loic-d marked this pull request as ready for review July 19, 2026 15:58
@loic-d
loic-d requested review from iphipps and vividviolet July 19, 2026 16:05
@loic-d
loic-d merged commit da66db9 into main Jul 21, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants