Use a Rule to Recognize User Roles
You can build a Flow that executes according to the Role that is assigned to a user.
X-Console provides a built-in Session Variable that can be examined during the Flow using a Rule, Decision Point or other logical element, and conditionally test whether a user has a specific Role type before the Flow proceeds.
The built-in UserRoles Session Variable contains the list of all Roles currently defined for the account and can be used like any other Session Variable.
Example User Role Test
In our example use case, we want to permit an Agent who is currently in training to access only certain parts of a Flow (e.g., non-confidential portions).
We add a Custom Role called Training Only, which restricts an Agent to using only those Flows associated with orientation activities.
We create the new Agent Training rule to the account. This rule examines the built-in UserRoles Session Variable to determine whether a user is currently assigned the Training Only Role:
When this condition is met, the Rule value is set to Orientation.
Note
Both System and Custom Role names are included in the UserRoles Session Variable.
We then add the new Check Orientation Status Decision Point element where we want to restrict the Agent's activity and redirect our Flow. This element uses our Agent Training rule:
When this condition is met, the Flow continues on the Orientation branch.
We can also hide specific visual page elements from an Agent who is in training anywhere in the Flow using a Show/Hide Rule. This also tests for the Training Only Role:
Using the Show/Hide Rule, we simply show the Agent only those visual elements which are relevant to orientation activities.