Welcome to the second part of this chapter.
In this section, we will be adding another level of complexity to enable you to build even more interesting and relevant Automations. You achieve this by adding Triggers. So far you've only used the Trigger "always" so we will now learn what else is possible.
We introduced Triggers in section 1.2 of chapter 2 and gave a more detailed tutorial in section 3.3 of the same chapter. If you're not feeling comfortable about building Triggers, yet, we suggest you go back to these two sections and review them before continuing with this chapter.
As you will learn, Triggers are central for most automation and integration processes. You will need to carefully define what you want to achieve and a central element is finding out how to build the Triggers to get there.
We'll start with an easy example before diving into more complex topics. This will be a nice start before we are getting more serious.
Our use case
We will take our example from section 1.3 in which we were sending an email for every inbound call. However, instead of sending an email for every inbound call, we only want to send an email if the call comes from your own mobile phone.
Let's say your mobile phone number is 44790512345678 including the international code (in this example 44 for the UK - don't add a + or 00, this won't work).
Go to the section Triggers in babelforce and create a new Trigger, give it a name and choose to match all conditions.
Now add your conditions. Actually, we will just add one condition to test if the caller's number is equal to your mobile number. The Trigger will look like this when you are finished:
Now take the Trigger and add it to the Automation we created in 1.3. That's how it should look like:
Next, do your test call to your inbound number (again, you'll need the same basic call flow as created in section 1.3 of this chapter). If you call from your mobile phone, then the email will be sent. If you call from another phone, then no email will be sent.
As you can see, this opens up a whole new range of possibilities. For instance, you could now say, if a call is older than 5 minutes, take it out of a queue and offer a callback (that would mean you use the condition call duration greater 300 seconds).
Or even more interesting from an integration perspective: You will now be able to create tickets or logs for every incoming call, print the wait and talk time in a ticket, you can search for users in your database, route calls based on customer inputs and print these in your system of records, etc., etc.
However, to be able to do this we need to go back to some more theory. This time, we need to learn more about the calls itself in order to understand how to build the right Trigger. So let's go to the next section to understand how calls reach babelforce platform.