TryLearn More

Use SIP trunks, WebRTC & Apps

Slash your Phone Bill by 80%

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.