IVR: Example Database Scenario
Retrieving Data from the Database
The Bookshop_Welcome module allows callers to choose to search the database by either the books ISBN number or the author's name. The screen below shows the call flow module used when a search by ISBN is selected. The database actions that have been used are shown below the call flow diagram, with details on the following pages.
Database Open Action
The Database Open Action is used to link to the bookshop database.
The specific tab of the action contains the location of the database. Click the browse button to view the Data Link Properties dialog. The details entered into these screens will depend upon the type of database used. This example uses a Microsoft Access Database.
The example shown below shows the connection to the database.
If the database is available the callers move through the call flow to a menu action that will capture the ISBN number entered.
Database Execute Action
The Database Execute Action contains a query against the open database, in this example it concerns the ISBN captured in the previous menu action.
If the sequence of numbers entered by the caller matches an ISBN entry in the database, then the Author's name, cost, ISBN and book title details are captured. This query is entered into the Database Execute Action via the specific tab.
When entering information into the specific tab for the first time you will taken through a series of steps.
Select the Database Open Icon required. In this example the 'Make sure Database still active' icon was selected.
At the SQL Function window the option to 'Select …From' was chosen as information from the database is required.
Details are then entered into the SQL Wizard, as shown below.
When the query has been entered the SQL wizard is closed. The specific tab of the action will contain the entered query, see example shown below.
Database Get Data Action
The Database Get Data Action is used to return details of any matching entries following a search against a database.
To retrieve the results an option is selected on the specific tab to select how the data is retrieved from the database. In this example the option 'retrieve the next item in the list' was selected to allow the caller to step through the results, if more that one match ISBN occurred.
If a matching ISBN has been found the call flow is routed to another module called 'Bookshop_CurrentBookSpeakDetails'.