2.0 - Triggers in Events

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 events. 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 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.

Getting started

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 Integrated processes > Triggers on babelforce and create a new trigger, give it a name 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:

mceclip1.png

Note that "Call From: number" is the nice (friendly) name for the placeholder/expression {call.from.number} that we used in our send email action in 1.3.

Now take the trigger and add it to the event we created in 1.3. That's how it should look like:

mceclip2.png

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.

 

Have more questions? Submit a request