0

Hello. I wanna develop an IVR system in order to handle loyalty program balance queries in a more effective way. This is a kind of point collection campaign. Do you have any idea for this purpose? I would like to inform the caller after he has provided his unique customer code. Please, suggest me some solutions.

2
Contributors
1
Reply
32
Views
3 Years
Discussion Span
Last Post by simonrobert
0

Hi,

In my opinion the easiest and most reliable solution is creating an IVR script in OzML then host it in your database, in your PBX or on a webserver. For better understanding, take a look at the following code example (it can be found at www.ozekiphone.com). This script demonstrate a very similar field of use to your needs. It explains how to develop an IVR system that can be used to query account balance information after providing your PIN code. Check it:

//*************************************************************************************/
// This file will be executed when the call is connected.
// Filename: incomingcall.php
//*************************************************************************************/
<?xml version="1.0" encoding="UTF-8"?>
<Response>
   <UserInput enteredUrl="http://yourapp.com/dtmf_received.php" 
              digits="4" timeout="10" repeat="true">
        <InitialCommands> 
            <Speak>Please enter your 4 digits PIN code.</Speak>
        </InitialCommands>
    </UserInput>
</Response>

//*************************************************************************************/
// This file will be executed when DTMF input is received.
// dtmf_received.php
//*************************************************************************************/
<?php
    $dtmfdigits = $_REQUEST['DtmfDigits'];
    $sql = mysql_query('SELECT id FROM account WHERE pincode LIKE "' . $dtmfdigits . '";');
    $row = mysql_fetch_assoc($sql);

    if(mysql_num_rows($sql) == 1) {
        $response = "<GoTo>http://yourapp.com/members_area.php?accountid=
                                       " . $row['id'] . "</GoTo>";
    }
    else {
        $response = "<UserInput enteredUrl="http://yourapp.com/dtmf_received.php" 
                                 digits="4" timeout="10" repeat="true">";
        $response .= "<InitialCommands>";
        $response .= "<Speak>";
        $response .= "The PIN code you entered is invalid. Please give it again.";
        $response .= "Please enter your 4 digits PIN code again.";
        $response .= "</Speak>";
        $response .= "</InitialCommands>";
        $response .= "</UserInput>";
    }
?>

<?xml version="1.0" encoding="UTF-8"?>
<Response>
    <?php
    echo $response;
    ?>
</Response>

//*************************************************************************************/
// This file will be executed when the PIN code is accepted.
// members_area.php
//*************************************************************************************/
<?php
    $accountid = $_REQUEST['accountid'];
    $sql = mysql_query('SELECT balance FROM account WHERE id = "' . $accountid . '";');
    $row = mysql_fetch_assoc($sql);
?>

<?xml version="1.0" encoding="UTF-8"?>
<Response>
    <UserInput Timeout="5" Repeat="true"> 
        <InitialCommands> 
            <Speak>
                The pin code you entered is verified.
                Account balance, press 1.
                To call with our customer representative, press 2.
            </Speak>
        </InitialCommands> 
        <Inputs> 
            <Input Key="1"> 
                <Speak>
                    <?php
                    echo $row['balance'];
                    ?>
                </Speak>
            </Input> 
            <Input Key="2"> 
                <BlindTransfer>2000</BlindTransfer> 
            </Input> 
        </Inputs> 
    </UserInput> 
</Response>

The code above can be found here: http://www.ozekiphone.com/ivr-with-ozml-extension-1122.html This site offers really useful further information.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.