Creating a predictive dialer with the 3CX CFD
On this topic
Until now, you were able to create a power dialer using the 3CX Call Flow Designer, that is a dialer that makes outbound calls at a steady pace. But what happens when we’re connecting calls to internal agents, and some calls take longer to be served by agents? Or during time frames with more or fewer agents to take calls? Wouldn’t it be great if the dialer could adapt the pace to the number of agents available at any time? The new predictive dialer comes to solve this!
In this article we’ll explain how to create a predictive dialer using the 3CX Call Flow Designer. Using a predictive dialer we can automatically make outbound calls to external numbers, and connect them to an internal queue, adapting the pace to the number of agents available for the queue, and therefore reducing the time in which agents are not handling any call.
The project for this application is installed along with the 3CX Call Flow Designer, in folder “Documents\3CX Call Flow Designer Demos”.
As this project will use a Dialer, it’s important to note that Dialers start working as soon as the 3CX Queue Manager Service starts. Therefore, you might want to use “Create a Condition” components to decide if it’s a good moment to make calls, even if the predictive dialer will adapt the pace to the number of agents available. For example, you can check the time of the day, if today is a holiday or we’re in a weekend, so the dialer only makes calls during the time frame you define.
The list of numbers to call can be anywhere, for example in a text file, in a database, etc. For this example we’ll use numbers from a database. We’ll also show how to restrict outbound calls between monday and friday in a specific time frame.
Step 1: Create the project
First, we need to create a new project. Open the CFD and go to “File > New > Project”, select the folder where you want to save it, and enter a name for the project. In this case we’ll name it “PredictiveDialerDemo”.
The project includes a callflow named “Main.flow” by default. We won’t be using this callflow, so you can delete it. Then add a new Dialer to the project. To do this, go to the Project Explorer window, right click on the project name node and select New Dialer. Set the name to “MainDialer”. Select the new dialer object in the Project Explorer window, and the Properties Window will show the dialer properties:
A dialer can be configured in 2 modes:
- Power Dialer: calls are made at a steady pace.
- Predictive Dialer: make call pace is automatically adjusted considering the number of agents available in a queue at any given moment.
In this case we’ll be using the Predictive Dialer mode, so we need to configure 2 properties under section “Predictive Dialer”:
- Optimization: here we define if we want to optimize the dialer for agents or for callees.
- Queue: this is the extension number of the queue to monitor.
As soon as the 3CX Queue Manager starts, the dialer starts as well, and checks how many agents the queue has, and how many of them are free. Then it starts making calls, until the limit set by the configured optimization mode is reached. Depending on the optimization setting, the dialer will make more or less calls. This is how it works:
- Optimizing for agents: the idea is to keep agents as full as possible, reducing the time in which they're not handling any call. So the dialer will make calls, trying that every agent has a call every time. This will probably cause that a few calls are waiting on the queue, so some callees might have to wait a few seconds to be connected to the agents, but the dialer will try to reduce the number of calls waiting on the queue as much as possible.
- Optimizing for callees: here callees are immediately connected to a free agent, and never wait on the queue. This will cause that some agents are free more time than with the previous approach, but the dialer ensures that callees are immediately assisted by an agent.
Step 2: Check if it’s time to make calls
For this demo, we want that our dialer makes calls only from Monday to Friday, between 9am and 5pm. To accomplish this, we will use the new “Date & Time condition” component. Drag it from the toolbox and drop it into the designer. Set the name of this new component to “checkTimeToCall”. This component needs only one branch: “timeToCall”. This branch will be executed when it’s time to make a call.
In order to configure the branch timeToCall to be executed between Monday and Friday, from 9am to 5pm, we need to set the DID Filter to “AllDIDs” and the following Date and Time condition:
Step 3: Get the number to call from the database and make the call
For this demo we’ll get the numbers to call from a database. Let’s assume that a query will return the next number to call, or an empty string if there is no number to call at a specific moment.
We need to use a “Database Access” component to execute the query, configuring it as follows:
The query will return a single value, so we use the statement type “Scalar”. Please note that you will need to edit this query and database access settings according to your real environment.
Now that we have the Database Access component ready, we need to check if it returned a number to call or not, before making the call. We need a “Create a condition” component to verify this case. We just need a single branch inside this condition, to check if there is a number available. The Condition property can be set to:
When that condition is met, we have a number to call. In that case, we’ll make the call using a “Make Call” component. The “Make Call” component should be configured with the value returned from the database as origin, and the queue extension number as destination, as follows:
This is how the dialer flow will look like after doing all these changes:
Step 4: Build and deploy to 3CX Phone System
The project is ready. We just need to build and upload it to our 3CX Phone System server. To do this:
- Go to “Build > Build All”. The CFD will create the file “PredictiveDialerDemo.tcxvoiceapp”.
- Go to the “3CX Management Console > Call Queues”, create a new queue, configure it with name and extension, check the “Voice apps” option, and upload the file created by the CFD in the previous step.
- Save the changes to the queue. The dialer is ready and will start making calls as soon as the 3CX Queue Manager service is started.