Create a Variable to Measure Service Quality
A variable is a temporary data item that is assigned a default value at the start of rules processing. You can define rule actions that update the variable during rules processing, and you can also define conditions based on the value of the variable.
In this example, let’s assume that you want to be sure your management team is aware of high-priority service issues.
- Your organization expects your agents to communicate positively with all customers.
- Because the XYZ Corporation constitutes a significant part of your business, you want to be sure that contacts from that company are satisfied with the service they receive from your organization.
- You want to be especially sure that managers from the XYZ Corporation are happy with your service.
Note: A custom field can also accomplish the same function as a variable. The
difference is that the value of the custom field is stored in the database at the end of rules
processing. If its value changed during rules processing as a result of actions applied to it,
that value remains and is what the custom field contains the next time the object is processed
by the rules engine. In contrast, the value of a variable is not stored in the database, so its
value is always 0 when rules processing begins the next time.
Results:
Using these rules, you can see that:- No email is triggered if a manager (+2) at XYZ (+2) is happy or neutral (no change because rule conditions are not met), and if the agent SmartSense rating is neutral (+1). In this situation, the value is 5 (2+2+1).
- Any time a staff member’s SmartSense rating registers anywhere in the angry range, the customer support supervisor is notified, because the value is at least 6.
- An angry customer will trigger a notification to the supervisor, because the value is also 6.
- An unhappy (+6) manager (+2) from XYZ (+2) results in a service_quality value of at least 10, and possibly more, depending on the agent’s SmartSense rating. This situation triggers an email to the manager of your customer support department.
Note: Whenever the rules engine begins processing a new or updated incident, the value of
the service_quality variable is initialized to 0 again.