Goal
Configure a Fusion query pipeline so that a rule is only triggered if a specific request parameter is present. For example, trigger a rule when the userId parameter is included in the incoming query request.
Environment
Fusion 5.5.0 and above
Guide
To apply rules conditionally based on the presence of a request parameter, use the apply rules stage with a conditional expression.
Add an apply rules stage
-
Open the Fusion UI and navigate to the relevant app.
-
Edit the query pipeline where you want to conditionally apply rules.
-
Add a new stage of type
apply rules.
Configure the stage condition
In the Stage Condition field, enter a conditional expression to check for the existence of a specific request parameter. For example:
request.hasParam(\"example\")
This condition ensures that the apply rules stage only executes when the example parameter is included in the request.
Save and test the pipeline
-
Save your pipeline configuration.
-
Send a test query that includes the
exampleparameter to confirm the rule is triggered. -
Send another test query without
exampleto verify the rule is not applied.
This setup enables dynamic rule application based on the presence of query parameters, enhancing control over rule execution logic.