API & DOCS

My Account            

API used to get a report of all IVR responses over a given date range.

Use the IVR API to get IVR Respondent data

The IVR Report API is used to get a report of all IVR/SurVo responses over a given date range. There are options available to return call detail records SourceTrak attribution details alongside the IVR responses.

📘

Base URL for IVR Report

https://secure.dialogtech.com/ibp_api.php

Parameter List

ParameterRequiredAcceptsMax LengthNotesUsage
actionYesString: report.survon/aOnly accepts report.survo for IVR ReportingDefines the API Call as "IVR Report" type
access_keyYesStringn/aAccess Key from the Key Manager within a DialogTech accountCredentials used for access to the API for a particular DialogTech account
secret_access_keyYesStringn/aSecret Access Key from the Key Manager within a DialogTech accountCredentials used for access to the API for a particular DialogTech account
start_dateYesDate8Date format should be YYYYMMDDDefines the start of the date-range for records to be returned from
end_dateYesDate8Date format should be YYYYMMDDDefines the end of the date-range for records to be returned from
idYesStringn/aIVR building block ID within the specified date rangeFilters the response to only return IVR Respondent data where the IVR Building Block ID matches the id provided.
formatNoString: xml or csv3xml - XML format
csv - csv format
Determines the output format for the response, as either xml or csv
include_cdrNo0 or 1n/a0 - Do not include additional columns from the Call Detail Report
1 - Include additional columns from the Call Detail Report
Adds additional columns from the Call Detail Report alongside the IVR Respondent data
include_stNo0 or 1n/a0 - Do not include additional columns from SourceTrak
1 - Include additional columns from SourceTrak
Adds additional columns from SourceTrak alongside the IVR Respondent data

Using this API

These code examples are meant to show a basic method of accessing DialogTech's IVR Report API.

<?php
    /*
        IVR Report EX:
        This example will request an IVR report. 
        It will then create an html table to 
        display on the page with all available
        IVR fields.
    */

    // Create cURL resource
    $ch = curl_init(); 
    $baseuri = "https://secure.dialogtech.com/ibp_api.php?";

    // API Specific Static Parameters
    $action = "report.survo";

    // Required User Parameters To Request the API
    $access_key = "foo";
    $secret_access_key = "bar";
    $start_date = "20170401";
    $end_date = "20170430";
    $id = "1105795";

    // Parameters that define the fields returned
    $include_cdr = "1";
    $include_st = "1";
    $format = "csv";

    // Construct the full URL
    $full_url = $baseuri . "&action=" . $action .
        "&access_key=" . $access_key .
        "&secret_access_key=" . $secret_access_key .
        "&start_date=" . $start_date .
        "&end_date=" . $end_date .
        "&id=" . $id .
        "&include_cdr=" . $include_cdr .
        "&include_st=" . $include_st . 
        "&format=" . $format;

    // Set the URL
    curl_setopt($ch, CURLOPT_URL, $full_url);

    // Sets the return options of the cURL to return the actual result from the curl request, and FALSE on failure
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

    // Sets the $output variable to the result of the curl
    $output = curl_exec($ch);

    // Close curl resource to free up system resources
    curl_close($ch);

    // Basic CSS for the table formatting
    $page_html = "<style>
    td
    {
        border-left:1px solid black;
        border-top:1px solid black;
        text-align:center;
    }
    table
    {
        border-right:1px solid black;
        border-bottom:1px solid black;
    }
</style>\n\n";


    // Create the table
    $table = "<table>\n";
    $rows = str_getcsv($output, "\n");

    foreach($rows as &$row) {
        // Add new row
        $table .= " <tr>\n";
        $cells = str_getcsv($row);

        foreach($cells as &$cell) {
            // Add a new cell
            $table .= "     <td>$cell</td>\n";
        }

        // Complete the new row
        $table .= " </tr>\n";
    }

    // Complete the table
    $table .= "</table>";

    // Echo the CSS and table on the page
    echo $page_html . $table;
?>
curl -X ""

Example Response

<?xml version='1.0' encoding='iso-8859-1'?>
<!DOCTYPE data [
  <!ELEMENT data (record+)>
  <!ELEMENT record (Respondent_ID,Caller_ID,Completed,Timestamp,SID,Question_One,Talk_Minutes,Intelligent_Minutes,Call_Type,Phone_Label,Recording,Last_Name,First_Name,Street_Address,City,State,Zip_Code,Transfer_To_Number,Call_Transfer_Status,Inbound_Device_Type,URL_Tag,Domain,Search_Term,Activity_Keyword,Custom_Value,Custom_Id,Google_UA_Client_ID,gclid,Campaign,Pool_Name,Location_Name,Keyword,Match_Type,Network,Device,Device_Model,Creative,Placement,Target,Param1,Param2,Random,Ace_Id,Ad_Position,Product_Target_ID,Ad_Type)>
   <!ELEMENT Respondent_ID (#PCDATA)>
   <!ELEMENT Caller_ID (#PCDATA)>
   <!ELEMENT Completed (#PCDATA)>
   <!ELEMENT Timestamp (#PCDATA)>
   <!ELEMENT SID (#PCDATA)>
   <!ELEMENT Question_One (#PCDATA)>
   <!ELEMENT Talk_Minutes (#PCDATA)>
   <!ELEMENT Intelligent_Minutes (#PCDATA)>
   <!ELEMENT Call_Type (#PCDATA)>
   <!ELEMENT Phone_Label (#PCDATA)>
   <!ELEMENT Recording (#PCDATA)>
   <!ELEMENT Last_Name (#PCDATA)>
   <!ELEMENT First_Name (#PCDATA)>
   <!ELEMENT Street_Address (#PCDATA)>
   <!ELEMENT City (#PCDATA)>
   <!ELEMENT State (#PCDATA)>
   <!ELEMENT Zip_Code (#PCDATA)>
   <!ELEMENT Transfer_To_Number (#PCDATA)>
   <!ELEMENT Call_Transfer_Status (#PCDATA)>
   <!ELEMENT Inbound_Device_Type (#PCDATA)>
   <!ELEMENT URL_Tag (#PCDATA)>
   <!ELEMENT Domain (#PCDATA)>
   <!ELEMENT Search_Term (#PCDATA)>
   <!ELEMENT Activity_Keyword (#PCDATA)>
   <!ELEMENT Custom_Value (#PCDATA)>
   <!ELEMENT Custom_Id (#PCDATA)>
   <!ELEMENT Google_UA_Client_ID (#PCDATA)>
   <!ELEMENT gclid (#PCDATA)>
   <!ELEMENT Campaign (#PCDATA)>
   <!ELEMENT Pool_Name (#PCDATA)>
   <!ELEMENT Location_Name (#PCDATA)>
   <!ELEMENT Keyword (#PCDATA)>
   <!ELEMENT Match_Type (#PCDATA)>
   <!ELEMENT Network (#PCDATA)>
   <!ELEMENT Device (#PCDATA)>
   <!ELEMENT Device_Model (#PCDATA)>
   <!ELEMENT Creative (#PCDATA)>
   <!ELEMENT Placement (#PCDATA)>
   <!ELEMENT Target (#PCDATA)>
   <!ELEMENT Param1 (#PCDATA)>
   <!ELEMENT Param2 (#PCDATA)>
   <!ELEMENT Random (#PCDATA)>
   <!ELEMENT Ace_Id (#PCDATA)>
   <!ELEMENT Ad_Position (#PCDATA)>
   <!ELEMENT Product_Target_ID (#PCDATA)>
   <!ELEMENT Ad_Type (#PCDATA)>
]>
<data>
    <record>
        <Respondent_ID>1234567890</Respondent_ID>
        <Caller_ID>5554443333</Caller_ID>
        <Completed>No</Completed>
        <Timestamp>2017-01-01 06:00:00</Timestamp>
        <SID>170101aaabbbcccd</SID>
        <Question_One>user_recordings/555/55555/survey/4444444/1112223334-A1.wav</Question_One>
        <Talk_Minutes>0.5</Talk_Minutes>
        <Intelligent_Minutes>0.4</Intelligent_Minutes>
        <Call_Type>Inbound</Call_Type>
        <Phone_Label>Survey Line</Phone_Label>
        <Recording></Recording>
        <Last_Name>Simpson</Last_Name>
        <First_Name>Homer</First_Name>
        <Street_Address>742 Evergreen Terrace</Street_Address>
        <City>Springfield</City>
        <State></State>
        <Zip_Code></Zip_Code>
        <Transfer_To_Number>5556667890</Transfer_To_Number>
        <Call_Transfer_Status>Answer</Call_Transfer_Status>
        <Inbound_Device_Type>Undetected</Inbound_Device_Type>
        <URL_Tag></URL_Tag>
        <Domain></Domain>
        <Search_Term></Search_Term>
        <Activity_Keyword></Activity_Keyword>
        <Custom_Value></Custom_Value>
        <Custom_Id></Custom_Id>
        <Google_UA_Client_ID></Google_UA_Client_ID>
        <gclid></gclid>
        <Campaign></Campaign>
        <Pool_Name></Pool_Name>
        <Location_Name></Location_Name>
        <Keyword></Keyword>
        <Match_Type></Match_Type>
        <Network></Network>
        <Device></Device>
        <Device_Model></Device_Model>
        <Creative></Creative>
        <Placement></Placement>
        <Target></Target>
        <Param1></Param1>
        <Param2></Param2>
        <Random></Random>
        <Ace_Id></Ace_Id>
        <Ad_Position></Ad_Position>
        <Product_Target_ID></Product_Target_ID>
        <Ad_Type></Ad_Type>
    </record>
    <record>
        <Respondent_ID>0009998887</Respondent_ID>
        <Caller_ID>5554443333</Caller_ID>
        <Completed>Yes</Completed>
        <Timestamp>2017-01-01 06:30:00</Timestamp>
        <SID>170101cccdddeeef</SID>
        <Question_One>user_recordings/555/55555/survey/4444444/9998887776-A1.wav</Question_One>
        <Talk_Minutes>0.7</Talk_Minutes>
        <Intelligent_Minutes>0.2</Intelligent_Minutes>
        <Call_Type>Inbound</Call_Type>
        <Phone_Label>Survey Line</Phone_Label>
        <Recording></Recording>
        <Last_Name>Simpson</Last_Name>
        <First_Name>Homer</First_Name>
        <Street_Address>742 Evergreen Terrace</Street_Address>
        <City>Springfield</City>
        <State></State>
        <Zip_Code></Zip_Code>
        <Transfer_To_Number>5556667890</Transfer_To_Number>
        <Call_Transfer_Status>Answer</Call_Transfer_Status>
        <Inbound_Device_Type>Undetected</Inbound_Device_Type>
        <URL_Tag></URL_Tag>
        <Domain></Domain>
        <Search_Term></Search_Term>
        <Activity_Keyword></Activity_Keyword>
        <Custom_Value></Custom_Value>
        <Custom_Id></Custom_Id>
        <Google_UA_Client_ID></Google_UA_Client_ID>
        <gclid></gclid>
        <Campaign></Campaign>
        <Pool_Name></Pool_Name>
        <Location_Name></Location_Name>
        <Keyword></Keyword>
        <Match_Type></Match_Type>
        <Network></Network>
        <Device></Device>
        <Device_Model></Device_Model>
        <Creative></Creative>
        <Placement></Placement>
        <Target></Target>
        <Param1></Param1>
        <Param2></Param2>
        <Random></Random>
        <Ace_Id></Ace_Id>
        <Ad_Position></Ad_Position>
        <Product_Target_ID></Product_Target_ID>
        <Ad_Type></Ad_Type>
    </record>
</data>
"Respondent_ID","Caller_ID","Completed","Timestamp","SID","Question_One","Talk_Minutes","Intelligent_Minutes","Call_Type","Phone_Label","Recording","Last_Name","First_Name","Street_Address","City","State","Zip_Code","Transfer_To_Number","Call_Transfer_Status","Inbound_Device_Type","URL_Tag","Domain","Search_Term","Activity_Keyword","Custom_Value","Custom_Id","Google_UA_Client_ID","gclid","Campaign","Pool_Name","Location_Name","Keyword","Match_Type","Network","Device","Device_Model","Creative","Placement","Target","Param1","Param2","Random","Ace_Id","Ad_Position","Product_Target_ID","Ad_Type"
"1234567890","5554443333","No","2017-01-01 06:00:00","170101aaabbbcccd","user_recordings/555/55555/survey/4444444/1112223334-A1.wav","0.5","0.4","Inbound","Survey Line","","Simpson","Homer","742 Evergreen Terrace","Springfield","","","5556667890","Answer","Undetected","","","","","","","","","","","","","","","","","","","","","","","","","",""
"0009998887","5554443333","Yes","2017-01-01 06:30:00","170101cccdddeeef","user_recordings/555/55555/survey/4444444/9998887776-A1.wav","0.7","0.2","Inbound","Survey Line","","Simpson","Homer","742 Evergreen Terrace","Springfield","","","5556667890","Answer","Undetected","","","","","","","","","","","","","","","","","","","","","","","","","",""

Response Appendix

This is a list of each value returned by the IVR Report API and a simple description of what that value represents.

ParameterDescription
Respondent_IDA unique ID assigned to the respondent
Caller_IDCaller ID of the respondent
CompletedA Yes/No flag if the IVR was completed normally. No indicates the respondent likely hung up during the IVR
TimestampResponse time of the Respondent
SIDA unique identifier for the call on the DialogTech system

The include_cdr and include_st parameters

Additional fields are returned when include_cdr is selected. Those fields are

  • Talk_Minutes
  • Intelligent_Minutes
  • Call_Type
  • Phone_Label
  • Recording
  • Last_Name
  • First_Name
  • Street_Address
  • City
  • State
  • Zip_Code
  • Transfer_To_Number
  • Call_Transfer_Status
  • Inbound_Device_Type

Additional fields are returned when include_st is utilized. Those fields are

  • URL_Tag
  • Domain
  • Search_Term
  • Activity_Keyword
  • Custom_Value
  • Custom_Id
  • Google_UA_Client_ID
  • gclid
  • Campaign
  • Pool_Name
  • Location_Name
  • Keyword
  • Match_Type
  • Network
  • Device
  • Device_Model
  • Creative
  • Placement
  • Target
  • Param1
  • Param2
  • Random
  • Ace_Id
  • Ad_Position
  • Product_Target_ID
  • Ad_Type

The definitions of all these fields can be found within the Call Detail Report API documentation.