Time-based Routing Without Programming
Introduction
Routing calls depending on the date and time is a very common task, so we made it simpler than ever to do. Using the 3CX Call Flow Designer, is possible to do this without creating a C# function, without any programming experience.
This guide describes how to use the “Date & Time condition” component to route calls to different extensions depending on the time of the day, from a Call Flow app created with the 3CX Call Flow Designer (formerly VAD). We apply this routing scheme:
- During out of office hours (including holidays): calls are 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 are routed to the “promotions” queue.
- During in-office hours, the rest of the days and times: calls are routed to the “standard” queue.
💡 Tip: The project for this example application is available via the CFD Demos GitHub page, and is installed along with the 3CX Call Flow Designer in your Windows user documents folder, i.e. “C:\Users\YourUsername\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, e.g. “DateTimeRouting”.
Step 2: Add the Date & Time Condition Component
Now we can add the “Date & Time condition” component:
- Drag a “Date & Time Condition” component from the toolbox, and drop it into the design view of the “Main” callflow. Then select the component added, go to the “Properties” and rename it to “dateTimeCondition”.
- Configure this component with 3 branches, as in the above example , and name them “businessClosed”, “promotions” and “standard”.
- Branches are evaluated from left to right. The first branch with a valid condition is executed. Now we need to configure the conditions in which each branch is executed. To do this, double-click on the branch “businessClosed”, or right click on it and select the “Configure” menu option to open the configuration dialog.
- This configuration dialog enables you to configure DID filters, as well as date and time conditions. Specifying DID filters activates a branch only when a call arrives to a 3CX 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 DIDs in the list below. We set the DID Filter to “AllDIDs” as we don’t want to restrict DIDs in this example. Then, click on the “Edit Date Time Conditions” button to open the editor.
- In this dialog we can specify different date and time conditions:
- Day of week: to specify time ranges for specific week days, e.g. for every Monday.
- Specific day: to specify a time range on a specific date, e.g. a particular holiday.
- 3CX Office Hours: to activate the branch during global office hours.
- 3CX Out of Office Hours: to activate the branch during out of global office hours.
- In this case we select “3CX Out of Office Hours”, to activate the branch when the business is closed. This option does not require any other configuration, so click “OK” to save.
- Now we need to configure the “promotions” branch, 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 in the above example.
📄 Note: The time configured in the “From" and “To" fields is included in the range, i.e. to configure a time range between 9 and 12, you need to set it for 09:00 to 11:59.
- For the “standard” branch we can use the condition “3CX Office Hours”, to be selected when the other branches are not active.
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 suitable internal extension in each case. To do this, drag a “Transfer” component from the toolbox, and drop it into the first branch. Repeat the procedure to add 3 components, one for each branch. Configure each “Transfer” component with a different destination. In our example, we set the “Destination” property for each component to the extensions 800, 801 and 802 respectively.
Step 4: Build and Deploy to 3CX Phone System
The project is ready to build and upload to our 3CX Phone System server, with these steps:
- Select “Build” > “Build All” and the CFD generates the file “DateTimeRouting.zip”.
- Go to the “3CX Management Console” > “Advanced” > “Call Flow Apps” > “Add/Update”, and upload the file created by the CFD in the previous step.
- The Call Flow app is ready to use. Make a call to it, to be transferred to a different extension depending on the time of the day.
See Also
- Learn more about CFD components.
- Automated Telephone Ordering Voice app with CRM integration via the 3CX API.
- Sending emails from a CFD voice app.
- Routing Calls Based on the Time of Day.
- Using the Authentication Component to Validate Customers.
- Using the Credit Card Component.
- Text to Speech with the 3CX Call Flow Designer.
- Using the Loop component to navigate upwards
- Registering and making callbacks
- Using the survey component
- Using the CRM Lookup component
- See how to integrate your PBX with a CRM via the 3CX API.
Last Updated
This document was last updated on 29th April 2021
https://www.3cx.com/docs/cfd-time-based-routing/