Creating a Phone Support Portal Part 4: Validation using an SQL Database
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

CFD Example: Creating a phone support portal – Part 4 Validation using an SQL database

Creating a Phone Support Portal with the 3CX Call Flow Designer – Part 4

On this topic

Creating a Phone Support Portal with the 3CX Call Flow Designer – Part 4

Introduction

Validating the customer using an SQL Server database

Conclusion

Introduction

In the previous articles of this series Creating a Phone Support Portal with the 3CX Call Flow Designer – Part 1, Part 2 and Part 3, we explained how to create an application to validate whether a customer has a support contract, and then transfer the call to the appropriate department.

In the first part we have shown how to create the application call flow, while in the second part we explained how to validate the information using a web service, and in the third part how to perform the validation using XML and CSV text files.

In this article we will show how to perform the validation using the information available in an SQL Server database. The same procedure can be applied to PostgreSQL databases as well.

Validating the customer using an SQL Server database

The 3CX Call Flow Designer offers out of the box integration with databases using the Database Access component. This component can be configured to access SQL Server or PostgreSQL databases. In this article we’ll use it to access an SQL Server database.

We need to validate the customer by querying our SQL Server database. To do this, drag a Database Access component from the toolbox and drop it into the designer. Rename the component to validateCustomer. We’ll assume that we have a “Customers” table with “id” and “pin” fields, so the component should be configured as follows:

Please note that the statement type is Scalar, which means that the query will return a single value. In this case it will return the quantity of records with the specified id and pin. As a consequence, if the value returned by the query is 0, that means that the customer could not be validated, while if the value returned is 1 then the validation was successful.

Now we need to assign the validation result to the output property ValidationResult. To do that we’ll use an Assign a Variable component, to set the value returned by the following expression to the variable callflow$.ValidationResult:

GREAT_THAN(validateCustomer.ScalarResult,0)

The resulting diagram will look like in the following screenshot.

Conclusion

This is the last article of this series. In the previous articles we have covered how to do the customer validation using a web service, XML or CSV text files. And now we have just shown how to do this using databases.

Now you have a clear picture about how to use most of the advanced components provided by the 3CX Call Flow Designer, to perform different tasks.

You might also be interested in:

Get 3CX Free for 1 Year Today
Download On-Premise Try in the Cloud