You create script rules from the Add Rule window, which
is opened from the Rules tab on the script editor. You specify the
triggers, conditions, actions, and properties just as you would when
creating a workspace rule. However, there are a few triggers and actions
that are unique to script rules.
This section provides an overview of the process to create a script rule and describes the
triggers and actions that are unique to scripts. For detailed procedures to
create script and workspace rules, see Add a Workspace Rule.Note: Creating script rules is similar to
creating script branches, though branches take agents to script
pages whereas rules trigger actions you specify in the
rule.
- From your open script, select the page you want to place
the rule on from the page selector.
-
Click the Rules tab and click
Add Rule.
The Add Rule window opens. Five
buttons display along the top of the window—Triggers,
Conditions, Then Actions, Else Actions, and Properties. You
construct the rule by clicking each button and adding
different items to the rule description.
- Select one or more triggers that will cause the rule to
fire. There are four triggers that are unique to scripts beyond those
available as workspace rule triggers.
- Page Loaded—Select this item to trigger the rule immediately after the page the rule is on is
opened.
- A Button is Clicked—Select this item to trigger the rule when Next on the navigation panel is
clicked to proceed to the next page.
- The Exit Script Event Fires—Select this item to trigger the rule when Exit on the navigation
panel is clicked to exit the page. Exit displays
on the script page only if there is a branch or
subsequent page allowing staff members to go to
another page. For this reason, exit script events
usually occur before the script has reached the
final page for the branch.
- The Finish Script Event Fires—Select this item to trigger the rule when the Finish button on the
navigation panel is clicked to leave the script.
Finish displays only if there is no branch or
subsequent page to go to from the script page. For
this reason, finish script events usually occur
after the script has reached the final page for
the branch.
- Click Conditions to add conditions
that must be met for the rule to fire and perform the actions you
specify.
The conditions available for script rules are identical
to those available for workspace rules. See
Workspace Rule Conditions.
- Click Then Actions to define the
actions that should occur immediately after the triggering event if
the conditions are met.
There are two actions that are unique to script rules:
- Fire Exit Script Event—Select this action to fire a subsequent rule that uses the Exit Script
Fires condition. Using this option, you can add
your own Exit button to a script page to trigger
the same rule fired by Exit on the navigation
panel control.
- Fire Finish Script Event—Select this action to fire a subsequent rule that uses the Finish
Script Fires condition. Using this option, you can
add your own Finish button to a script page to
trigger the same rule fired by Finish on the
navigation panel control. See
How Events are Used in Workspace and Script Rules. For descriptions of the other
rule actions and how to add them to your rule, see
Workspace Rule Actions.
- Click Else Actions to define the
actions that should occur if the conditions are not met.
The Fire Exit Script Event and Fire Finish Script Event
actions described in step 5 are also available to use as Else actions
in script rules. See
Workspace Rule Actions.
- Click Properties and enter the name
of the rule in the Rule Name field.
- Enter any notes you want to add to the rule in the Notes
field.
- To deactivate the rule, clear the Active check box.
- Click Finish.