Thanks Chris and Matt for the feedback and encouragement. I think that I've done it! Campaigns go live in the next week and the testing has gone well so far.
a) The Manual/Preview no-hopper dialling did not need any customization. I had not seen that there was already the ability to add multiple Territories per agent. Works well.
b) For the Ratio dialling I did the following:
- Added new Campaign Next Agent Call option: owner_wait_time
- Added lead owner & hopper load datetime columns to vicidial_hopper. Changed AST_VDhopper.pl to only load leads with skills matching agents logged in:
(only key bits of code shown here)- Code: Select all
if ($next_agent_call[$i] == "owner_wait_time")
$stmtA = "select group_concat(agent_territories) from (select agent_territories from vicidial_live_agents vla where campaign_id='$campaign_id[$i]' group by agent_territories) as t;";
$lead_filter_sql[$i] = $lead_filter_sql[$i] . " and '$SBDRterritories' like concat('% ',owner,' %')";
- Added DB event to sort top half of hopper (by assigning priorities up to 49) to make sure that the leads next autodialled match the current agent skills mix.
(This was an attempt at a quick solution, but I then added the changes to hopper load and auto dial which are a neater solution, but I'll leave this in for now.)- Same DB event unloads leads from the hopper if all agents with a skill agents log out. This is to avoid dialling and dropping a lead with no skills match.
- Added a dial_ratio column to vicidial_territories to allow for a different mix of skills when dialling leads
- Changed AST_VDauto_dial.pl to call DB proc to do the "UPDATE vicidial_hopper set status='QUEUE', user='VDAD_$server_ip' ..." part using algorithms to dial only leads with skills matching READY agents and weighting the mix using skills dial_ratio. Since some agents have more than one skill, we can get clever choosing which leads to mix in. Having this logic in a MySQL routine makes it easy to tune, log and extend this:
- Code: Select all
if ($DBIPnext_agent_call[$user_CIPct] =~ /owner_wait_time/i)
$stmtA = "CALL T_owner_auto_dial('$server_ip','$DBIPcampaign[$user_CIPct]','$DBIPmakecalls[$user_CIPct]', \@rtnVal);";
- Changed agi-VDAD_ALL_outbound.agi to call DB proc to do the "UPDATE vicidial_live_agents set status='QUEUE' ..." part. Again, having this algorithm in a proc allows easy tuning and we plan to add smarter call routing by introducing agent Proficiency or Desire to Use settings into the mix at a later stage.
(May use the vicidial_user_territories.level TOP_AGENT/STANDARD_AGENT type logic for this.):
- Code: Select all
if ($CAMP_callorder =~ /owner_wait_time/i)
$stmtA = "CALL T_owner_wait_time('$CIDlead_id','$unique_id','$VARserver_ip','$callerid','$channel','$VDADcampaign', \@rtnVal);";
So, only about 150 lines of extra code (mostly in the stored procs). Took a lot of hours and some middle-of-the-night thinking to get it right, but the agent experience and the stats look good and show that it's working.
Roger
------------------------------------------------------------------------------------------------------
Roger Milligan
Thrive, Cape Town, South Africa.
Mobile: +27 791412325 rogerm(at)thrivedatasolutions(dot)com