/
Database

Database

In the following example you can learn how to build a DB interaction between the IVR application and a remote DataBase.

Here we imagine to make a SELECT FROM WHERE Sql statement inside a post call handling routine using the Finally Box.

First of all you let’s define a new Channel variable inside the project dashboard.

Then we need to declare a connection to an existing DB

In our example we would need to query the table below (tableX):


The query we have performed is:

SELECT field1, field2, field3 FROM tableX

The whole returned resultset is stored in the RESULTSET defined variable.

To retrieve the value of a single field in a row you have to use the following notation (in our example by a NoOp box)

RESULTSET[#row][field_name]

e.g the value of field1 will be store into RESULTSET[0][field1]


Where:

#row: the row number in the resultset. Note that the row numbering start from 0

field_name: the name of the column as named in the DB schema

Related content

IVR Structure Blocks
IVR Structure Blocks
More like this
CSAT - CSI: forward customers to a Survey
CSAT - CSI: forward customers to a Survey
Read with this
ODBC
More like this
Get started
Get started
Read with this
Using variables in CallySquare
Using variables in CallySquare
More like this
Request HTTP API resources
Request HTTP API resources
Read with this