From d9de5eea48a212b410140fdb57bc8b962dee332f Mon Sep 17 00:00:00 2001 From: mattf Date: Sun, 28 Feb 2016 00:45:18 +0000 Subject: [PATCH] Added option to show in-group color in real-time report agent records Rewrote Fronter/Closer report Updated reports to reformat the forms in a more unified format Added Help entries for most reports git-svn-id: svn://192.168.202.10@2482 3d104415-ff17-0410-8863-d5cf3c621b8a --- www/vicidial/AST_CLOSER_service_level.php | 15 +- www/vicidial/AST_CLOSERstats.php | 15 +- www/vicidial/AST_CLOSERstats_v2.php | 15 +- www/vicidial/AST_CLOSERsummary_hourly.php | 15 +- www/vicidial/AST_DIDstats.php | 15 +- www/vicidial/AST_IVRfilter.php | 15 +- www/vicidial/AST_IVRstats.php | 15 +- www/vicidial/AST_LISTS_campaign_stats.php | 15 +- www/vicidial/AST_LISTS_pass_report.php | 16 +- www/vicidial/AST_LISTS_stats.php | 17 +- www/vicidial/AST_OUTBOUNDsummary_interval.php | 15 +- www/vicidial/AST_VDADstats.php | 18 +- www/vicidial/AST_agent_days_detail.php | 10 +- www/vicidial/AST_agent_timeclock_detail.php | 250 ++++++++-------- .../AST_campaign_status_list_report.php | 15 +- www/vicidial/AST_dialer_inventory_report.php | 15 +- www/vicidial/AST_email_log_report.php | 19 +- www/vicidial/AST_inbound_daily_report.php | 22 +- www/vicidial/AST_timeonVDADall.php | 69 +++-- .../called_counts_multilist_report.php | 21 +- www/vicidial/fcstats.php | 264 +++++------------ www/vicidial/help.php | 269 ++++++++++++++++++ www/vicidial/realtime_report.php | 29 +- 23 files changed, 752 insertions(+), 417 deletions(-) diff --git a/www/vicidial/AST_CLOSER_service_level.php b/www/vicidial/AST_CLOSER_service_level.php index 98ff58f9..588b5fc9 100644 --- a/www/vicidial/AST_CLOSER_service_level.php +++ b/www/vicidial/AST_CLOSER_service_level.php @@ -1,7 +1,7 @@ LICENSE: AGPLv2 +# Copyright (C) 2016 Matt Florell LICENSE: AGPLv2 # # CHANGES # @@ -31,6 +31,7 @@ # 141230-0923 - Added code for on-the-fly language translations display # 150516-1258 - Fixed Javascript element problem, Issue #857 # 151125-1627 - Added search archive option +# 160227-1153 - Uniform form format # $startMS = microtime(); @@ -290,6 +291,9 @@ while ($i < $groups_to_print) $i++; } +$NWB = "   \"HELP\""; + $HEADER.="\n"; $HEADER.="\n"; $HEADER.="\n"; if ($report_type=='LIST') {$onload="onload=\"ToggleSpan('list_span', 'campaign_span')\"";} $HTML_header.="\n"; $HEADER.="\n"; $HEADER.="\n"; $HEADER.="\n"; - +$MAIN.="\n"; $MAIN.="\n"; -$MAIN.=""._QXZ("Show hourly results")."
"._QXZ("Show disposition statuses")."
"._QXZ("Ignore after-hours calls"); +$MAIN.=""._QXZ("Show hourly results")."
"._QXZ("Show disposition statuses")."
"._QXZ("Ignore after-hours calls"); if ($archives_available=="Y") { $MAIN.="
"._QXZ("Search archived data")."\n"; } -$MAIN.="
"._QXZ("DOWNLOAD")." | "._QXZ("MODIFY")." | "._QXZ("REPORTS")."\n"; +$MAIN.="
"._QXZ("DOWNLOAD")." | "._QXZ("MODIFY")." | "._QXZ("REPORTS")."\n"; +$MAIN.="\n"; $MAIN.=""; $MAIN.="
\n\n";
 
diff --git a/www/vicidial/AST_timeonVDADall.php b/www/vicidial/AST_timeonVDADall.php
index 77860f59..526593ca 100644
--- a/www/vicidial/AST_timeonVDADall.php
+++ b/www/vicidial/AST_timeonVDADall.php
@@ -96,10 +96,11 @@
 # 150919-0238 - Added display for chats in queue
 # 150925-2223 - Added User option to hide users from real-time report
 # 160104-1059 - Added detection of dead chat sessions
+# 160227-1031 - Added INGROUPcolorOVERRIDE option
 #
 
-$version = '2.12-84';
-$build = '160104-1059';
+$version = '2.12-85';
+$build = '160227-1031';
 
 header ("Content-type: text/html; charset=utf-8");
 
@@ -165,6 +166,8 @@ if (isset($_GET["PRESETstats"]))			{$PRESETstats=$_GET["PRESETstats"];}
 	elseif (isset($_POST["PRESETstats"]))	{$PRESETstats=$_POST["PRESETstats"];}
 if (isset($_GET["AGENTtimeSTATS"]))				{$AGENTtimeSTATS=$_GET["AGENTtimeSTATS"];}
 	elseif (isset($_POST["AGENTtimeSTATS"]))	{$AGENTtimeSTATS=$_POST["AGENTtimeSTATS"];}
+if (isset($_GET["INGROUPcolorOVERRIDE"]))			{$INGROUPcolorOVERRIDE=$_GET["INGROUPcolorOVERRIDE"];}
+	elseif (isset($_POST["INGROUPcolorOVERRIDE"]))	{$INGROUPcolorOVERRIDE=$_POST["INGROUPcolorOVERRIDE"];}
 if (isset($_GET["RTajax"]))				{$RTajax=$_GET["RTajax"];}
 	elseif (isset($_POST["RTajax"]))	{$RTajax=$_POST["RTajax"];}
 if (isset($_GET["RTuser"]))				{$RTuser=$_GET["RTuser"];}
@@ -1084,7 +1087,7 @@ else
 	\n";
 
 	echo "\n";
-	echo"\n";
+	echo"\n";
 	echo "$report_name: $group\n";
 
 		$short_header=1;
@@ -1125,6 +1128,7 @@ if ($RTajax < 1)
 	echo "\n";
 	echo "\n";
 	echo "\n";
+	echo "\n";
 	echo "\n";
 	echo _QXZ("$report_name")."                                                                               \n";
 	echo "\n";
@@ -1135,9 +1139,9 @@ if ($RTajax < 1)
 	echo "\n";
 	echo "   ";
 	echo "\n";
-	echo ""._QXZ("STOP")." | ";
-	echo ""._QXZ("SLOW")." | ";
-	echo ""._QXZ("GO")."";
+	echo ""._QXZ("STOP")." | ";
+	echo ""._QXZ("SLOW")." | ";
+	echo ""._QXZ("GO")."";
 	if (preg_match('/ALL\-ACTIVE/i',$group_string))
 		{
 		echo "       "._QXZ("MODIFY")." | \n";
@@ -1912,60 +1916,60 @@ if ($RTajax < 1)
 	{
 	if ($adastats<2)
 		{
-		echo "+ "._QXZ("VIEW MORE")."";
+		echo "+ "._QXZ("VIEW MORE")."";
 		}
 	else
 		{
-		echo "- "._QXZ("VIEW LESS")."";
+		echo "- "._QXZ("VIEW LESS")."";
 		}
 	if ($UGdisplay>0)
 		{
-		echo "       "._QXZ("HIDE USER GROUP")."";
+		echo "       "._QXZ("HIDE USER GROUP")."";
 		}
 	else
 		{
-		echo "       "._QXZ("VIEW USER GROUP")."";
+		echo "       "._QXZ("VIEW USER GROUP")."";
 		}
 	if ($SERVdisplay>0)
 		{
-		echo "       "._QXZ("HIDE SERVER INFO")."";
+		echo "       "._QXZ("HIDE SERVER INFO")."";
 		}
 	else
 		{
-		echo "       "._QXZ("SHOW SERVER INFO")."";
+		echo "       "._QXZ("SHOW SERVER INFO")."";
 		}
 	if ($CALLSdisplay>0)
 		{
-		echo "       "._QXZ("HIDE WAITING CALLS")."";
+		echo "       "._QXZ("HIDE WAITING CALLS")."";
 		}
 	else
 		{
-		echo "       "._QXZ("SHOW WAITING CALLS")."";
+		echo "       "._QXZ("SHOW WAITING CALLS")."";
 		}
 
 	if ($ALLINGROUPstats>0)
 		{
-		echo "       "._QXZ("HIDE IN-GROUP STATS")."";
+		echo "       "._QXZ("HIDE IN-GROUP STATS")."";
 		}
 	else
 		{
-		echo "       "._QXZ("SHOW IN-GROUP STATS")."";
+		echo "       "._QXZ("SHOW IN-GROUP STATS")."";
 		}
 	if ($PHONEdisplay>0)
 		{
-		echo "       "._QXZ("HIDE PHONES")."";
+		echo "       "._QXZ("HIDE PHONES")."";
 		}
 	else
 		{
-		echo "       "._QXZ("SHOW PHONES")."";
+		echo "       "._QXZ("SHOW PHONES")."";
 		}
 	if ($CUSTPHONEdisplay>0)
 		{
-		echo "       "._QXZ("HIDE CUSTPHONES")."";
+		echo "       "._QXZ("HIDE CUSTPHONES")."";
 		}
 	else
 		{
-		echo "       "._QXZ("SHOW CUSTPHONES")."";
+		echo "       "._QXZ("SHOW CUSTPHONES")."";
 		}
 	}
 
@@ -2302,13 +2306,13 @@ $HTbegin =			"|";
 $HDstation =		"----------------+";
 $HTstation =		" "._QXZ("STATION", 14)." |";
 $HDphone =		"-------------+";
-$HTphone =		" "._QXZ("PHONE",11)." |";
+$HTphone =		" "._QXZ("PHONE",11)." |";
 if ($RTajax > 0)
 	{$HTphone =		" "._QXZ("PHONE",11)."       |";}
 $HDuser =			"------------------------+";
 
 
-$HTuser =			" "._QXZ("USER",5)." ";
+$HTuser =			" "._QXZ("USER",5)." ";
 if ($RTajax > 0)
 	{$HTuser =	" "._QXZ("USER",5)." ";}
 if ($UidORname>0)
@@ -2317,7 +2321,7 @@ if ($UidORname>0)
 		{$HTuser .=	""._QXZ("SHOW ID",8)." ";}
 	else
 		{
-		$HTuser .= ""._QXZ("SHOW ID",8)." ";
+		$HTuser .= ""._QXZ("SHOW ID",8)." ";
 		}
 	}
 else
@@ -2326,7 +2330,7 @@ else
 		{$HTuser .=	""._QXZ("SHOW NAME",9)."";}
 	else
 		{
-		$HTuser .= ""._QXZ("SHOW NAME",9)."";
+		$HTuser .= ""._QXZ("SHOW NAME",9)."";
 		}
 	}
 
@@ -2334,7 +2338,7 @@ $HTuser .= " "._QXZ("INFO",6)." |";
 
 
 $HDusergroup =		"--------------+";
-$HTusergroup =		" "._QXZ("USER GROUP",12)." |";
+$HTusergroup =		" "._QXZ("USER GROUP",12)." |";
 if ($RTajax > 0)
 	{$HTusergroup =	" "._QXZ("USER GROUP",12)." |";}
 $HDsessionid =		"------------------+";
@@ -2352,11 +2356,11 @@ $HTserver_ip =		" "._QXZ("SERVER IP",15)." |";
 $HDcall_server_ip =	"-----------------+";
 $HTcall_server_ip =	" "._QXZ("CALL SERVER IP",15)." |";
 $HDtime =			"---------+";
-$HTtime =			" MM:SS   |";
+$HTtime =			" MM:SS   |";
 if ($RTajax > 0)
 	{$HTtime =	" MM:SS   |";}
 $HDcampaign =		"------------+";
-$HTcampaign =		" "._QXZ("CAMPAIGN",10)." |";
+$HTcampaign =		" "._QXZ("CAMPAIGN",10)." |";
 if ($RTajax > 0)
 	{$HTcampaign =	" "._QXZ("CAMPAIGN",10)." |";}
 $HDcalls =			"-------+";
@@ -2901,9 +2905,10 @@ $talking_to_print = mysqli_num_rows($rslt);
 		$INGRP='';
 		if ($CM == 'I') 
 			{
-			$stmt="SELECT vac.campaign_id,vac.stage,vig.group_name from vicidial_auto_calls vac,vicidial_inbound_groups vig where vac.callerid='$Acallerid[$i]' and vac.campaign_id=vig.group_id LIMIT 1;";
+			$stmt="SELECT vac.campaign_id,vac.stage,vig.group_name,vig.group_id from vicidial_auto_calls vac,vicidial_inbound_groups vig where vac.callerid='$Acallerid[$i]' and vac.campaign_id=vig.group_id LIMIT 1;";
 			$rslt=mysql_to_mysqli($stmt, $link);
 			if ($DB) {echo "$stmt\n";}
+			$ING=$G; $INEG=$EG;
 			$ingrp_to_print = mysqli_num_rows($rslt);
 				if ($ingrp_to_print > 0)
 				{
@@ -2911,9 +2916,13 @@ $talking_to_print = mysqli_num_rows($rslt);
 				$vac_campaign =	sprintf("%-20s", "$row[0] - $row[2]");
 				$row[1] = preg_replace('/.*\-/i', '',$row[1]);
 				$vac_stage =	sprintf("%-4s", $row[1]);
+				
+				if ( ($INGROUPcolorOVERRIDE>0) or ($INGROUPcolorOVERRIDE=='YES') )
+					{
+					$ING=''; $INEG='';
+					}
 				}
-
-			$INGRP = " $G$vac_stage$EG | $G$vac_campaign$EG ";
+			$INGRP = " $ING$vac_stage$INEG | $ING$vac_campaign$INEG ";
 			}
 
 		$agentcount++;
diff --git a/www/vicidial/called_counts_multilist_report.php b/www/vicidial/called_counts_multilist_report.php
index 1aeb4a13..5c9ced69 100644
--- a/www/vicidial/called_counts_multilist_report.php
+++ b/www/vicidial/called_counts_multilist_report.php
@@ -1,7 +1,7 @@
 , Matt Florell     LICENSE: AGPLv2
+# Copyright (C) 2016  Joe Johnson , Matt Florell     LICENSE: AGPLv2
 #
 # This is a report designed for showing called counts similar to the results
 # at the bottom of each list detail screen, but for multiple lists and using
@@ -14,6 +14,7 @@
 # 141114-0045 - Finalized adding QXZ translation to all admin files
 # 141230-1346 - Added code for on-the-fly language translations display
 # 151229-2050 - Added archive search option
+# 160227-1036 - Uniform form format
 #
 
 $startMS = microtime();
@@ -61,6 +62,10 @@ if (strlen($include_rollover)<2) {$include_rollover='NO';}
 $report_name = 'Called Counts List IDs Report';
 $db_source = 'M';
 $JS_text="\n";
 $HEADER.="\n";
 $HEADER.="\n";
 
-
-$HEADER.="\n"
 $HTML_head.="\n";
 $HTML_head.="\n";
 
-#if (strlen($group) > 0)
-#	{
-#	if (preg_match("/\|$group\|/i",$groups_string))
-#		{
-#	#	$HTML_head.="\n";
-#		}
-#	else
-#		{
-#	#	$HTML_head.="\n";
-#		$group='';
-#		}
-#	}
-
 $HTML_head.="\n";
 $HTML_head.=""._QXZ("$report_name")."\n";
 
@@ -331,7 +327,8 @@ $HTML_head.=""._QXZ("$report_name")." $NWB#fcstats$NWE\n";
+$HTML_text.="
"; $HTML_text.="
\n"; $HTML_text.=""; @@ -378,6 +375,7 @@ $HTML_text.="\n"; $HTML_text.="\n"; $HTML_text.="           "._QXZ("DOWNLOAD")." | "._QXZ("MODIFY")." | "._QXZ("REPORTS")."
\n"; $HTML_text.="
\n\n"; +$HTML_text.="
\n"; $HTML_text.="
\n\n";
 
@@ -433,14 +431,6 @@ $stmt="select count(*) from ".$vicidial_closer_log_table." where call_date >= '$
 $rslt=mysql_to_mysqli($stmt, $link);
 if ($DB) {$HTML_text.="$stmt\n";}
 $row=mysqli_fetch_row($rslt);
-$A1_points = ($row[0] * 1);
-$A1_points =	sprintf("%10s", $A1_points);
-$A1_tally =	sprintf("%10s", $row[0]);
-
-$TOT_tally = ($A1_tally + $A2_tally + $A3_tally + $A4_tally);
-$TOT_points = ($A1_points + $A2_points + $A3_points + $A4_points);
-$TOT_tally =	sprintf("%10s", $TOT_tally);
-$TOT_points =	sprintf("%10s", $TOT_points);
 
 $HTML_text.=_QXZ("STATUS",8)." "._QXZ("CUSTOMERS")."\n";
 $HTML_text.=_QXZ("SALES").":   $A1_tally\n";
@@ -461,15 +451,6 @@ $HTML_text.="\n";
 $TOTagents=0;
 $TOTcalls=0;
 $TOTsales=0;
-$totA1=0;
-$totA2=0;
-$totA3=0;
-$totA4=0;
-$totA5=0;
-$totA6=0;
-$totA7=0;
-$totA8=0;
-$totA9=0;
 $totDROP=0;
 $totOTHER=0;
 
@@ -477,15 +458,15 @@ $CSV_fronter_header="\""._QXZ("TOTALS FOR")." $query_date_BEGIN "._QXZ("to")." $
 $CSV_fronter_header.="\""._QXZ("STATUS   CUSTOMERS")."\"\n";
 $CSV_fronter_header.="\""._QXZ("SALES").":   $A1_tally\"\n\n";
 $CSV_fronter_header.="\""._QXZ("FRONTER STATS")."\"\n";
-$CSV_fronter_header.="\""._QXZ("AGENT")."\",\""._QXZ("SUCCESS")."\",\""._QXZ("XFERS")."\",\""._QXZ("SUCCESS")."%\",\""._QXZ("SALE")."\",\""._QXZ("DROP")."\",\""._QXZ("OTHER")."\"\n";
+$CSV_fronter_header.="\""._QXZ("AGENT")."\",\""._QXZ("XFERS")."\",\""._QXZ("SALE")."%\",\""._QXZ("SALE")."\",\""._QXZ("DROP")."\",\""._QXZ("OTHER")."\"\n";
 $CSV_fronter_lines="";
 $CSV_fronter_footer="";
 
 $ASCII_text="\n";
 $ASCII_text.="---------- "._QXZ("FRONTER STATS")."\n";
-$ASCII_text.="+--------------------------+-------+--------+--------+------+------+------+\n";
-$ASCII_text.="| "._QXZ("AGENT",24)." |"._QXZ("SUCCESS",7)."| "._QXZ("XFERS",6)." |"._QXZ("SUCCESS",7)."%| "._QXZ("SALE",4)." | "._QXZ("DROP",4)." |"._QXZ("OTHER",5)." |\n";
-$ASCII_text.="+--------------------------+-------+--------+--------+------+------+------+\n";
+$ASCII_text.="+--------------------------+--------+--------+------+------+------+\n";
+$ASCII_text.="| "._QXZ("AGENT",24)." | "._QXZ("XFERS",6)." |"._QXZ("SALE",7)."%| "._QXZ("SALE",4)." | "._QXZ("DROP",4)." |"._QXZ("OTHER",5)." |\n";
+$ASCII_text.="+--------------------------+--------+--------+------+------+------+\n";
 
 ######## GRAPHING #########
 $graph_stats=array();
@@ -496,19 +477,17 @@ $max_sales=1;
 $max_drops=1;
 $max_other=1;
 $GRAPH="";
-$GRAPH.="";
-$GRAPH.="
"._QXZ("SUCCESS").""._QXZ("XFERS").""._QXZ("SUCCESS")." %"._QXZ("SALE").""._QXZ("DROP").""._QXZ("OTHER")."

 


"; +$GRAPH.="
"._QXZ("XFERS").""._QXZ("SALE")." %"._QXZ("SALE").""._QXZ("DROP").""._QXZ("OTHER").""; +$GRAPH.="
 


"; $graph_header=""; -$SUCCESS_graph=$graph_header.""; $XFERS_graph=$graph_header.""; -$SUCCESSPCT_graph=$graph_header.""; +$SALEPCT_graph=$graph_header.""; $SALE_graph=$graph_header.""; $DROP_graph=$graph_header.""; $OTHER_graph=$graph_header.""; ########################### -#$stmt="select vicidial_xfer_log.user,full_name,count(*) from vicidial_xfer_log,vicidial_users where call_date >= '$query_date_BEGIN' and call_date <= '$query_date_END' and campaign_id='" . mysqli_real_escape_string($link, $group) . "' and vicidial_xfer_log.user is not null and vicidial_xfer_log.user=vicidial_users.user group by vicidial_xfer_log.user;"; -$stmt="select user,count(distinct lead_id) from ".$vicidial_xfer_log_table." where call_date >= '$query_date_BEGIN' and call_date <= '$query_date_END' and campaign_id='" . mysqli_real_escape_string($link, $group) . "' and user is not null group by user;"; +$stmt="select user,count(*) from ".$vicidial_xfer_log_table." where call_date >= '$query_date_BEGIN' and call_date <= '$query_date_END' and campaign_id='" . mysqli_real_escape_string($link, $group) . "' and user is not null group by user;"; if ($non_latin > 0) {$rslt=mysql_to_mysqli("SET NAMES 'UTF8'", $link);} $rslt=mysql_to_mysqli($stmt, $link); if ($DB) {$ASCII_text.="$stmt\n";} @@ -551,8 +530,8 @@ while ($i < $users_to_print) else {$full_name[$i] = ' ';} - $A1=0; $A2=0; $A3=0; $A4=0; $A5=0; $A6=0; $A7=0; $A8=0; $A9=0; $DROP=0; $OTHER=0; $sales=0; - $stmt="select vc.status,count(distinct vc.lead_id) from ".$vicidial_xfer_log_table." vx, ".$vicidial_closer_log_table." vc where vx.call_date >= '$query_date_BEGIN' and vx.call_date <= '$query_date_END' and vc.call_date >= '$query_date_BEGIN' and vc.call_date <= '$query_date_END' and vc.campaign_id='" . mysqli_real_escape_string($link, $group) . "' and vx.campaign_id='" . mysqli_real_escape_string($link, $group) . "' and vx.user='$userRAW[$i]' and vc.lead_id=vx.lead_id and vc.xfercallid=vx.xfercallid group by vc.status;"; + $DROP=0; $OTHER=0; $sales=0; + $stmt="select vc.status,count(*) from ".$vicidial_xfer_log_table." vx, ".$vicidial_closer_log_table." vc where vx.call_date >= '$query_date_BEGIN' and vx.call_date <= '$query_date_END' and vc.call_date >= '$query_date_BEGIN' and vc.call_date <= '$query_date_END' and vc.campaign_id='" . mysqli_real_escape_string($link, $group) . "' and vx.campaign_id='" . mysqli_real_escape_string($link, $group) . "' and vx.user='$userRAW[$i]' and vc.lead_id=vx.lead_id and vc.xfercallid=vx.xfercallid group by vc.status;"; if ($non_latin > 0) {$rslt=mysql_to_mysqli("SET NAMES 'UTF8'", $link);} $rslt=mysql_to_mysqli($stmt, $link); if ($DB) {$ASCII_text.="$stmt\n";} @@ -563,28 +542,11 @@ while ($i < $users_to_print) $row=mysqli_fetch_row($rslt); $recL=0; if ( (preg_match("/\|$row[0]\|/", $sale_dispo_str)) and ($recL < 1) ) {$A1=$row[1]; $recL++; $sales=($sales + $row[1]);} - # if ( ($row[0]=='A2') and ($recL < 1) ) {$A2=$row[1]; $recL++; $sales=($sales + $row[1]);} - # if ( ($row[0]=='A3') and ($recL < 1) ) {$A3=$row[1]; $recL++; $sales=($sales + $row[1]);} - # if ( ($row[0]=='A4') and ($recL < 1) ) {$A4=$row[1]; $recL++; $sales=($sales + $row[1]);} - # if ( ($row[0]=='A5') and ($recL < 1) ) {$A5=$row[1]; $recL++;} - # if ( ($row[0]=='A6') and ($recL < 1) ) {$A6=$row[1]; $recL++;} - # if ( ($row[0]=='A7') and ($recL < 1) ) {$A7=$row[1]; $recL++;} - # if ( ($row[0]=='A8') and ($recL < 1) ) {$A8=$row[1]; $recL++;} - # if ( ($row[0]=='A9') and ($recL < 1) ) {$A9=$row[1]; $recL++;} - if ( ($row[0]=='DROP') and ($recL < 1) ) {$DROP=$row[1]; $recL++;} + if ( ($row[0]=='DROP' || $row[0]=='TIMEOT') and ($recL < 1) ) {$DROP=($DROP+$row[1]); $recL++;} if ($recL < 1) {$OTHER=($row[1] + $OTHER); $recL++;} $j++; } - $totA1 = ($totA1 + $A1); - $totA2 = ($totA2 + $A2); - $totA3 = ($totA3 + $A3); - $totA4 = ($totA4 + $A4); - $totA5 = ($totA5 + $A5); - $totA6 = ($totA6 + $A6); - $totA7 = ($totA7 + $A7); - $totA8 = ($totA8 + $A8); - $totA9 = ($totA9 + $A9); $totDROP = ($totDROP + $DROP); $totOTHER = ($totOTHER + $OTHER); $TOTsales = ($TOTsales + $sales); @@ -596,33 +558,22 @@ while ($i < $users_to_print) if ($sales>$max_success) {$max_success=$sales;} if ($USERcalls[$i]>$max_xfers) {$max_xfers=$USERcalls[$i];} if ($Spct>$max_success_pct) {$max_success_pct=$Spct;} - if ($A1>$max_sales) {$max_sales=$A1;} if ($DROP>$max_drops) {$max_drops=$DROP;} if ($OTHER>$max_other) {$max_other=$OTHER;} $graph_stats[$i][0]="$user[$i] - $full_name[$i]"; - $graph_stats[$i][1]=$sales; - $graph_stats[$i][2]=$USERcalls[$i]; - $graph_stats[$i][3]=$Spct; - $graph_stats[$i][4]=$A1; - $graph_stats[$i][5]=$DROP; - $graph_stats[$i][6]=$OTHER; + $graph_stats[$i][1]=$USERcalls[$i]; + $graph_stats[$i][2]=$Spct; + $graph_stats[$i][3]=$sales; + $graph_stats[$i][4]=$DROP; + $graph_stats[$i][5]=$OTHER; - $A1 = sprintf("%4s", $A1); - $A2 = sprintf("%4s", $A2); - $A3 = sprintf("%4s", $A3); - $A4 = sprintf("%4s", $A4); - $A5 = sprintf("%4s", $A5); - $A6 = sprintf("%4s", $A6); - $A7 = sprintf("%4s", $A7); - $A8 = sprintf("%4s", $A8); - $A9 = sprintf("%4s", $A9); $DROP = sprintf("%4s", $DROP); $OTHER = sprintf("%4s", $OTHER); - $sales = sprintf("%5s", $sales); + $sales = sprintf("%4s", $sales); $Spct = sprintf("%6s", $Spct); - $ASCII_text.="| $user[$i] - $full_name[$i] | $sales | $USERcalls[$i] | $Spct%| $A1 | $DROP | $OTHER |\n"; - $CSV_fronter_lines.="\"$user[$i] - $full_name[$i]\",\"$sales\",\"$USERcalls[$i]\",\"$Spct%\",\"$A1\",\"$DROP\",\"$OTHER\"\n"; + $ASCII_text.="| $user[$i] - $full_name[$i] | $USERcalls[$i] | $Spct%| $sales | $DROP | $OTHER |\n"; + $CSV_fronter_lines.="\"$user[$i] - $full_name[$i]\",\"$USERcalls[$i]\",\"$Spct%\",\"$sales\",\"$DROP\",\"$OTHER\"\n"; $i++; } @@ -636,15 +587,6 @@ $totSpct = sprintf("%6s", $totSpct); $TOTagents = sprintf("%6s", $i); $TOTcalls = sprintf("%6s", $TOTcalls); $TOTsales = sprintf("%5s", $TOTsales); -$totA1 = sprintf("%5s", $totA1); -$totA2 = sprintf("%5s", $totA2); -$totA3 = sprintf("%5s", $totA3); -$totA4 = sprintf("%5s", $totA4); -$totA5 = sprintf("%5s", $totA5); -$totA6 = sprintf("%5s", $totA6); -$totA7 = sprintf("%5s", $totA7); -$totA8 = sprintf("%5s", $totA8); -$totA9 = sprintf("%5s", $totA9); $totDROP = sprintf("%5s", $totDROP); $totOTHER = sprintf("%5s", $totOTHER); @@ -666,40 +608,37 @@ $AVGwait_MS = "$AVGwait_M_int:$AVGwait_S"; $AVGwait = sprintf("%6s", $AVGwait_MS); -$ASCII_text.="+--------------------------+-------+--------+--------+------+------+------+\n"; -$ASCII_text.="| "._QXZ("TOTAL FRONTERS",14).": $TOTagents | $TOTsales | $TOTcalls | $totSpct%|$totA1 |$totDROP |$totOTHER |\n"; -$ASCII_text.="+--------------------------+-------+--------+--------+------+------+------+\n"; -$ASCII_text.="| "._QXZ("Average time in Queue for customers",60,"r").": $AVGwait |\n"; -$ASCII_text.="+--------------------------+-------+--------+--------+------+------+------+\n"; +$ASCII_text.="+--------------------------+--------+--------+------+------+------+\n"; +$ASCII_text.="| "._QXZ("TOTAL FRONTERS",14).": $TOTagents | $TOTcalls | $totSpct%|$TOTsales |$totDROP |$totOTHER |\n"; +$ASCII_text.="+--------------------------+--------+--------+------+------+------+\n"; +$ASCII_text.="| "._QXZ("Average time in Queue for customers",52,"r").": $AVGwait |\n"; +$ASCII_text.="+--------------------------+--------+--------+------+------+------+\n"; -$CSV_fronter_footer.="\""._QXZ("TOTAL FRONTERS").": $TOTagents\",\"$TOTsales\",\"$TOTcalls\",\"$totSpct%\",\"$totA1\",\"$totDROP\",\"$totOTHER\"\n"; +$CSV_fronter_footer.="\""._QXZ("TOTAL FRONTERS").": $TOTagents\",\"$TOTcalls\",\"$totSpct%\",\"$TOTsales\",\"$totDROP\",\"$totOTHER\"\n"; $CSV_fronter_footer.="\""._QXZ("Average time in Queue for customers").": $AVGwait\"\n\n\n"; for ($d=0; $d"; - $XFERS_graph.=" "; - $SUCCESSPCT_graph.=" "; - $SALE_graph.=" "; - $DROP_graph.=" "; + $XFERS_graph.=" "; + $SALEPCT_graph.=" "; + $SALE_graph.=" "; + $DROP_graph.=" "; $OTHER_graph.=" "; } - $SUCCESS_graph.="
"._QXZ("FRONTER STATS")."
"._QXZ("AGENT").""._QXZ("SUCCESS")."
"._QXZ("XFERS")."
"._QXZ("SUCCESS")." %
"._QXZ("SALE")." %
"._QXZ("SALE")."
"._QXZ("DROP")."
"._QXZ("OTHER")."
".$graph_stats[$d][1]."
".$graph_stats[$d][0]."".$graph_stats[$d][2]."
".$graph_stats[$d][0]."".$graph_stats[$d][3]."
".$graph_stats[$d][0]."".$graph_stats[$d][4]."
".$graph_stats[$d][0]."".$graph_stats[$d][5]."
".$graph_stats[$d][0]."".$graph_stats[$d][1]."
".$graph_stats[$d][0]."".$graph_stats[$d][2]."
".$graph_stats[$d][0]."".$graph_stats[$d][3]."
".$graph_stats[$d][0]."".$graph_stats[$d][4]."
".$graph_stats[$d][0]."".$graph_stats[$d][5]."
"._QXZ("TOTAL").":".trim($TOTsales)."
"; $XFERS_graph.=""._QXZ("TOTAL").":".trim($TOTcalls).""; - $SUCCESSPCT_graph.=""._QXZ("TOTAL").":".trim($totSpct)."%"; - $SALE_graph.=""._QXZ("TOTAL").":".trim($totA1).""; + $SALEPCT_graph.=""._QXZ("TOTAL").":".trim($totSpct)."%"; + $SALE_graph.=""._QXZ("TOTAL").":".trim($TOTsales).""; $DROP_graph.=""._QXZ("TOTAL").":".trim($totDROP).""; $OTHER_graph.=""._QXZ("TOTAL").":".trim($totOTHER).""; - $JS_onload.="\tDrawFronterGraph('SUCCESS', '1');\n"; + $JS_onload.="\tDrawFronterGraph('XFERS', '1');\n"; $JS_text.="function DrawFronterGraph(graph, th_id) {\n"; - $JS_text.=" var SUCCESS_graph=\"$SUCCESS_graph\";\n"; $JS_text.=" var XFERS_graph=\"$XFERS_graph\";\n"; - $JS_text.=" var SUCCESSPCT_graph=\"$SUCCESSPCT_graph\";\n"; + $JS_text.=" var SALEPCT_graph=\"$SALEPCT_graph\";\n"; $JS_text.=" var SALE_graph=\"$SALE_graph\";\n"; $JS_text.=" var DROP_graph=\"$DROP_graph\";\n"; $JS_text.=" var OTHER_graph=\"$OTHER_graph\";\n"; $JS_text.="\n"; - $JS_text.=" for (var i=1; i<=6; i++) {\n"; + $JS_text.=" for (var i=1; i<=5; i++) {\n"; $JS_text.=" var cellID=\"frontergraph\"+i;\n"; $JS_text.=" document.getElementById(cellID).style.backgroundColor='#DDDDDD';\n"; $JS_text.=" }\n"; @@ -712,18 +651,9 @@ $CSV_fronter_footer.="\""._QXZ("Average time in Queue for customers").": $AVG ############################## ######### CLOSER STATS - +$graph_stats=array(); $TOTagents=0; $TOTcalls=0; -$totA1=0; -$totA2=0; -$totA3=0; -$totA4=0; -$totA5=0; -$totA6=0; -$totA7=0; -$totA8=0; -$totA9=0; $totDROP=0; $totOTHER=0; $TOTsales=0; @@ -734,12 +664,12 @@ $CSV_closer_footer=""; $ASCII_text.="\n"; $ASCII_text.="---------- "._QXZ("CLOSER STATS")."\n"; -$ASCII_text.="+--------------------------+--------+------+------+------+------+-------+\n"; -$ASCII_text.="| "._QXZ("AGENT",24)." | "._QXZ("CALLS",6)." | "._QXZ("SALE",4)." | "._QXZ("DROP",4)." |"._QXZ("OTHER",5)." | "._QXZ("SALE",4)." | "._QXZ("CONV",4)." %|\n"; -$ASCII_text.="+--------------------------+--------+------+------+------+------+-------+\n"; +$ASCII_text.="+--------------------------+--------+------+------+------+-------+\n"; +$ASCII_text.="| "._QXZ("AGENT",24)." | "._QXZ("CALLS",6)." | "._QXZ("SALE",4)." | "._QXZ("DROP",4)." |"._QXZ("OTHER",5)." | "._QXZ("CONV",4)." %|\n"; +$ASCII_text.="+--------------------------+--------+------+------+------+-------+\n"; $CSV_closer_header="\""._QXZ("CLOSER STATS")."\"\n"; -$CSV_closer_header.="\""._QXZ("AGENT")."\",\""._QXZ("CALLS")."\",\""._QXZ("SALE")."\",\""._QXZ("DROP")."\",\""._QXZ("OTHER")."\",\""._QXZ("SALE")."\",\""._QXZ("CONV")." %\"\n"; +$CSV_closer_header.="\""._QXZ("AGENT")."\",\""._QXZ("CALLS")."\",\""._QXZ("SALE")."\",\""._QXZ("DROP")."\",\""._QXZ("OTHER")."\",\""._QXZ("CONV")." %\"\n"; ######## GRAPHING ######### $max_calls=1; @@ -749,14 +679,13 @@ $max_other=1; $max_sales2=1; $max_conv_pct=1; $GRAPH="

"; -$GRAPH.=""; -$GRAPH.="
"._QXZ("CALLS").""._QXZ("SALE")."S"._QXZ("DROP").""._QXZ("OTHER").""._QXZ("SALES").""._QXZ("CONV")." %

 


"; +$GRAPH.="
"._QXZ("CALLS").""._QXZ("SALE")."S"._QXZ("DROP").""._QXZ("OTHER").""._QXZ("CONV")." %"; +$GRAPH.="
 


"; $graph_header=""; $CALLS_graph=$graph_header.""; $SALES_graph=$graph_header.""; $DROP_graph=$graph_header.""; $OTHER_graph=$graph_header.""; -$SALES2_graph=$graph_header.""; $CONVPCT_graph=$graph_header.""; ########################### @@ -802,7 +731,7 @@ while ($i < $users_to_print) else {$full_name[$i] = ' ';} - $A1=0; $A2=0; $A3=0; $A4=0; $A5=0; $A6=0; $A7=0; $A8=0; $A9=0; $DROP=0; $OTHER=0; $sales=0; $uTOP=0; $uBOT=0; $points=0; + $DROP=0; $OTHER=0; $sales=0; $uTOP=0; $uBOT=0; $points=0; $stmt="select status,count(*) from ".$vicidial_closer_log_table." where call_date >= '$query_date_BEGIN' and call_date <= '$query_date_END' and campaign_id='" . mysqli_real_escape_string($link, $group) . "' and user='$userRAW[$i]' group by status;"; if ($non_latin > 0) {$rslt=mysql_to_mysqli("SET NAMES 'UTF8'", $link);} $rslt=mysql_to_mysqli($stmt, $link); @@ -819,50 +748,13 @@ while ($i < $users_to_print) $sales=($sales + $row[1]); $points = ($points + ($row[1] * 1) ); } - /* - if ( ($row[0]=='A2') and ($recL < 1) ) - { - $A2=$row[1]; $recL++; - $sales=($sales + $row[1]); - $uTOP=($uTOP + $row[1]); - $points = ($points + ($row[1] * 2) ); - } - if ( ($row[0]=='A3') and ($recL < 1) ) - { - $A3=$row[1]; $recL++; - $sales=($sales + $row[1]); - $uBOT=($uBOT + $row[1]); - $points = ($points + ($row[1] * 2) ); - } - if ( ($row[0]=='A4') and ($recL < 1) ) - { - $A4=$row[1]; $recL++; - $sales=($sales + $row[1]); - $uTOP=($uTOP + $row[1]); - $uBOT=($uBOT + $row[1]); - $points = ($points + ($row[1] * 3) ); - } - */ -# if ( ($row[0]=='A5') and ($recL < 1) ) {$A5=$row[1]; $recL++;} -# if ( ($row[0]=='A6') and ($recL < 1) ) {$A6=$row[1]; $recL++;} -# if ( ($row[0]=='A7') and ($recL < 1) ) {$A7=$row[1]; $recL++;} -# if ( ($row[0]=='A8') and ($recL < 1) ) {$A8=$row[1]; $recL++;} -# if ( ($row[0]=='A9') and ($recL < 1) ) {$A9=$row[1]; $recL++;} if ( ($row[0]=='DROP') and ($recL < 1) ) {$DROP=$row[1]; $recL++;} if ($recL < 1) {$OTHER=($row[1] + $OTHER); $recL++;} $j++; } - $totA1 = ($totA1 + $A1); $TOTsales = ($TOTsales + $A1); - $totA2 = ($totA2 + $A2); $TOTsales = ($TOTsales + $A2); $totTOP = ($totTOP + $A2); - $totA3 = ($totA3 + $A3); $TOTsales = ($TOTsales + $A3); $totBOT = ($totBOT + $A3); - $totA4 = ($totA4 + $A4); $TOTsales = ($TOTsales + $A4); $totTOP = ($totTOP + $A4); $totBOT = ($totBOT + $A4); - $totA5 = ($totA5 + $A5); - $totA6 = ($totA6 + $A6); - $totA7 = ($totA7 + $A7); - $totA8 = ($totA8 + $A8); - $totA9 = ($totA9 + $A9); + $TOTsales = ($TOTsales + $sales); $totDROP = ($totDROP + $DROP); $totOTHER = ($totOTHER + $OTHER); $totPOINTS = ($totPOINTS + $points); @@ -895,27 +787,17 @@ while ($i < $users_to_print) if ($Cpct>$max_conv_pct) {$max_conv_pct=$Cpct;} $graph_stats[$i][0]="$user[$i] - $full_name[$i]"; $graph_stats[$i][1]=$USERcalls[$i]; - $graph_stats[$i][2]=$A1; + $graph_stats[$i][2]=$sales; $graph_stats[$i][3]=$DROP; $graph_stats[$i][4]=$OTHER; - $graph_stats[$i][5]=$sales; - $graph_stats[$i][6]=$Cpct; + $graph_stats[$i][5]=$Cpct; - $A1 = sprintf("%4s", $A1); - $A2 = sprintf("%4s", $A2); - $A3 = sprintf("%4s", $A3); - $A4 = sprintf("%4s", $A4); - $A5 = sprintf("%4s", $A5); - $A6 = sprintf("%4s", $A6); - $A7 = sprintf("%4s", $A7); - $A8 = sprintf("%4s", $A8); - $A9 = sprintf("%4s", $A9); $DROP = sprintf("%4s", $DROP); $OTHER = sprintf("%4s", $OTHER); $sales = sprintf("%4s", $sales); - $ASCII_text.="| $user[$i] - $full_name[$i] | $USERcalls[$i] | $A1 | $DROP | $OTHER | $sales |$Cpct%|\n"; - $CSV_closer_lines.="\"$user[$i] - $full_name[$i]\",\"$USERcalls[$i]\",\"$A1\",\"$DROP\",\"$OTHER\",\"$sales\",\"$Cpct%\"\n"; + $ASCII_text.="| $user[$i] - $full_name[$i] | $USERcalls[$i] | $sales | $DROP | $OTHER |$Cpct%|\n"; + $CSV_closer_lines.="\"$user[$i] - $full_name[$i]\",\"$USERcalls[$i]\",\"$sales\",\"$DROP\",\"$OTHER\",\"$Cpct%\"\n"; $i++; } @@ -943,22 +825,13 @@ $BOT = sprintf("%3s", $BOT); $TOTagents = sprintf("%6s", $i); $TOTcalls = sprintf("%6s", $TOTcalls); -$totA1 = sprintf("%5s", $totA1); -$totA2 = sprintf("%5s", $totA2); -$totA3 = sprintf("%5s", $totA3); -$totA4 = sprintf("%5s", $totA4); -$totA5 = sprintf("%5s", $totA5); -$totA6 = sprintf("%5s", $totA6); -$totA7 = sprintf("%5s", $totA7); -$totA8 = sprintf("%5s", $totA8); -$totA9 = sprintf("%5s", $totA9); $totDROP = sprintf("%5s", $totDROP); $totOTHER = sprintf("%5s", $totOTHER); $TOTsales = sprintf("%5s", $TOTsales); -$ASCII_text.="+--------------------------+--------+------+------+------+------+-------+\n"; -$ASCII_text.="| "._QXZ("TOTAL CLOSERS",13).": $TOTagents | $TOTcalls |$totA1 |$totDROP |$totOTHER |$TOTsales |$totCpct%|\n"; -$ASCII_text.="+--------------------------+--------+------+------+------+------+-------+\n"; +$ASCII_text.="+--------------------------+--------+------+------+------+-------+\n"; +$ASCII_text.="| "._QXZ("TOTAL CLOSERS",13).": $TOTagents | $TOTcalls |$TOTsales |$totDROP |$totOTHER |$totCpct%|\n"; +$ASCII_text.="+--------------------------+--------+------+------+------+-------+\n"; $CSV_closer_footer.="\""._QXZ("TOTAL CLOSERS").": $TOTagents\",\"$TOTcalls\",\"$totA1\",\"$totDROP\",\"$totOTHER\",\"$TOTsales\",\"$totCpct%\"\n"; @@ -968,14 +841,12 @@ $CSV_closer_footer.="\""._QXZ("TOTAL CLOSERS").": $TOTagents\",\"$TOTcalls\",\" $SALES_graph.=" "; $DROP_graph.=" "; $OTHER_graph.=" "; - $SALES2_graph.=" "; - $CONVPCT_graph.=" "; + $CONVPCT_graph.=" "; } $CALLS_graph.="
"._QXZ("CLOSER STATS")."
"._QXZ("AGENT").""._QXZ("CALLS")."
"._QXZ("SALES")."
"._QXZ("DROP")."
"._QXZ("OTHER")."
"._QXZ("SALES")."
"._QXZ("CONV")." %
".$graph_stats[$d][0]."".$graph_stats[$d][2]."
".$graph_stats[$d][0]."".$graph_stats[$d][3]."
".$graph_stats[$d][0]."".$graph_stats[$d][4]."
".$graph_stats[$d][0]."".$graph_stats[$d][5]."
".$graph_stats[$d][0]."".$graph_stats[$d][6]."%
".$graph_stats[$d][0]."".$graph_stats[$d][5]."%
"._QXZ("TOTAL").":".trim($TOTcalls)."
"; - $SALES_graph.=""._QXZ("TOTAL").":".trim($totA1).""; + $SALES_graph.=""._QXZ("TOTAL").":".trim($TOTsales).""; $DROP_graph.=""._QXZ("TOTAL").":".trim($totDROP).""; $OTHER_graph.=""._QXZ("TOTAL").":".trim($totOTHER).""; - $SALES2_graph.=""._QXZ("TOTAL").":".trim($TOTsales).""; $CONVPCT_graph.=""._QXZ("TOTAL").":".trim($totCpct)."%"; $JS_onload.="\tDrawCloserGraph('CALLS', '1');\n"; $JS_text.="function DrawCloserGraph(graph, th_id) {\n"; @@ -983,10 +854,9 @@ $CSV_closer_footer.="\""._QXZ("TOTAL CLOSERS").": $TOTagents\",\"$TOTcalls\",\" $JS_text.=" var SALES_graph=\"$SALES_graph\";\n"; $JS_text.=" var DROP_graph=\"$DROP_graph\";\n"; $JS_text.=" var OTHER_graph=\"$OTHER_graph\";\n"; - $JS_text.=" var SALES2_graph=\"$SALES2_graph\";\n"; $JS_text.=" var CONVPCT_graph=\"$CONVPCT_graph\";\n"; $JS_text.="\n"; - $JS_text.=" for (var i=1; i<=6; i++) {\n"; + $JS_text.=" for (var i=1; i<=5; i++) {\n"; $JS_text.=" var cellID=\"closergraph\"+i;\n"; $JS_text.=" document.getElementById(cellID).style.backgroundColor='#DDDDDD';\n"; $JS_text.=" }\n"; @@ -1012,7 +882,6 @@ else if ($DB) {$HTML_text.="\n"._QXZ("Run Time").": $RUNtime "._QXZ("seconds")."|$db_source\n";} $HTML_text.="
\n"; -$HTML_text.="\n"; $HTML_text.="\n"; @@ -1081,3 +950,4 @@ exit; ?> + diff --git a/www/vicidial/help.php b/www/vicidial/help.php index 2286c3cd..3240a45f 100644 --- a/www/vicidial/help.php +++ b/www/vicidial/help.php @@ -80,6 +80,7 @@ # 160108-2217 - Added campaigns-manual_dial_hopper_check entry # 160116-1512 - Added access_recording and log_recording_access entries # 160121-2155 - Added settings-report_default_format entry and help text for several reports +# 160211-2255 - Added help text for remaining reports # @@ -5684,9 +5685,277 @@ if ($SSqc_features_active > 0) SERVER PHONE = The most recent server phone account this user was logged in through."); ?>
PHONE IP = The IP address of the phone during the most recent agent screen session."); ?>
+ +
+ -
+TIME CLOCK = Total amount of time agent spent logged in."); ?>
+TIME CLOCK PUNCHES = A list of the punch-in and punch-out times for each agent. Punch-out times marked with an asterisk (*) denotes AUTOLOGOUT from timeclock."); ?>
+ +
+
+ -
+DISPOSITION = The distinct dispositions made for the list within the time frame specified."); ?>
+CALLS = The number of calls ending with the disposition listed."); ?>
+DURATION = Sum of the length of the calls ending with the disposition listed."); ?>
+HANDLE TIME = Sum of the time the calls ending with the disposition listed were handled by an agent (TALK + DEAD)."); ?>

+TOTAL CALLS = Number of calls placed to leads belonging to lists in this campaign within the time frame specified."); ?>
+STATUS FLAGS BREAKDOWN = Breakdown of the total calls into status categories, including counts per category and percentage relative to the number of calls to leads in the list within the time frame specified."); ?>
+ +
+
+ -
+DROPS = The number of dropped calls to the inbound group within the time frame specified for that time interval."); ?>
+DROP % = The percentage of calls ending in DROPS."); ?>
+AVG DROP(S) = Average length in seconds of the calls ending in DROPS."); ?>
+HOLDS = The number of calls to the inbound group that were held in queue for that time interval."); ?>
+HOLD % = The percentage of calls that went to queue relative to the total calls."); ?>
+AVG HOLD(S) HOLD = Average length in seconds of the queue time for only the calls in queue."); ?>
+AVG HOLD(S) TOTAL = Average length in seconds of the queue time for ALL calls for the time interval."); ?>
+CALLS = Number of calls received by the ingroup within the time interval."); ?>
+TOTAL CALLTIME MIN:SEC = Total length of all calls received."); ?>
+AVG CALLTIME SECONDS = Average length of all calls received."); ?>
+ +
+
+ -
+MULTI-GROUP BREAKDOWN"); ?>
+CALLS = The number of calls to the inbound groups or DIDs within the time frame specified for that time interval."); ?>
+DROPS = The number of dropped calls to the inbound groups or DIDs within the time frame specified for that time interval."); ?>
+DROP % = The percentage of calls ending in DROPS."); ?>
+IVR = The number of calls to the inbound group or DID that went to an IVR within the time frame specified for that time interval."); ?>
+ +CALL HANGUP REASON STATS"); ?>
+HANGUP REASON = The reason the call terminated."); ?>
+HOLDS = The number of calls terminated from the aforementioned reason."); ?>
+ +CALL STATUS STATS"); ?>
+STATUS = The call disposition."); ?>
+DESCRIPTION = A description of the call disposition."); ?>
+CATEGORY = The call category that the disposition currently belongs to."); ?>
+CALLS = The number of calls taken by the ingroups or DIDs that were dispositioned as the listed disposition."); ?>
+TOTAL TIME = The total amount of time that was spent on calls that ended as the listed disposition."); ?>
+AVG TIME = The average amount of time that was spent on calls that ended as the listed disposition."); ?>
+CALLS /HOUR = The number of calls per hour to the ingroups or DIDs that ended as the listed disposition."); ?>
+ +CUSTOM STATUS CATEGORY STATS"); ?>
+CATEGORY = The custom call category that a call was dispositioned under the selected report parameters."); ?>
+CALLS = The number of calls dispositioned under the custom status category."); ?>
+DESCRIPTION = A description of the custom call category."); ?>
+ +AGENT STATS"); ?>
+AGENT = The agent who received a call to the specified inbound groups or DIDs."); ?>
+CALLS = The number of calls fielded by the agent."); ?>
+DESCRIPTION = The total time the agent spent in calls to the specified inbound groups or DIDs."); ?>
+DESCRIPTION = The average time the agent spent in calls to the specified inbound groups or DIDs."); ?>
+ +
+
+ -
+MULTI-GROUP BREAKDOWN"); ?>
+CALLS = The number of calls to the inbound groups or DIDs within the time frame specified for that time interval."); ?>
+DROPS = The number of dropped calls to the inbound groups or DIDs within the time frame specified for that time interval."); ?>
+DROP % = The percentage of calls ending in DROPS."); ?>
+IVR = The number of calls to the inbound group or DID that went to an IVR within the time frame specified for that time interval."); ?>
+ +CALL HANGUP REASON STATS"); ?>
+HANGUP REASON = The reason the call terminated."); ?>
+HOLDS = The number of calls terminated from the aforementioned reason."); ?>
+ +CALL STATUS STATS"); ?>
+STATUS = The call disposition."); ?>
+DESCRIPTION = A description of the call disposition."); ?>
+CATEGORY = The call category that the disposition currently belongs to."); ?>
+CALLS = The number of calls taken by the ingroups or DIDs that were dispositioned as the listed disposition."); ?>
+TOTAL TIME = The total amount of time that was spent on calls that ended as the listed disposition."); ?>
+AVG TIME = The average amount of time that was spent on calls that ended as the listed disposition."); ?>
+CALLS /HOUR = The number of calls per hour to the ingroups or DIDs that ended as the listed disposition."); ?>
+ +CUSTOM STATUS CATEGORY STATS"); ?>
+CATEGORY = The custom call category that a call was dispositioned under the selected report parameters."); ?>
+CALLS = The number of calls dispositioned under the custom status category."); ?>
+DESCRIPTION = A description of the custom call category."); ?>
+ +AGENT STATS"); ?>
+AGENT = The agent who received a call to the specified inbound groups or DIDs."); ?>
+CALLS = The number of calls fielded by the agent."); ?>
+TIME H:M:S = The total time the agent spent in calls to the specified inbound groups or DIDs."); ?>
+AVERAGE = The average time the agent spent in calls to the specified inbound groups or DIDs."); ?>
+
+
+ -
+TOTAL CALLS = Total calls taken by the in-group."); ?>
+TOTAL ANSWER = Total calls answered by the in-group."); ?>
+TOTAL TALK = Total amount of time spent in calls answered by the in-group."); ?>
+AVERAGE TALK = Average amount of time spent in calls answered by the in-group."); ?>
+TOTAL QUEUE TIME = Total amount of time calls handled by the in-group spent in queue."); ?>
+TOTAL QUEUE TIME = Average amount of time calls handled by the in-group spent in queue."); ?>
+MAXIMUM QUEUE TIME = The longest amount of time any single call handled by the in-group spent in queue."); ?>
+TOTAL ABANDON CALLS = The number of calls to the in-group that were unanswered and abandoned by the caller."); ?>
+
+
+ -
+Start Inv = Total leads currently in list."); ?>
+Call Inv Total = Total leads currently dialable in list based on the campaign settings it belongs to."); ?>
+Call Inv No filtr = Total leads currently dialable in list based on the campaign settings EXCLUDING any filters."); ?>
+Call Inv One-off = Total leads currently dialable in list based on the campaign settings that are at least one dial attempt below the call count limit."); ?>
+Call Inv Inactive = Total leads currently in list that belong to INCOMPLETE statuses that are NOT currently selected as dialable for the campaign."); ?>
+Dial Avg = Total calls made on the list divided by the Start Inv of that list."); ?>
+Pen. % = Percentage of leads in the list that are no longer dialable (Start Inv - Call Inv Total / Start Inv."); ?>
+ +
+
+ -
+ROUTE = Where the DID is currently directed when a call reaches it."); ?>
+CALLS = Number of calls the DIDs/servers/time frames (depending on which sub-report you are viewing) received during the specific date range."); ?>
+ +
+
+ -
+ +
+
+ -
+TOTAL CALLS OFFERED = Total calls taken by the in-group."); ?>
+TOTAL CALLS ANSWERED = Total calls answered by the in-group."); ?>
+TOTAL AGENTS ANSWERED = Total number of distinct agents who fielded calls to this in-group."); ?>
+TOTAL CALLS ABANDONED = Total calls ended in queue (dropped)."); ?>
+TOTAL ABANDON PERCENT = Percentage of calls abandoned (TOTAL CALLS ABANDONED / TOTAL CALLS OFFERED)."); ?>
+AVG ABANDON TIME = Average amount of time a caller waited in queue before abandoning the call."); ?>
+AVG ANSWER SPEED = Average amount of time a caller waited in queue before an agent answered."); ?>
+AVG TALK TIME = Average amount of time an agent remained on the line with the caller before the call was hung up - does not include caller queue time."); ?>
+TOTAL TALK TIME = Total amount of time agents remained on the line with callers before calls ended - does not include caller queue time."); ?>
+TOTAL WRAP TIME = Total amount of time agents used to 'wrap' the call - assumed to be 15 second per answered call."); ?>
+TOTAL CALL TIME = Total talk time plus total wrap time."); ?>
+ +
+
+ -
+IVR CALLS = Total calls taken by or made through the selected IVRs that follow the 'CALL PATH'."); ?>
+QUEUE CALLS = Total inbound calls taken by the selected IVRs that follow the 'CALL PATH'."); ?>
+QUEUE DROP CALLS = Total inbound calls taken by the selected IVRs that follow the 'CALL PATH' that were dropped."); ?>
+QUEUE DROP PERCENT = Percentage of dropped inbound calls taken by the selected IVRs (QUEUE DROP CALLS / QUEUE CALLS)."); ?>
+IVR AVG TIME = Average amount of time spent in-call, taken by dividing IVR CALLS by the total time spent in the selected IVRs."); ?>
+TOTAL AVG TIME = Total call time spent in the selected IVRs."); ?>
+CALL PATH = The specific call path followed on the IVR - report will display each distinct path followed by all the selected IVRs for the selected date range."); ?>
+ +
+
+ -
+LIST ID SUMMARY = Shows each list in the campaign(s) selected by the user, the count of leads in each list, and whether the list is active or inactive."); ?>
+STATUS FLAGS SUMMARY = Shows a breakdown of the status flags for all the selected lists in all the selected campaigns combined. Status flags are set in the 'Statuses' section of a campaign or the 'System Statuses'."); ?>
+CUSTOM STATUS CATEGORY STATS = Shows a breakdown of the custom status categories for all the selected lists in all the selected campaigns combined. Categories can be defined under the 'System Statuses' in the admin section."); ?>
+PER LIST DETAIL STATS = Shows each list in the campaign(s) selected by the user, with a breakdown of each status flag (and percentage of each flag) and status within that list."); ?>
+ +
+
+ -
+FIRST LOAD DATE = Date list first had leads loaded."); ?>
+LIST ID and NAME = List ID number and name of list."); ?>
+CAMPAIGN = Campaign that the list currently belongs to."); ?>
+LEAD COUNT = Number of leads in the list."); ?>
+ACTIVE = Whether or not the lead was active."); ?>
+CONTACTS 1st-5th,LIFE PASS = Leads that were 'human answered' (dispoed a status where HUMAN ANSWER is set to 'Y' on the statuses section) on or after the first-fifth call attempt, or LIFE if contacted as such at any point ever."); ?>
+CNT RATE 1st-5th PASS = Percentage of leads on the list that were 'human answered' on or after the first-fifth call attempt, or LIFE if contacted as such at any point ever."); ?>
+SALE 1st-5th,LIFE PASS = Leads that were sold to (dispoed a status where SALE is set to 'Y' on the statuses section) on or after the first-fifth call attempt, or LIFE if contacted as such at any point ever."); ?>
+CNV RATE 1st-5th PASS = Percentage of leads on the list that were sold to on or after the first-fifth call attempt, or LIFE if contacted as such at any point ever."); ?>
+DNC 1st-5th,LIFE PASS = Leads that were dispositioned 'do not call' (dispoed a status where DNC is set to 'Y' on the statuses section) on or after the first-fifth call attempt, or LIFE if contacted as such at any point ever."); ?>
+DNC RATE 1st-5th,LIFE PASS = Percentage of leads on the list that were 'do not call' on or after the first-fifth call attempt, or LIFE if contacted as such at any point ever."); ?>
+CUST CONTACT 1st-5th,LIFE PASS = Leads that were 'customer contacted' (dispoed a status where CUSTOMER CONTACT is set to 'Y' on the statuses section) on or after the first-fifth call attempt, or LIFE if contacted as such at any point ever."); ?>
+CUCT RATE 1st-5th,LIFE PASS = Percentage of leads on the list that were 'customer contacted' on or after the first-fifth call attempt, or LIFE if contacted as such at any point ever."); ?>
+UNWORKABL 1st-5th,LIFE PASS = Leads that were 'unworkable' (dispoed a status where UNWORKABLE is set to 'Y' on the statuses section) on or after the first-fifth call attempt, or LIFE if contacted as such at any point ever."); ?>
+UNWK RATE 1st-5th,LIFE PASS = Percentage of leads on the list that were 'unworkable' on or after the first-fifth call attempt, or LIFE if contacted as such at any point ever."); ?>
+SCHEDL CB 1st-5th,LIFE PASS = Leads that were 'scheduled callbacks' (dispoed a status where SCHEDULED CALLBACK is set to 'Y' on the statuses section) on or after the first-fifth call attempt, or LIFE if contacted as such at any point ever."); ?>
+SHCB RATE 1st-5th,LIFE PASS = Percentage of leads on the list that were 'scheduled callbacks' on or after the first-fifth call attempt, or LIFE if contacted as such at any point ever."); ?>
+COMPLETED 1st-5th,LIFE PASS = Leads that were 'completed' (dispoed a status where COMPLETED is set to 'Y' on the statuses section) on or after the first-fifth call attempt, or LIFE if contacted as such at any point ever."); ?>
+COMP RATE 1st-5th,LIFE PASS = Percentage of leads on the list that were 'completed' on or after the first-fifth call attempt, or LIFE if contacted as such at any point ever."); ?>
+ + +
+
+ -
+TOTAL LIST ID SUMMARY = Shows each list selected by the user, the count of leads in the list, and whether the list is active or inactive."); ?>
+TOTAL STATUS FLAGS SUMMARY = Shows a breakdown of the status flags for all the selected lists combined. Status flags are set in the 'Statuses' section of a campaign or the 'System Statuses'."); ?>
+LIST ID SUMMARY = Each list selected in the report will be listed separately after the TOTALS summaries. The list summary gives specific information about each particular list."); ?>
+STATUS FLAGS BREAKDOWN = Same as TOTAL STATUS FLAGS SUMMARY, but only for one list."); ?>
+STATUS BREAKDOWN = A breakdown of each status in the individual list, along with the status description, number of leads, and percentage relative to the total leads in the list."); ?>
+ +
+
+ -
+CAMPAIGN = The campaign being reported on."); ?>
+TOTAL CALLS = The number of calls taken either by a campaign or during a time interval during a campaign, depending on the report."); ?>
+SYSTEM RELEASE CALLS = The number of calls terminated by the dialer per campaign or during a time interval for a campaign, depending on the report."); ?>
+AGENT RELEASE CALLS = The number of calls terminated by the agent per campaign or during a time interval for a campaign, depending on the report."); ?>
+SALE CALLS = The number of sales made either on a campaign or during a time interval during a campaign, depending on the report."); ?>
+DNC CALLS = The number of DNC made either on a campaign or during a time interval during a campaign, depending on the report."); ?>
+NO ANSWER PERCENT = The percentage of calls dispositioned as no answer against the TOTAL CALLS."); ?>
+DROP PERCENT = The percentage of calls dispositioned as DROPs against the TOTAL CALLS."); ?>
+AGENT LOGIN TIME (H:M:S) = The total pause, wait, talk, and dispo times logged by agents for the campaign/interval."); ?>
+AGENT PAUSE TIME (H:M:S) = The total pause time logged by agents for the campaign/interval."); ?>
+INTERVAL = The interval (in 'HHii' format) being reported on under the campaign."); ?>
+ +
+
+ -
+CALL HANGUP REASON STATS"); ?>
+HANGUP REASON = The reason the call terminated."); ?>
+CALLS = The number of calls terminated from the aforementioned reason."); ?>
+ +CALL STATUS STATS"); ?>
+STATUS = The call disposition."); ?>
+DESCRIPTION = The description of the status."); ?>
+CATEGORY = The category of the status."); ?>
+CALLS = The number of calls resulting the disposition."); ?>
+CALL TIME - TOTAL TIME = The total time spent on calls resulting in the disposition."); ?>
+CALL TIME - AVG TIME = The average amount of time spent on calls resulting in the disposition."); ?>
+CALL TIME - CALLS/HOUR = The number of calls per hour where the call resulted in the disposition - this is relative to the total time of all dispositions, not just this one."); ?>
+AGENT TIME - CALLS/HOUR = The number of calls per agent hour where the call resulted in the disposition, relative to the total time agents spent in call for all dispositions."); ?>
+ +LIST ID STATS"); ?>
+LIST = The list ID number - all lists meeting the selected criteria are displayed here."); ?>
+CALLS = The number of outbound calls placed from the aforementioned list."); ?>
+ +AGENT PRESET DIALS"); ?>
+PRESET NAME = The preset name logged in the user_call_log table (where applicable) for the outbound calls meeting the selected criteria."); ?>
+CALLS = The number of calls logged with the aforementioned preset."); ?>
+ +CUSTOM STATUS CATEGORY STATS"); ?>
+CATEGORY = The category the custom status is currently assigned to."); ?>
+CALLS = The number of calls logged with the aforementioned category."); ?>
+DESCRIPTION = The description of the category."); ?>
+ +AGENT STATS"); ?>
+AGENT = The user ID and agent involved on outbound calls meeting the selected criteria."); ?>
+CALLS = The number of outbound calls handled by the aforementioned agent."); ?>
+TIME H:M:S = The total amount of time the agent spent on the outbound calls."); ?>
+AVERAGE = The average amount of time the agent spent on the outbound calls."); ?>
+ + +
+
+ -
+ +
+
+ -
+FRONTER STATS"); ?>
+AGENT = The agent making the transfer (fronter)."); ?>
+XFERS = The number of transfers the agent made."); ?>
+SALE % = Percentage of transfers the agent made that resulted in a sale."); ?>
+SALE = Number of sales (dispos where sale='Y' in the 'Statuses' section) made on the agent's transfers."); ?>
+DROP = Number of transfers that were dropped (did not make it to a live closer)."); ?>
+OTHER = Number of transfers that were not dropped, but also not sold by the closer."); ?>
+ +FRONTER STATS"); ?>
+AGENT = The agent receiving the transfer (closer)."); ?>
+CALLS = Total calls answered by the closer."); ?>
+SALE = Number of sales (dispos where sale='Y' in the 'Statuses' section) made on the transfers the closer fielded."); ?>
+DROP = Number of calls the closer received that were dispo'ed as dropped."); ?>
+OTHER = Calls the closer fielded that did not result in sales."); ?>
+CONV % = Percentage of transfers the closer received that resulted in sales."); ?>






diff --git a/www/vicidial/realtime_report.php b/www/vicidial/realtime_report.php index 4839456a..4e0fe363 100644 --- a/www/vicidial/realtime_report.php +++ b/www/vicidial/realtime_report.php @@ -1,7 +1,7 @@ LICENSE: AGPLv2 +# Copyright (C) 2016 Matt Florell LICENSE: AGPLv2 # # live real-time stats for the VICIDIAL Auto-Dialer all servers # @@ -31,12 +31,13 @@ # 141230-0032 - Added code for on-the-fly language translations display # 150307-0823 - Fixes for QXZ # 150804-0953 - Added WHISPER option agent monitoring +# 160227-1157 - Added INGROUPcolorOVERRIDE option # $startMS = microtime(); -$version = '2.12-19'; -$build = '150804-0953'; +$version = '2.12-20'; +$build = '160227-1157'; header ("Content-type: text/html; charset=utf-8"); @@ -104,6 +105,8 @@ if (isset($_GET["PRESETstats"])) {$PRESETstats=$_GET["PRESETstats"];} elseif (isset($_POST["PRESETstats"])) {$PRESETstats=$_POST["PRESETstats"];} if (isset($_GET["AGENTtimeSTATS"])) {$AGENTtimeSTATS=$_GET["AGENTtimeSTATS"];} elseif (isset($_POST["AGENTtimeSTATS"])) {$AGENTtimeSTATS=$_POST["AGENTtimeSTATS"];} +if (isset($_GET["INGROUPcolorOVERRIDE"])) {$INGROUPcolorOVERRIDE=$_GET["INGROUPcolorOVERRIDE"];} + elseif (isset($_POST["INGROUPcolorOVERRIDE"])) {$INGROUPcolorOVERRIDE=$_POST["INGROUPcolorOVERRIDE"];} if (isset($_GET["droppedOFtotal"])) {$droppedOFtotal=$_GET["droppedOFtotal"];} elseif (isset($_POST["droppedOFtotal"])) {$droppedOFtotal=$_POST["droppedOFtotal"];} @@ -294,6 +297,7 @@ $monitor_phone = preg_replace('/[^-_0-9a-zA-Z]/', '', $monitor_phone); $CARRIERstats = preg_replace('/[^-_0-9a-zA-Z]/', '', $CARRIERstats); $PRESETstats = preg_replace('/[^-_0-9a-zA-Z]/', '', $PRESETstats); $AGENTtimeSTATS = preg_replace('/[^-_0-9a-zA-Z]/', '', $AGENTtimeSTATS); +$INGROUPcolorOVERRIDE = preg_replace('/[^-_0-9a-zA-Z]/', '', $INGROUPcolorOVERRIDE); $droppedOFtotal = preg_replace('/[^-_0-9a-zA-Z]/', '', $droppedOFtotal); $stmt="SELECT selected_language from vicidial_users where user='$PHP_AUTH_USER';"; @@ -849,6 +853,17 @@ $select_list .= "