So let's get started and bring everything together. What Events and Actions can do - that's what we want you to understand in the upcoming sections.
In this easy first example we'll just send yourself an email at the start of a new call reaching babelforce:
We will be looking into two different setups. In one case, we will just send a general, rather boring text, to your inbox.
In the second example, you'll learn about "Expressions". We will explain how you can, very easily, print all available expressions into an email.
The third example will then explain how you can use these expressions by using so-called "Placeholders". They allow you to print dynamic text into your email.
In the end, we'll show you how to read Automations in the Live Logs we had already introduced in the last chapter.
All you need for this and all other examples:
➝ A phone number that routes to any module, for instance, you can route the call to a Welcome Audio.
1a: Set up and test a basic Automation to send an email Action
In babelforce Integrated processes > Global Automations, add a new Automation using the 'Add' button, select the Event "Inbound call" and the action "Send email". Enter an email address that you use and send yourself a message. It will look like this:
Next, go to the subsection Numbers in the section IVR call-flows. Ensure that you have a phone number and that it is routed to a module. It will look something like the example below:
Now call the number from your own cell phone or another phone.
You will receive an email. But not a very interesting one :-)
1b: Add some more interesting data from the call - print all Expressions
We can actually add a lot of interesting data to your email.
Simply paste this placeholder {core.expressions} into the email body in the Action. Your Automation Action will now look like the example below.
This will reveal in your email the entire set of expressions and their values currently set in the system and available to use for other Automations. Part of it will look like this:
[call.from.number] evaluates to [4930920373300]
[call.from.anonymous] evaluates to [false]
[call.from.mobile] evaluates to [false]
[call.displayAs] evaluates to [null]
[call.to] evaluates to [4930920373321]
[call.to.number] evaluates to [4930920373321]
....
The items on the left are the expressions and on the right, you see the current value of the expression at the time of the "Inbound call" Event. So, for instance, the moment the call reached the platform, the expression call.to was equal to 4930920373321.
We have many articles on this topic if you feel like you need more information. This whole section is solely dedicated to expressions and placeholders:
➝ Hint: in case you do not receive this email, check your spam folder. Some email clients consider the long content of the core expressions insecure.
2: Use specific placeholders to make your email content more useful
Take the same call flow setup as in our use case 1a. Again, we want to send an email on an incoming call, however this time we want to make some use of expressions and put interesting content in the email.
To achieve this, select expressions from the list you sent to your inbox earlier. Find something that is interesting and tells you something about the caller. When you decide which expressions you want to use, put curly brackets around them. As soon as you do this, they become so-called placeholders: they can now be put into a text to hold the place for the real value. For instance, if you want to know the value for call.from.number do this: {call.from.number}.
To make the email content even more valuable, put some information before and after the placeholder so you know what the printed value actually means.
So we can, for instance, format our email using the "Send email" Action with useful information like this:
And that's how the email will look like when you receive a call:
To learn more about specific placeholders, read this article.
You can also see the process from the steps described above in a video:
3: Test your setup: How to see what happens on your call with live logs
As already introduced in Chapter 2, Section 3.6, we recommend that you test your call flows by enabling Live Logging. We recommend the same when you set up Automations. You can see them in these logs.
Let's give that a try. Enable Live logging and repeat your test inbound call. You will see something like this in the Live Logs when your call arrives on the babelforce platform:
As you can see the call first hits the call flow voice module and simultaneously it triggers the email Action in the Automation you created. Once you have multiple Automations and potentially multiple call flows, you will see them all being fired here.
Great, the first step is made, you have to build your first global Automations. Let's continue with the next use cases, this time we will introduce you to SMS Automations. Enjoy!