Conditions are used in many places in a workflow definition.
- Workflow start conditions - can a workflow be started on a ticket
- Activity pre conditions - can an activity be started
- Activity completion conditions - can an activity be completed
- Transition conditions - can a transition occur
The conditions are used to control different aspects of the behaviour of the workflow definition, but the conditions are defined in the same way. A condition specifies a set of rules to evaluate based on information (ticket field values) from the ticket. These rules can be combined into complex structures involving binary logic (AND/OR) and various operators to allow a very rich way of expressing conditions.
Simple Conditions
A simple condition is rather like the conditions you might specify for a Zendesk trigger or view. It consists of two sets of rules (ALL & ANY). To satisfy the condition, all of the 'ALL' rules must be satisfied plus at least one of the 'ANY' rules.
When you add a condition, you should name the condition. This name will be displayed to the agent when running this workflow on a ticket and the name should give the agent some clue as to what the condition is checking for.
Add 'ALL' or 'ANY' rules by clicking the appropriate 'Add Condition' button. You can then specify the details of that rule. A rule consists of a field an operator and a value (for example priority is low, or type is not question). A condition must have at least one 'ALL' or 'ANY' rule otherwise it will not be saved.
The above condition will be satisfied if the ticket type is set to 'Problem' and the priority is set to either 'High' or 'Urgent'
The field drop down will be populated with a selection of Zendesk system fields (e.g. priority, status, type) plus all of your custom fields. The values in the operator drop down vary depending on the type of the field selected
Field Type | Available Operators |
Drop down | Is, Is Not, Present, Not Present |
Checkbox | Is |
Multi Select | Includes, Not Includes, Present, Not Present |
Text / Multi line | Present, Not Present |
Numeric / Decimal | Is, Is Not, Greater Than, Less Than, Present, Not Present |
Credit Card | Present, Not Present |
Date | Present, Not Present |
Regex | Present, Not Present |
If the chosen operator is Present or Not Present, then no value selector is displayed. This operator will simply test if the chosen field has a value or not. For a checkbox, the available values will be 'Checked' or 'Not Checked' (i.e. is the checkbox checked or not). For drop down and multi select fields, the value field will display all defined values for the selected field. For numeric and decimal fields, you can input a numeric value.
Special Fields
Depending on where in a workflow the condition is defined, there may be some additional fields available to include in condition rules
Ticket Created By - allows you to test if the ticket was or was not created by an agent.
Group - allows you to test which group is assigned to the ticket
Assignee - allows you to test if the ticket has an assignee
Ticket Form - allows you to test which ticket form the ticket is assigned to
Brand - allows you to test which brands this ticket is associated with
Complex Conditions
You can specify quite complex conditions using the 'ALL' and 'ANY' mechanism used by simple conditions. However, there are conditions that cannot be specified in such a way. Expanding on the example above, we cannot specify a condition that will be satisfied if the ticket type is Question or Task and the priority is High or Urgent. The all/any mechanism is not rich enough to express this.
To specify such conditions, you'll need to convert your simple conditions into complex conditions. With a complex condition, you can join together many sub conditions using AND / OR logic. To achieve the example mentioned, firstly define a simple condition for priority high or urgent.
Click the 'Convert to Complex Condition' button. The simple condition (High or Urgent) becomes the first (and only initially) sub condition of a complex condition
You should name the complex condition (as this will be shown to the agent when running the workflow), choose the boolean operator and then add further sub condition. Initially, the new sub condition is added, but has not details.
Click the Edit button to defined the details of the new sub condition.
Again it is important to name the sub condition as this will be displayed in the parent condition. Fill in the rules for this sub condition and then click the Back to Parent button when finished.
Finally we have the complex condition defined which will perform a boolean 'AND' between the two sub conditions defined. You can add as many sub conditions as you need.
If you need more complexity to your conditions, you can convert any simple condition into a complex one. So, if needed, Task or Problem could be converted into a complex condition adn you'd end up with 3 levels in the condition definition.
Comments
Please sign in to leave a comment.