Time-based routing for anyone. No need for programming experience!
3CX PBX in the Cloud
1 year FREE - no ties!
google cloud platform
3CX
Zero Admin
With the new Dashboard
3CX
Bulletproof Security
With SSL certs and NGINX
3CX
Install on $200 Appliance
Intel MiniPC architecture
3CX
New, Intuitive Windows Client
More themes, more UC
3CX
More CRM Integrations
Scripting Interface to add your own
3CX
Improved Integrated Web Conferencing
iOS and Android apps included
3CX
Run On-Premise or in the Cloud
Google, OVH, Windows & Linux
Fast & easy call management
With the 3CX Web Client

Time based routing without programming

Time based routing without programming

On this topic

Time based routing without programming

Introduction

Step 1: Create the project

Step 2: Add the “Date & Time condition” component

Step 3: Add Transfer components

Step 4: Build and Deploy to 3CX Phone System

Introduction

Routing calls depending on date and time is a very common task, so we have made it simpler than ever to do it using the 3CX Call Flow Designer. Now it’s possible to do this without creating a C# expression, so anyone can do this without any programming experience.

In this article we’ll explain how to use the new Date & Time condition component to route calls to different extensions depending on the time of the day, from a voice app created with the 3CX Call Flow Designer (formerly VAD). We’ll route calls as follows:

  • During out of office hours (including holidays): calls will be routed to the “business closed” queue.
  • During in-office hours, on Monday, Wednesday and Friday from 9 to 12 and from 14 to 17: calls will be routed to the “promotions” queue.
  • During in-office hours, the rest of the days and times: calls will be routed to the “standard” queue.

The project for this application is installed along with the 3CX Call Flow Designer, in folder “Documents\3CX Call Flow Designer Demos”.

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

Step 2: Add the “Date & Time condition” component

Now we’ll add the Date & Time condition component:

  1. Drag a Date & Time condition component from the toolbox, and drop it into the design surface of the “Main” callflow. Then select the component added, go to the Properties window and rename it to “dateTimeCondition”.
  2. Configure this component with 3 branches, and name them “businessClosed”, “promotions” and “standard”:

  1. Branches are evaluated from left to right. The first branch with a valid condition will be executed. Now we need to configure the conditions in which each branch will be executed. To do this, double click on the branch “businessClosed”, or right click on it and select the menu option Configure. You will see the following dialog:

  1. This dialog lets you configure DID filters as well as date time conditions. The DID filters let you specify that this branch will be activated only when the call arrives to 3CX to a specific DID. You can select “AllDIDs” to allow calls to any DID, “AllDIDsWithExceptions” to allow calls to any DID except the ones in the list below (DIDs separated by commas), or “SpecificDIDs” to allow calls only to the DIDs in the list below. We’ll set the DID Filter to “AllDIDs” as we don’t want to restrict DIDs in this particular case. Then, click on the Edit Date Time Conditions button to open the editor.

  1. In this dialog we can specify different date and time conditions:
  • Day of week: to specify time ranges in specific days of the week, for example every Monday.
  • Specific day: to specify a time range in a specific date, for example a particular holiday.
  • 3CX Office Hours: to activate the branch during global office hours.
  • 3CX Out of Office Hours: to activate the branch when we’re out of global office hours.
  1. In this case we will select “3CX Out of Office Hours” as we want to activate the branch when the business is closed. This option doesn’t require any other configuration, so we press OK to save the changes.
  2. Now we need to configure the “promotions” branch. We want to activate it for any DID, on Monday, Wednesday and Friday from 9 to 12 and from 14 to 17. To do this, we configure the conditions as follows:

  1. For the “standard” branch we can use the condition “3CX Office Hours”, and it will be selected when the previous ones didn’t.

Step 3: Add Transfer components

Now that we have our conditions ready, we need to add a Transfer” component to each branch, so the call is transferred to a different internal extension in each case. To do this, drag a Transfer” component from the toolbox, and drop it into the first branch. Then repeat the procedure to add 3 components, one into each branch. Configure each Transfer component with a different Destination. In our example, we’re setting the Destination property of each component to extensions 800, 801 and 802 respectively.

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:

  1. Go to Build > Build All. The CFD will create the file “DateTimeRouting.tcxvoiceapp”.
  2. 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.
  3. Save the changes to the queue. The voice app is ready to use. Make a call to the configured extension, and you should be transferred to a different destination depending on the time of the day.
Get 3CX Free for 1 Year Today
Download On-Premise Try in the Cloud