added drop percentage out of Answers for FTC compliance, Affected AST_VDadapt.pl and the timeonVDAD and VDAD stats reports

git-svn-id: svn://192.168.202.10@436 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
mattf
2006-12-15 16:47:38 +00:00
parent e4068e31ac
commit 78100097a9
6 changed files with 140 additions and 24 deletions
+89 -8
View File
@@ -14,6 +14,7 @@
# - alter code so that DROP percentages would calculate only about once a minute no matter he loop delay
# 60828-1149 - add field for target dial_level difference, -1 would target one agent waiting, +1 would target 1 customer waiting
# 60919-1243 - changed variables to use arrays for all campaign-specific values
# 61215-1110 - added answered calls stats and use drops as percentage of answered for today
#
# constants
@@ -608,18 +609,24 @@ sub calculate_drops
{
$RESETdrop_count_updater++;
$VCScalls_today[$i]=0;
$VCSanswers_today[$i]=0;
$VCSdrops_today[$i]=0;
$VCSdrops_today_pct[$i]=0;
$VCSdrops_answers_today_pct[$i]=0;
$VCScalls_hour[$i]=0;
$VCSanswers_hour[$i]=0;
$VCSdrops_hour[$i]=0;
$VCSdrops_hour_pct[$i]=0;
$VCScalls_halfhour[$i]=0;
$VCSanswers_halfhour[$i]=0;
$VCSdrops_halfhour[$i]=0;
$VCSdrops_halfhour_pct[$i]=0;
$VCScalls_five[$i]=0;
$VCSanswers_five[$i]=0;
$VCSdrops_five[$i]=0;
$VCSdrops_five_pct[$i]=0;
$VCScalls_one[$i]=0;
$VCSanswers_one[$i]=0;
$VCSdrops_one[$i]=0;
$VCSdrops_one_pct[$i]=0;
@@ -638,6 +645,20 @@ while ($sthArows > $rec_count)
$sthA->finish();
if ($VCScalls_one[$i] > 0)
{
# LAST MINUTE ANSWERS
$stmtA = "SELECT count(*) from $vicidial_log where campaign_id='$campaign_id[$i]' and call_date > '$VDL_one' and status NOT IN('NA','B');";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
$rec_count=0;
while ($sthArows > $rec_count)
{
@aryA = $sthA->fetchrow_array;
$VCSanswers_one[$i] = "$aryA[0]";
$rec_count++;
}
$sthA->finish();
# LAST MINUTE DROPS
$stmtA = "SELECT count(*) from $vicidial_log where campaign_id='$campaign_id[$i]' and call_date > '$VDL_one' and status IN('DROP','XDROP');";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
@@ -672,6 +693,20 @@ while ($sthArows > $rec_count)
$sthA->finish();
if ($VCScalls_today[$i] > 0)
{
# TODAY ANSWERS
$stmtA = "SELECT count(*) from $vicidial_log where campaign_id='$campaign_id[$i]' and call_date > '$VDL_date' and status NOT IN('NA','B');";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
$rec_count=0;
while ($sthArows > $rec_count)
{
@aryA = $sthA->fetchrow_array;
$VCSanswers_today[$i] = "$aryA[0]";
$rec_count++;
}
$sthA->finish();
# TODAY DROPS
$stmtA = "SELECT count(*) from $vicidial_log where campaign_id='$campaign_id[$i]' and call_date > '$VDL_date' and status IN('DROP','XDROP');";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
@@ -684,7 +719,10 @@ if ($VCScalls_today[$i] > 0)
if ($VCSdrops_today[$i] > 0)
{
$VCSdrops_today_pct[$i] = ( ($VCSdrops_today[$i] / $VCScalls_today[$i]) * 100 );
$VCSdrops_today_pct[$i] = sprintf("%.2f", $VCSdrops_today_pct[$i]);
$VCSdrops_today_pct[$i] = sprintf("%.2f", $VCSdrops_today_pct[$i]);
if ($VCSanswers_today[$i] < 1) {$VCSanswers_today[$i] = 1;}
$VCSdrops_answers_today_pct[$i] = ( ($VCSdrops_today[$i] / $VCSanswers_today[$i]) * 100 );
$VCSdrops_answers_today_pct[$i] = sprintf("%.2f", $VCSdrops_answers_today_pct[$i]);
}
$rec_count++;
}
@@ -706,6 +744,20 @@ while ($sthArows > $rec_count)
$sthA->finish();
if ($VCScalls_hour[$i] > 0)
{
# ANSWERS LAST HOUR
$stmtA = "SELECT count(*) from $vicidial_log where campaign_id='$campaign_id[$i]' and call_date > '$VDL_hour' and status NOT IN('NA','B');";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
$rec_count=0;
while ($sthArows > $rec_count)
{
@aryA = $sthA->fetchrow_array;
$VCSanswers_hour[$i] = "$aryA[0]";
$rec_count++;
}
$sthA->finish();
# DROP LAST HOUR
$stmtA = "SELECT count(*) from $vicidial_log where campaign_id='$campaign_id[$i]' and call_date > '$VDL_hour' and status IN('DROP','XDROP');";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
@@ -740,6 +792,20 @@ while ($sthArows > $rec_count)
$sthA->finish();
if ($VCScalls_halfhour[$i] > 0)
{
# ANSWERS HALFHOUR
$stmtA = "SELECT count(*) from $vicidial_log where campaign_id='$campaign_id[$i]' and call_date > '$VDL_halfhour' and status NOT IN('NA','B');";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
$rec_count=0;
while ($sthArows > $rec_count)
{
@aryA = $sthA->fetchrow_array;
$VCSanswers_halfhour[$i] = "$aryA[0]";
$rec_count++;
}
$sthA->finish();
# DROPS HALFHOUR
$stmtA = "SELECT count(*) from $vicidial_log where campaign_id='$campaign_id[$i]' and call_date > '$VDL_halfhour' and status IN('DROP','XDROP');";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
@@ -774,6 +840,20 @@ while ($sthArows > $rec_count)
$sthA->finish();
if ($VCScalls_five[$i] > 0)
{
# ANSWERS FIVEMINUTE
$stmtA = "SELECT count(*) from $vicidial_log where campaign_id='$campaign_id[$i]' and call_date > '$VDL_five' and status NOT IN('NA','B');";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
$rec_count=0;
while ($sthArows > $rec_count)
{
@aryA = $sthA->fetchrow_array;
$VCSanswers_five[$i] = "$aryA[0]";
$rec_count++;
}
$sthA->finish();
# DROPS FIVEMINUTE
$stmtA = "SELECT count(*) from $vicidial_log where campaign_id='$campaign_id[$i]' and call_date > '$VDL_five' and status IN('DROP','XDROP');";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
@@ -840,7 +920,7 @@ $VCSagents_active[$i] = ($VCSINCALL[$i] + $VCSREADY[$i] + $VCSCLOSER[$i]);
if ($campaign_id[$i] =~ /CLOSER/)
{
# GET AVERAGES FROM THIS CAMPAIGN
$stmtA = "SELECT differential_onemin[$i],agents_average_onemin[$i] from vicidial_campaign_stats where campaign_id='$campaign_id[$i]';";
$stmtA = "SELECT differential_onemin,agents_average_onemin from vicidial_campaign_stats where campaign_id='$campaign_id[$i]';";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
@@ -861,7 +941,7 @@ else
}
## UPDATE STATS FOR CAMPAIGN
$stmtA = "UPDATE vicidial_campaign_stats SET calls_today='$VCScalls_today[$i]',drops_today='$VCSdrops_today[$i]',drops_today_pct='$VCSdrops_today_pct[$i]',calls_hour='$VCScalls_hour[$i]',drops_hour='$VCSdrops_hour[$i]',drops_hour_pct='$VCSdrops_hour_pct[$i]',calls_halfhour='$VCScalls_halfhour[$i]',drops_halfhour='$VCSdrops_halfhour[$i]',drops_halfhour_pct='$VCSdrops_halfhour_pct[$i]',calls_fivemin='$VCScalls_five[$i]',drops_fivemin='$VCSdrops_five[$i]',drops_fivemin_pct='$VCSdrops_five_pct[$i]',calls_onemin='$VCScalls_one[$i]',drops_onemin='$VCSdrops_one[$i]',drops_onemin_pct='$VCSdrops_one_pct[$i]' where campaign_id='$campaign_id[$i]';";
$stmtA = "UPDATE vicidial_campaign_stats SET calls_today='$VCScalls_today[$i]',answers_today='$VCSanswers_today[$i]',drops_today='$VCSdrops_today[$i]',drops_today_pct='$VCSdrops_today_pct[$i]',drops_answers_today_pct='$VCSdrops_answers_today_pct[$i]',calls_hour='$VCScalls_hour[$i]',answers_hour='$VCSanswers_hour[$i]',drops_hour='$VCSdrops_hour[$i]',drops_hour_pct='$VCSdrops_hour_pct[$i]',calls_halfhour='$VCScalls_halfhour[$i]',answers_halfhour='$VCSanswers_halfhour[$i]',drops_halfhour='$VCSdrops_halfhour[$i]',drops_halfhour_pct='$VCSdrops_halfhour_pct[$i]',calls_fivemin='$VCScalls_five[$i]',answers_fivemin='$VCSanswers_five[$i]',drops_fivemin='$VCSdrops_five[$i]',drops_fivemin_pct='$VCSdrops_five_pct[$i]',calls_onemin='$VCScalls_one[$i]',answers_onemin='$VCSanswers_one[$i]',drops_onemin='$VCSdrops_one[$i]',drops_onemin_pct='$VCSdrops_one_pct[$i]' where campaign_id='$campaign_id[$i]';";
$affected_rows = $dbhA->do($stmtA);
if ($DBX) {print "$campaign_id[$i]|$stmtA|\n";}
@@ -936,10 +1016,11 @@ if ( ($dial_method[$i] =~ /ADAPT_HARD_LIMIT|ADAPT_AVERAGE|ADAPT_TAPERED/) || ($f
}
$adaptive_string .= "DROP STATS-\n";
$adaptive_string .= " TODAY DROPS: $VCScalls_today[$i] $VCSdrops_today[$i] $VCSdrops_today_pct[$i]%\n";
$adaptive_string .= " ONE HOUR DROPS: $VCScalls_hour[$i] $VCSdrops_hour[$i] $VCSdrops_hour_pct[$i]%\n";
$adaptive_string .= " HALF HOUR DROPS: $VCScalls_halfhour[$i] $VCSdrops_halfhour[$i] $VCSdrops_halfhour_pct[$i]%\n";
$adaptive_string .= " FIVE MIN DROPS: $VCScalls_five[$i] $VCSdrops_five[$i] $VCSdrops_five_pct[$i]%\n";
$adaptive_string .= " ONE MIN DROPS: $VCScalls_one[$i] $VCSdrops_one[$i] $VCSdrops_one_pct[$i]%\n";
$adaptive_string .= " ANSWER DROPS: $VCSanswers_today[$i] $VCSdrops_answers_today_pct[$i]%\n";
$adaptive_string .= " ONE HOUR DROPS: $VCScalls_hour[$i]/$VCSanswers_hour[$i] $VCSdrops_hour[$i] $VCSdrops_hour_pct[$i]%\n";
$adaptive_string .= " HALF HOUR DROPS: $VCScalls_halfhour[$i]/$VCSanswers_halfhour[$i] $VCSdrops_halfhour[$i] $VCSdrops_halfhour_pct[$i]%\n";
$adaptive_string .= " FIVE MIN DROPS: $VCScalls_five[$i]/$VCSanswers_five[$i] $VCSdrops_five[$i] $VCSdrops_five_pct[$i]%\n";
$adaptive_string .= " ONE MIN DROPS: $VCScalls_one[$i]/$VCSanswers_one[$i] $VCSdrops_one[$i] $VCSdrops_one_pct[$i]%\n";
### DROP PERCENTAGE RULES TO LOWER DIAL_LEVEL ###
if ( ($VCScalls_one[$i] > 20) && ($VCSdrops_one_pct[$i] > 50) )
@@ -947,7 +1028,7 @@ if ( ($dial_method[$i] =~ /ADAPT_HARD_LIMIT|ADAPT_AVERAGE|ADAPT_TAPERED/) || ($f
$intensity_dial_level[$i] = ($intensity_dial_level[$i] / 2);
$adaptive_string .= " DROP RATE OVER 50% FOR LAST MINUTE! CUTTING DIAL LEVEL TO: $intensity_dial_level[$i]\n";
}
if ( ($VCScalls_today[$i] > 50) && ($VCSdrops_today_pct[$i] > $adaptive_dropped_percentage[$i]) )
if ( ($VCScalls_today[$i] > 50) && ($VCSdrops_answers_today_pct[$i] > $adaptive_dropped_percentage[$i]) )
{
if ($dial_method[$i] =~ /ADAPT_HARD_LIMIT/)
{
@@ -754,18 +754,24 @@ campaign_id VARCHAR(20) PRIMARY KEY NOT NULL,
update_time TIMESTAMP,
dialable_leads INT(9) UNSIGNED default '0',
calls_today INT(9) UNSIGNED default '0',
answers_today INT(9) UNSIGNED default '0',
drops_today INT(9) UNSIGNED default '0',
drops_today_pct VARCHAR(6) default '0',
drops_answers_today_pct VARCHAR(6) default '0',
calls_hour INT(9) UNSIGNED default '0',
answers_hour INT(9) UNSIGNED default '0',
drops_hour INT(9) UNSIGNED default '0',
drops_hour_pct VARCHAR(6) default '0',
calls_halfhour INT(9) UNSIGNED default '0',
answers_halfhour INT(9) UNSIGNED default '0',
drops_halfhour INT(9) UNSIGNED default '0',
drops_halfhour_pct VARCHAR(6) default '0',
calls_fivemin INT(9) UNSIGNED default '0',
answers_fivemin INT(9) UNSIGNED default '0',
drops_fivemin INT(9) UNSIGNED default '0',
drops_fivemin_pct VARCHAR(6) default '0',
calls_onemin INT(9) UNSIGNED default '0',
answers_onemin INT(9) UNSIGNED default '0',
drops_onemin INT(9) UNSIGNED default '0',
drops_onemin_pct VARCHAR(6) default '0',
differential_onemin VARCHAR(20) default '0',
+7
View File
@@ -50,3 +50,10 @@ ALTER TABLE recording_log ADD lead_id INT(9) UNSIGNED;
ALTER TABLE recording_log ADD index (lead_id);
ALTER TABLE recording_log ADD user VARCHAR(20);
ALTER TABLE recording_log ADD index (user);
ALTER TABLE vicidial_campaign_stats ADD answers_today INT(9) UNSIGNED default '0' AFTER calls_today;
ALTER TABLE vicidial_campaign_stats ADD drops_answers_today_pct VARCHAR(6) default '0' AFTER drops_today_pct;
ALTER TABLE vicidial_campaign_stats ADD answers_hour INT(9) UNSIGNED default '0' AFTER calls_hour;
ALTER TABLE vicidial_campaign_stats ADD answers_halfhour INT(9) UNSIGNED default '0' AFTER calls_halfhour;
ALTER TABLE vicidial_campaign_stats ADD answers_fivemin INT(9) UNSIGNED default '0' AFTER calls_fivemin;
ALTER TABLE vicidial_campaign_stats ADD answers_onemin INT(9) UNSIGNED default '0' AFTER calls_onemin;
+29 -11
View File
@@ -7,6 +7,7 @@
#
# 60619-1718 - Added variable filtering to eliminate SQL injection attack threat
# - Added required user/pass to gain access to this page
# 61215-1139 - Added drop percentage of answered and round-2 decimal
#
header ("Content-type: text/html; charset=utf-8");
@@ -119,7 +120,7 @@ if ( ($row[0] < 1) or ($row[1] < 1) )
else
{
$average_hold_seconds = ($row[1] / $row[0]);
$average_hold_seconds = round($average_hold_seconds, 0);
$average_hold_seconds = round($average_hold_seconds, 2);
$average_hold_seconds = sprintf("%10s", $average_hold_seconds);
}
echo "Total Calls placed from this Campaign: $TOTALcalls\n";
@@ -132,32 +133,49 @@ $stmt="select count(*),sum(length_in_sec) from vicidial_log where call_date >= '
$rslt=mysql_query($stmt, $link);
if ($DB) {echo "$stmt\n";}
$row=mysql_fetch_row($rslt);
$DROPcalls = sprintf("%10s", $row[0]);
$DROPcallsRAW = $row[0];
$DROPseconds = $row[1];
$stmt="select count(*) from vicidial_log where call_date >= '$query_date 00:00:01' and call_date <= '$query_date 23:59:59' and campaign_id='" . mysql_real_escape_string($group) . "' and status NOT IN('NA','B');";
$rslt=mysql_query($stmt, $link);
if ($DB) {echo "$stmt\n";}
$row=mysql_fetch_row($rslt);
$ANSWERcalls = $row[0];
if ( ($DROPcalls < 1) or ($TOTALcalls < 1) )
{$DROPpercent = '0';}
else
{
$DROPpercent = (($DROPcalls / $TOTALcalls) * 100);
$DROPpercent = round($DROPpercent, 0);
$DROPpercent = (($DROPcallsRAW / $TOTALcalls) * 100);
$DROPpercent = round($DROPpercent, 2);
}
if ( ($row[0] < 1) or ($row[1] < 1) )
if ( ($DROPcalls < 1) or ($ANSWERcalls < 1) )
{$DROPANSWERpercent = '0';}
else
{
$DROPANSWERpercent = (($DROPcallsRAW / $ANSWERcalls) * 100);
$DROPANSWERpercent = round($DROPANSWERpercent, 2);
}
if ( ($DROPseconds < 1) or ($DROPcallsRAW < 1) )
{$average_hold_seconds = ' 0';}
else
{
$average_hold_seconds = ($row[1] / $row[0]);
$average_hold_seconds = round($average_hold_seconds, 0);
$average_hold_seconds = ($DROPseconds / $DROPcallsRAW);
$average_hold_seconds = round($average_hold_seconds, 2);
$average_hold_seconds = sprintf("%10s", $average_hold_seconds);
}
echo "Total DROP Calls: $DROPcalls $DROPpercent%\n";
echo "Percent of DROP Calls taken out of Answers: $DROPcalls / $ANSWERcalls $DROPANSWERpercent%\n";
echo "Average Length for DROP Calls in seconds: $average_hold_seconds\n";
echo "\n";
echo "---------- AUTO-DIAL NO ANSWERS\n";
$stmt="select count(*),sum(length_in_sec) from vicidial_log where call_date >= '$query_date 00:00:01' and call_date <= '$query_date 23:59:59' and campaign_id='" . mysql_real_escape_string($group) . "' and status='NA' and (length_in_sec <= 60 or length_in_sec is null);";
$stmt="select count(*),sum(length_in_sec) from vicidial_log where call_date >= '$query_date 00:00:01' and call_date <= '$query_date 23:59:59' and campaign_id='" . mysql_real_escape_string($group) . "' and status IN('NA','B') and (length_in_sec <= 60 or length_in_sec is null);";
$rslt=mysql_query($stmt, $link);
if ($DB) {echo "$stmt\n";}
$row=mysql_fetch_row($rslt);
@@ -168,7 +186,7 @@ if ( ($NAcalls < 1) or ($TOTALcalls < 1) )
else
{
$NApercent = (($NAcalls / $TOTALcalls) * 100);
$NApercent = round($NApercent, 0);
$NApercent = round($NApercent, 2);
}
if ( ($row[0] < 1) or ($row[1] < 1) )
@@ -176,11 +194,11 @@ if ( ($row[0] < 1) or ($row[1] < 1) )
else
{
$average_na_seconds = ($row[1] / $row[0]);
$average_na_seconds = round($average_na_seconds, 0);
$average_na_seconds = round($average_na_seconds, 2);
$average_na_seconds = sprintf("%10s", $average_na_seconds);
}
echo "Total NA calls -Busy,Disconnect,BTvoicemail: $NAcalls $NApercent%\n";
echo "Total NA calls -Busy,Disconnect,RingNoAnswer: $NAcalls $NApercent%\n";
echo "Average Call Length for NA Calls in seconds: $average_na_seconds\n";
@@ -22,6 +22,7 @@
# 61101-1318 - Added SIP and IAX Listen and Barge links option
# 61101-1647 - Added Usergroup column and user name option as well as sorting
# 61102-1155 - made display of columns more modular, added ability to hide server info
# 61215-1131 - added answered calls and drop percent taken from answered calls
#
header ("Content-type: text/html; charset=utf-8");
@@ -284,10 +285,10 @@ $rslt=mysql_query($stmt, $link);
$row=mysql_fetch_row($rslt);
$VDhop = $row[0];
$stmt="select dialable_leads,calls_today,drops_today,drops_today_pct,differential_onemin,agents_average_onemin,balance_trunk_fill from vicidial_campaign_stats where campaign_id='" . mysql_real_escape_string($group) . "';";
$stmt="select dialable_leads,calls_today,drops_today,drops_answers_today_pct,differential_onemin,agents_average_onemin,balance_trunk_fill,answers_today from vicidial_campaign_stats where campaign_id='" . mysql_real_escape_string($group) . "';";
if ($group=='XXXX-ALL-ACTIVE-XXXX')
{
$stmt="select sum(dialable_leads),sum(calls_today),sum(drops_today),avg(drops_today_pct),avg(differential_onemin),avg(agents_average_onemin),sum(balance_trunk_fill) from vicidial_campaign_stats;";
$stmt="select sum(dialable_leads),sum(calls_today),sum(drops_today),avg(drops_answers_today_pct),avg(differential_onemin),avg(agents_average_onemin),sum(balance_trunk_fill),sum(answers_today) from vicidial_campaign_stats;";
}
$rslt=mysql_query($stmt, $link);
$row=mysql_fetch_row($rslt);
@@ -298,6 +299,7 @@ $drpctTODAY = $row[3];
$diffONEMIN = $row[4];
$agentsONEMIN = $row[5];
$balanceFILL = $row[6];
$answersTODAY = $row[7];
if ( ($diffONEMIN != 0) and ($agentsONEMIN > 0) )
{
$diffpctONEMIN = ( ($diffONEMIN / $agentsONEMIN) * 100);
@@ -348,7 +350,7 @@ echo "</TR>";
echo "<TR>";
echo "<TD ALIGN=RIGHT><font size=2><B>HOPPER LEVEL:</B></TD><TD ALIGN=LEFT><font size=2>&nbsp; $HOPlev &nbsp; &nbsp; </TD>";
echo "<TD ALIGN=RIGHT><font size=2><B>CALLS DROPPED:</B></TD><TD ALIGN=LEFT><font size=2>&nbsp; $dropsTODAY &nbsp; &nbsp; </TD>";
echo "<TD ALIGN=RIGHT><font size=2><B>DROPPED / ANSWERED:</B></TD><TD ALIGN=LEFT><font size=2>&nbsp; $dropsTODAY / $answersTODAY &nbsp; </TD>";
echo "<TD ALIGN=RIGHT><font size=2><B>DL DIFF:</B></TD><TD ALIGN=LEFT><font size=2>&nbsp; $diffONEMIN &nbsp; &nbsp; </TD>";
echo "<TD ALIGN=RIGHT><font size=2><B>STATUSES:</B></TD><TD ALIGN=LEFT><font size=2>&nbsp; $DIALstatusA, $DIALstatusB, $DIALstatusC, $DIALstatusD, $DIALstatusE &nbsp; &nbsp; </TD>";
echo "</TR>";
@@ -9,6 +9,7 @@
#
# changes:
# 61102-1616 - first build
# 61215-1131 - added answered calls and drop percent taken from answered calls
#
header ("Content-type: text/html; charset=utf-8");
@@ -155,7 +156,7 @@ $rslt=mysql_query($stmt, $link);
$row=mysql_fetch_row($rslt);
$VDhop = $row[0];
$stmt="select dialable_leads,calls_today,drops_today,drops_today_pct,differential_onemin,agents_average_onemin,balance_trunk_fill from vicidial_campaign_stats where campaign_id='" . mysql_real_escape_string($group) . "';";
$stmt="select dialable_leads,calls_today,drops_today,drops_answers_today_pct,differential_onemin,agents_average_onemin,balance_trunk_fill,answers_today from vicidial_campaign_stats where campaign_id='" . mysql_real_escape_string($group) . "';";
$rslt=mysql_query($stmt, $link);
$row=mysql_fetch_row($rslt);
$DAleads = $row[0];
@@ -165,6 +166,7 @@ $drpctTODAY = $row[3];
$diffONEMIN = $row[4];
$agentsONEMIN = $row[5];
$balanceFILL = $row[6];
$answersTODAY = $row[7];
if ( ($diffONEMIN != 0) and ($agentsONEMIN > 0) )
{
$diffpctONEMIN = ( ($diffONEMIN / $agentsONEMIN) * 100);
@@ -211,7 +213,7 @@ echo "</TR>";
echo "<TR>";
echo "<TD ALIGN=RIGHT><font size=2><B>HOPPER LEVEL:</B></TD><TD ALIGN=LEFT><font size=2>&nbsp; $HOPlev &nbsp; &nbsp; </TD>";
echo "<TD ALIGN=RIGHT><font size=2><B>CALLS DROPPED:</B></TD><TD ALIGN=LEFT><font size=2>&nbsp; $dropsTODAY &nbsp; &nbsp; </TD>";
echo "<TD ALIGN=RIGHT><font size=2><B>DROPPED / ANSWERED:</B></TD><TD ALIGN=LEFT><font size=2>&nbsp; $dropsTODAY / $answersTODAY &nbsp; </TD>";
echo "<TD ALIGN=RIGHT><font size=2><B>DL DIFF:</B></TD><TD ALIGN=LEFT><font size=2>&nbsp; $diffONEMIN &nbsp; &nbsp; </TD>";
echo "<TD ALIGN=RIGHT><font size=2><B>STATUSES:</B></TD><TD ALIGN=LEFT><font size=2>&nbsp; $DIALstatusA, $DIALstatusB, $DIALstatusC, $DIALstatusD, $DIALstatusE &nbsp; &nbsp; </TD>";
echo "</TR>";