Dynamic inputs
Dynamic inputs enable flexible, data-driven routing by allowing you to capture values from URLs and pass them to compositions. This includes dynamic path segments (like product IDs), query strings (like search parameters), and locale nodes for internationalization.
What are dynamic inputs?#
Dynamic inputs are values captured from the URL that are passed to compositions attached to project map nodes. These values can be used to:
- Fetch specific content from external systems based on URL parameters
- Apply conditional logic to show/hide components or change values
- Create reusable compositions that adapt to different URL patterns
- Support internationalized routing with locale-specific URLs
There are three types of dynamic inputs:
- Dynamic path segments: Capture variable parts of the URL path (e.g.,
/products/:productId) - Query strings: Capture URL query parameters (e.g.,
?region=us-west&customerType=premium) - Locale nodes: Special dynamic segments that represent locale codes for internationalization
Dynamic path segments#
Dynamic path segments allow project map to resolve any value for one segment in a URL. Given a dynamic node path such as /:lang/products/:productId, this would resolve to the :productId project map node for values such as /en/products/32 and /uk/products/awesome.
Once the route is matched, the specific dynamic values are passed to the composition and resolve to external data.
Configure a dynamic path segment#
- Navigate to Experience > Project Map and add a node by either clicking the Add node button, the within your project map, or the within your project map and select an option to add a node.
- Select Dynamic under "Path segment" to create a dynamic path.
- Enter a name for the dynamic segment (e.g.,
productId,slug,category). - Configure the attached composition and other node settings.
- Save the node.

Use dynamic path segments in compositions#
Dynamic path segments are available as dynamic inputs in compositions attached to the node. You can use them to:
- Connect to data resource variables to fetch specific content
- Use in conditional logic to show/hide components or change values
- Preview different values in the visual editor
Learn how to create compositions for dynamic routes.
Query strings#
Query strings (also called query parameters) enable specific query string values to be collected from the URL and passed to the Route API to be made available to compositions. These are useful for tasks such as regional targeting, customer segmentation, campaign tracking, and other cases where a path might have more than one value.
When you define a query string, you specify that it is an allowed query string parameter for the Route API. It is not required to be present in the URL, but if it is, it will be passed to the composition as a dynamic input. Any other query strings will be ignored by the Route API.
Query strings can be defined in two ways:
Global query strings#
Global query strings are configured once at the project map level in Settings > Project Map and automatically available to all project map nodes. Use these for query strings that are consistent across your site (e.g., utm_campaign, utm_source, region, customerType).
Benefits:
- Configure once, automatically available to all nodes
- Can be used in component and composition patterns for conditional logic and data resources
- Ensure consistency in query string naming, default values and predefined options across your project
note
If a query string is set up globally at the project level, you can't add another query string with the same name to individual nodes. In case of a conflict, the global query string is used.
Learn how to configure global query strings.
Node-specific query strings#
Node-specific query strings are set up individually on project map nodes for cases where a query string is needed only for a particular route. You can add node-specific query strings while managing your project map nodes.
Predefined options#
You can define predefined options for both global and node-specific query strings. This lets you present authors with a dropdown menu listing the allowed values when previewing in the visual editor. Authors must pick from these options instead of typing values manually.

Default values vs preview values
Query strings have a default value which is used when the query parameter isn't passed in the URL. This is different from the preview value of a dynamic path segment that only applies when previewing the composition in the visual editor.
Locale nodes#
Locale nodes are special dynamic path segments that capture the locale code from the URL. They enable internationalized routing by allowing a single dynamic segment to represent any configured locale.
For example, a locale node at /:locale in your project map will match /en-US, /de-DE, /fr-FR, etc., and pass the locale value to compositions as a dynamic input.
How locale nodes work#
Locale nodes are a specialized type of dynamic path segment configured in the project map. When the Route API resolves a URL with a locale node:
- The locale value is extracted from the URL path
- The locale is validated against your project's configured locales
- The locale is passed to the composition and used for locale resolution
- The composition is returned in the requested locale if available
Configure locale nodes#
To configure a locale node:
- Navigate to Experience > Project Map and add a node
- Select Locale under "Path segment"
- Configure the attached composition and other node settings
- Save the node
Learn more about using locale nodes for locale resolution in the localization guide.
Using dynamic inputs with compositions#
Dynamic inputs can be used in several ways within compositions:
Connect to data resources#
Use dynamic inputs to fetch specific content from external systems by connecting them to data resource variables. For example, use a productId path segment to fetch product data, or a q query string to perform a search.
Apply conditional logic#
Use dynamic inputs in conditional logic to:
- Show or hide components based on query string values
- Change parameter values based on dynamic input criteria
Using dynamic inputs in patterns
Global query strings can be leveraged within component and composition patterns to drive conditional logic and provide data to data resources. By doing so, you increase the reusability and flexibility of patterns, allowing them to adapt dynamically based on URL parameters.