We already gave a short introduction to triggers in this article. Now we are getting serious. You will learn how to create your own triggers and make use of them.
Introduction to triggers
Triggers describe a certain condition. They don't do anything on their own but you need them to route your calls.
For instance, in the call-flow we are analyzing in this section, we have four triggers:
- One checks if business hours are not true. So if a call reaches the platform after hours it returns TRUE.
- Another checks if a calendar is true. So if you entered an exceptional holiday and a call reaches the platform at that time, it will also return TRUE.
- The third looks if there are any agents logged-in to take calls. If there are it also returns TRUE.
- The last one checks the queue wait time (how long has the customer been waiting in the queue)
So that's what we do with triggers: We define conditions and based on whether or not they are true a call takes a certain route in your call flow. Triggers are only useful if you combine them with modules or events. But you cannot build a call flow without them.
Let's look at how triggers work and what you can do with them.
Every trigger consists of at least one
- and in most cases an Expectation
Expressions are probably a bit difficult to understand at first - but they are central. For almost any functionality you have an expression that will be filled with a value at some point within a call.
For instance, each Business Hour and Calendar has its own expression (open the drop down list to find out which exist). This also means that expressions can be dynamic, the more business hours you have the more business hour expressions you will see. E.g., If you have one Business Hour for your New York City and another for your Amsterdam office, you might find the following two expressions in the list:
- Business Hours [Office Hours - US/NYC]
- Business Hours [Office Hours - EU/Amsterdam]
So how does it work? Imagine a call entering one of your call modules that tests opening hours. The call event knocks on the Trigger and asks: hey, are you true or false? The trigger with the opening hour expressions has the expectation that the selected opening hour is not given and in this case would return true. However, when the calls knocks and the trigger tests it realizes that the opening hours are given, therefore, it returns a "False".
Other dynamic expressions are new calendars, queues, variables and IVR inputs.
Besides those, you have a number of pre-defined expressions, mainly concerning calls and agents. You find them all in your Expression list.
To define a trigger, you must create some logical condition with the help of Operators. So for instance, you want calls that reach your platform after hour so the customer hears an after hour announcement. Therefore, you need to check whether Business Hours do not apply. As you will see in the example below, you can select the operator "is not given" to define this condition. Alternatively, you could use "is equal to" "false" ("operator" "expectation") or "is not equal to" "true". There are many ways of achieving and testing this condition.
This is the list of all currently available logical Operators:
- is equal to
- is not equal to
- is great than
- is great than or equal to
- is less than
- is less than or equal to
- is similar to
- is given
- is not given
- starts with
- ends with
- does not contain
Setting up the three triggers for the call-flow
The first trigger we already discussed extensively in this tutorial: it checks whether Business Hours do not apply. If you want to reuse the existing trigger, you must exchange the business hours it refers to! So click on the down pointing error, find "hours" and select the correct Business Hours that you want to use from the list! If you see numbers as in the example below, the trigger will not be working.
The second trigger is looking at holidays. Here you need to do exactly the same thing as for Business Hours: Go into Triggers, find Calendars and select the one you want to be using.
The third trigger is checking if agents are enabled. Enabled means that at least one agent is online. However, this does not mean an agent is ready to take a call. This one agent might be busy in a call.
The fourth trigger checks how long a call has been waiting in a queue. If it waits more than 300 seconds, the trigger is true.
In the next section, you will learn how these conditions that triggers create can be used to define a call's path.