by schernit » Sat Oct 23, 2010 10:10 am
Matt,
We have MANUAL OR INBOUND-MAN outbound campaigns to sale different products. When we insert records on vicidial_list we may know what records has better possibilities to be a SALE so we could categorize them with a rank (0 - bad record / 10 very good record).
So, We want that leads on hopper be sent to better agents (the one that has better sale skill). We think It can improve sales and well use of leads.
What I was thinking is:
- Hopper works exactly on same way as usual (just add rank column on hopper table)
- Process that select what lead to be sent to an agent can select lead_id from hopper looking for agent Rank and lead_id rank. I think It should only affect vdc_db_query.php method: manDiaLnextCaLL
--------------
$stmt = "UPDATE vicidial_hopper set status='QUEUE', user='$user' where campaign_id='$campaign' and status='READY' order by priority desc,hopper_id LIMIT 1";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00024',$user,$server_ip,$session_name,$one_mysql_log);}
$affected_rows = mysql_affected_rows($link);
--------------
With samething like this:
--------------
$stmt = "UPDATE vicidial_hopper set status='QUEUE', user='$user' where campaign_id='$campaign' and status='READY' and rank <= '$userRank' order by rank desc, priority desc,hopper_id LIMIT 1"; ## rank is a new column on hopper table
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00024',$user,$server_ip,$session_name,$one_mysql_log);}
$affected_rows = mysql_affected_rows($link);
if ($affected_rows<1){
## no records with that rank. Need to take a higher hopper rank
$stmt = "UPDATE vicidial_hopper set status='QUEUE', user='$user' where campaign_id='$campaign' and status='READY' and rank > '$userRank' order by rank, priority desc,hopper_id LIMIT 1"; ## rank is a new column on hopper table
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00024',$user,$server_ip,$session_name,$one_mysql_log);}
$affected_rows = mysql_affected_rows($link);
}
--------------
What do you think of this feature ?