Query Parameter node
The Query Parameter node lets you insert query parameter values from a journey URL into configurable node state properties. This lets you customize journeys based on the query parameter values.
Compatibility
Product | Compatible? |
---|---|
Advanced Identity Cloud |
Yes |
PingAM (self-managed) |
Yes |
Ping Identity Platform (self-managed) |
Yes |
Inputs
This node takes its inputs from the journey URL and maps each query parameter to a property in the node state. For
multi-valued parameters, the node delimits the parameters by a comma (,
) symbol. In this case, the value assigned to
the node state property is a comma-delimited list of items.
The node doesn’t read input from the state.
The node has no required predecessor nodes.
Configuration
Property | Usage |
---|---|
Allowed query parameters |
List the query parameters the node can obtain from the URL and map them to a property in the node state:
If a query parameter in the URL isn’t in this list, the node ignores it. To edit an entry, click the [.label]#Pencil# icon (). To remove an entry, click the [.label]#Delete# icon (). |
Allowed query parameters to be delimited |
Specify the allowed query parameters that can take multiple values and whose values you want to store in the node
state in a comma-delimited list; for example, Enter the query parameter name in the Add value field and click Add. If you don’t delimit the values of a multi-valued query parameter, the node stores the values in the node state as a
single string value; for example, To edit an entry, click the [.label]#Pencil# icon (). To remove an entry, click the [.label]#Delete# icon (). |
Outputs
-
If the Allowed query parameters setting has one or more values, the node adds the values of the listed URL parameters to the corresponding properties in the node state.
-
If the Allowed query parameters setting has a value but that query parameter isn’t present in the URL, the node sets an empty list (
[]
) in the corresponding node state property. -
If an allowed query parameter is also listed in the Allowed query parameters to be delimited, the node sets the values of the listed URL parameter in the node state as a comma-delimited list.
|
Errors
-
No parameters configured - this node is redundant
The node logs this error if you include it in a journey but don’t configure any Allowed query parameters.
-
Cannot delimit parameter if it is not configured as a parameter to be stored in node state
The node logs this error if you add a parameter to the list of Allowed query parameters to be delimited but not to the list of Allowed query parameters.
Examples
Use the Query Parameter node to customize a journey based on query parameters in the URL. The following scenarios illustrate how this node might be used:
Customized branding
An organization has several brands that use the same journey. Use this node to customize the brand the user sees, based on the query parameters.
Consider the following authentication journey:
-
The configuration of the Query Parameter node maps the
brand
query parameter to a property in the node state namedstateBrand
-
The user accesses the journey at a URL that can be one of the following:
-
https://<tenant-env-fqdn>/am/XUI/?realm=alpha&authIndexType=service&authIndexValue=Login
-
https://<tenant-env-fqdn>/am/XUI/?realm=alpha&authIndexType=service&authIndexValue=Login&brand=yellow
-
https://<tenant-env-fqdn>/am/XUI/?realm=alpha&authIndexType=service&authIndexValue=Login&brand=red
-
-
The Query Parameter node obtains the value of
brand
from the URL and sets that value in thestateBrand
property in the node state; for example,stateBrand=yellow
-
The journey progresses to the scripted decision node that includes the following script:
var brand = JSON.parse(nodeState.get('stateBrand')); if (brand.indexOf("yellow") >= 0) { outcome = "yellow"; } else if (brand.indexOf("red") >= 0) { outcome = "red"; } else { outcome = "regular"; }
-
The script routes the journey to one of three outcomes;
yellow
,red
, orregular
, depending on the value of thestateBrand
property. -
The outcomes direct the user to a custom branded Login journey configured in an Inner Tree Evaluator node; for example:
-
Each Inner Tree Evaluator node routes the end user to a login journey that uses a custom brand.