Using response actions in a collection
Use response actions to call rules or methods after a collection step completes processing.
The Response actions section appears for each step on the Rules tab that does not call the Stop method. It displays an ordered list of response actions. Each response action can contain one or more tasks. A task calls a supported rule or method.
To add a response action:
- Click Add response action to append a response action to the existing list.
- Select a condition from the drop-down list.
- Hover over the response action drag icon.
- When the pointer becomes a drag handle, drag and drop the response action to the required position in the list.
You can now add tasks to the response action. You cannot save the collection until all required fields are populated.
To remove a response action, click the delete icon.
To add a task to a response action:
Click Add task to append a task to the existing list.
Click Edit to open the Update task modal.
Complete the fields that are required for your selected rule or method.
For example, when you select a response action type of Activity, you must enter the name of the activity to call and any applicable parameter values to pass at run time.
The available options in these fields are limited by your step context.
Hover over the drag icon next to the task label.
When the pointer becomes a drag handle, drag and drop the task to the required position in the list.
You can now click on the task label to open the rule it calls. When a task calls a method, the label is read-only.
To delete a task, click Remove.
Referencing parameter page properties
You can use properties on the parameter page to make decisions about further processing. As a best practice, add a condition to your response action that uses a function to evaluate the value of the property.
Some parameter page properties are exclusive to response actions. They represent data about the rule called in the current collection step. The system automatically updates the values of these properties when the next collection step is run.
keyword to reference these properties in your response action:
- pxCalledRuleKey — The unique key, or pzInksKey, that identifies the called rule.
- pxCalledRuleType — The object class of the called rule. For example, an activity has an object class of Rule-Obj-Activity.
- pxCalledRuleAppliesToClass — The class to which the called rule applies.
- pxCalledRuleRuleSet — The name of the ruleset that contains the called rule.
- pxCalledRuleRuleSetVersion —The version number of the ruleset that contains the called rule.
- pxCalledRuleUpdateDateTime — The most recent time the called rule was modified and saved.
- pxReturnValue — The output or results returned by the called rule. Only a subset of the supported rule types sets the value of this parameter.