Creating a Phone Support Portal with the 3CX Call Flow Designer – Part 4
Introduction
The previous guides of this series Creating a Phone Support Portal with the 3CX Call Flow Designer – Part 1, Part 2 and Part 3, described how to create an application to validate a customer’s support contract info, and then transfer the call to the appropriate department. Part 1 described how to create the application call flow, Part 2 covered validating the information using a web service, and Part 3 validating using XML and CSV text files.
This guide presents validating using an SQL Server database, while the same steps can be applied for a PostgreSQL or MySQL database.
💡 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”.
Validating the Customer via a 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, PostgreSQL or MySQL databases. In this example, we use it to validate the customer by querying an SQL Server database:
- Drag a “Database Access” component from the toolbox and drop it into the designer.
- Rename the component to “validateCustomer”.
- Assuming that a “Customers” table with “id” and “pin” fields exists, we can configure the component as in the above example.
- Note that the statement type is “Scalar”, i.e. the query returns a single value. In this case it returns the quantity of records with the specified id and pin. Consequently, if the value returned by the query is 0, the customer info cannot be validated, while if the value returned is 1 then validation was successful.
- We need to assign the validation result to the output property “ValidationResult”. We use an “Assign a Variable” component to set the value returned to the variable “callflow$.ValidationResult”, using this expression:
Consider the above example flow and component configuration.
Conclusion
This last guide of this series described validating customer info using a database, while the previous guides covered how to validate customer info via a web service, XML or CSV text files.
Now you have a clear picture on how to use most of the advanced components provided by the 3CX Call Flow Designer for performing different tasks.
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-creating-phone-support-portal-4/