Overview
When a web-deployed experience is run in a browser, the URL Parser Interface Asset (IA) searches the experience URL for specified parameters. The values of those parameters can be used in conditional triggers to call any available action in the experience.
Parameters could be used to
- Determine which scene to display
- Specify the language to be used
- Identify the product information to load
- Filter a list of items
Adding parameters to a URL
According to standard HTML rules, here is how to add one or more parameters to a URL
- Add a "?" symbol to the end of the URL
- Separate the parameter name and parameter value with an "=" symbol
- Separate each name/value pair with the "&" symbol
For example, here we add the parameters "scene=intro" and "region=europe" to the experience URL https://web.intuiface.com/xp1234:
https://https://web.intuiface.com/xp1234?scene=intro®ion=europe
Searching for a parameter
To search for a parameter in the URL, call the "Find parameter" action of the URL Parser IA
The "Find parameter" action has one parameter: the name of the parameter you are looking for in the URL.
- If the parameter is found, the "Parameter found" trigger is called.
- If the parameter is not found, the "Parameter not found" trigger is called.
If multiple parameter values are required, the "Find parameter" action must be called for each parameter separately.
When a parameter is found
The URL Parser trigger "Parameter found" is called when the "Find parameter" action is successful.
This trigger has two read-only values that can be used in a conditional to determine which action to call:
- Name of the found parameter
- Value of the found parameter
When a parameter is missing
If the "Find parameter" action fails to find the specified parameter, the URL Parser trigger "Parameter not found" is called.
This trigger has one read-only value that can be used in a conditional to determine which action to call:
- Name of the parameter that wasn't found.
Accessing the list of parameters in the URL
The URL Parser IA has one property.
- Parameters
Comma-separated list of all parameter name/value pairs associated with the URL. These pairs are written as they appear in the URL.
For example, if the URL is https://https://web.intuiface.com/xp1234?scene=intro®ion=europe, then the value of the Parameters property will be "scene=intro,region=europe".
To extract parameter values from the "Parameters" property, use a Custom Script Converter.
Video explanation - Extracting values from the URL of a web-published experience
You will find in the Quarterly Q&A Live - Winter Edition - January 2024 video, a detailed example of how to get parameters in your Web Experiences in your experiences.
Comments
0 comments
Please sign in to leave a comment.