Introduction
We have previously created a voice
application for automatic dialing of subscribers in the
3CX Call Flow Designer application, which uses the Power Dialer component. In normal outgoing dialing calls to subscribers from the base are made with the same, equal, periodicity. However, it is possible that some calls (conversations) take longer than planned. And we are still trying to gain new subscribers! Another situation - in different periods of time (day and night, for example) in the call center there is a different number of operators. Agree, it would be nice to adapt the frequency of dialing, depending on the availability of free operators. The new 3CX CFD component called Predictive Dialer is great for this.
In this article we will explain how to create a predictive outgoing call (dialer) in 3CX. The dialer will automatically make outgoing calls to external numbers and connect their internal Queue of calls. At the same time, the speed of dialing dynamically changes depending on the number of free operators in this Queue. This essentially reduces operator idle time, that is, there are no operators left who have not received calls for a long time.
Please note - the 3CX CFD development environment is free. But voice applications will be run only on
3CX Pro and Enterprise editions . Download CFD
from here .
The demo project of this voice application comes with the 3CX CFD distribution and is located in the Documents \ 3CX Call Flow Designer Demos folder.
')
It is important to note that by default, the dialer starts working when the 3CX Queue Manager Service starts. Therefore, it is necessary to specify a certain condition by which the dialer will make calls. For this, the voice application uses the Create a Condition component. For example, you can check (set) the day and time of the day, in which calls should be performed. We will show how to limit the work of the dealer on working days and for a certain period during the day.
Telephone numbers for calling can be taken from various data sources, for example, from a text file, a database, etc. In our example, a database is used.
Project creation
To create a CFD project, go to File → New → Project, specify the project location folder and its name, for example, PredictiveDialerDemo.
The new project by default contains the voice application Main.flow. It is not used in this project, so delete it in the Project Explorer window. In the same window, add a new application - right-click on the project name and select New Dialer. Call it MainDialer. In the Project Explorer, select the MailDialer object and set its properties in the Properties Window, as shown below.

The new dealer can now work in two modes:
- Power Dialer - calls are made at a constant frequency (we looked at it earlier).
- Predictive Dialer - the frequency of calls is automatically adjusted depending on the number of free operators at each time.
Since we use the Predictive Dialer mode, consider two of its properties:
- Optimization - the mode of making calls with optimization for operators or for subscribers
- Queue - extension number of the Queue, the operators of which the dealer will track
When starting, the dialer checks the total number of operators in the Queue and the number of free operators. Then it starts dialing to the limit set for this optimization mode. Depending on the set mode, the diver will accelerate or slow down. Consider how this works:
- Optimization for operators - in this mode, the dialer tries to load operators as much as possible, reducing the time during which they stand idle (do not handle calls). He will try to make calls with such frequency that each operator will work with any call at any time. During the call process, it is possible that several calls will be in the Queue for a short period, waiting for the release of the operator. At this moment, the dialer will automatically reduce the speed of dialing to minimize the waiting time for the subscriber in the Queue.
- Optimization for subscribers - in this mode, the subscriber will be immediately connected to a free operator and will never be expected in the Queue. In this case, unlike the previous one, some operators may remain free for a short time. But the dialer ensures that each dialed subscriber will be immediately served by the operator.
The timing of the start of dialing
Add the Date & Time condition component to the application and call it checkTimeToCall. The component uses only one timeToCall branch, which will be executed when the call time comes.

To configure the timeToCall branch to run from Monday to Friday from 9:00 am to 5:00 pm, set the AllDIDs DID selection and time intervals as shown below.

Getting a number from the base and dialing
As it was said, we get the numbers of subscribers from the external database. The request to the database should return the subscriber number or an empty string, if there are no more subscribers at the moment. To do this, we use the Database Access component and configure it to perform a query to the database.

Since the query returns a single value (subscriber number), we set the operator type to Scalar. Of course, you must change the SQL query string to match the structure of your database.
After setting up the Database Access component, we will check if it returned the subscriber number. This must be done before dialing. Add another component, Create a condition, and create a single branch with a condition for checking the availability of a number. Logical expression of the number check:
GREAT_THAN(LEN(TRIM(getNextNumber.ScalarResult)),0)
If the condition is met, then we have a number to call. And then we make the call using the Make Call component, which is configured as follows:
- Make call from (call source) - the number of the subscriber obtained from the base
- To (call recipient) —the extension of the Queue to which agents are connected.

The final appearance of the voice predictive call application should have something like this.

Compiling and installing the application on the 3CX server
Voice application is ready! Now it should be compiled and uploaded to the 3CX server. For this:
- Go to Build> Build All, and the CFD will create the PredictiveDialerDemo.tcxvoiceapp file.
- Go to the 3CX management interface, in the Call Queues section. Create a new Call Queue, specify the name and extension number of the Queue, and then set the Voice Applications option and download the compiled file.
- Save changes to the queue.
Please note - the call will start when the 3CX Queue Manager service is started / restarted.