Added agent_search_ingroup_list campaign and agent_search_list ingroup options

git-svn-id: svn://192.168.202.10@3762 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
mattf
2023-09-28 01:09:54 +00:00
parent 76e4e35879
commit 014103f66f
7 changed files with 80 additions and 22 deletions
+3
View File
@@ -818,6 +818,9 @@ OTHER CHANGES:
230. Added Per Call Notes Required campaign option.
231. Added Agent Search In-Group List Restrict options, allowing for Lead
Search restrictions on inbound group calls to a single list ID.
@@ -1119,7 +1119,8 @@ custom_four TEXT,
custom_five TEXT,
dead_stop_recording ENUM('DISABLED','ALL_CALLS','OUTBOUND_ONLY','INBOUND_ONLY','AUTODIAL_ONLY','MANUAL_ONLY') default 'DISABLED',
manual_vm_status_updates ENUM('ENABLED','DISABLED') default 'ENABLED',
force_per_call_notes ENUM('DISABLED','ENABLED','5_CHARACTERS','15_CHARACTERS','30_CHARACTERS','100_CHARACTERS') default 'DISABLED'
force_per_call_notes ENUM('DISABLED','ENABLED','5_CHARACTERS','15_CHARACTERS','30_CHARACTERS','100_CHARACTERS') default 'DISABLED',
agent_search_ingroup_list ENUM('DISABLED','ENABLED','ENABLED_OVERRIDE') default 'DISABLED'
) ENGINE=MyISAM;
CREATE TABLE vicidial_lists (
@@ -1443,7 +1444,8 @@ third_alert_trigger_seconds INT(6) default '600',
third_alert_filename VARCHAR(100) default '',
third_alert_delay INT(6) default '1000',
third_alert_container VARCHAR(40) default 'DISABLED',
third_alert_only VARCHAR(40) default 'DISABLED'
third_alert_only VARCHAR(40) default 'DISABLED',
agent_search_list VARCHAR(20) default ''
) ENGINE=MyISAM;
CREATE TABLE vicidial_stations (
@@ -5439,4 +5441,4 @@ INSERT INTO `wallboard_reports` VALUES ('AGENTS_AND_QUEUES','Agents and Queues',
UPDATE system_settings set vdc_agent_api_active='1';
UPDATE system_settings SET db_schema_version='1695',db_schema_update_date=NOW(),reload_timestamp=NOW();
UPDATE system_settings SET db_schema_version='1696',db_schema_update_date=NOW(),reload_timestamp=NOW();
+6
View File
@@ -2415,3 +2415,9 @@ ALTER TABLE vicidial_user_groups MODIFY allowed_reports VARCHAR(4000) default 'A
ALTER TABLE system_settings MODIFY reports_use_slave_db VARCHAR(4000) default '';
UPDATE system_settings SET db_schema_version='1695',db_schema_update_date=NOW() where db_schema_version < 1695;
ALTER TABLE vicidial_campaigns ADD agent_search_ingroup_list ENUM('DISABLED','ENABLED','ENABLED_OVERRIDE') default 'DISABLED';
ALTER TABLE vicidial_inbound_groups ADD agent_search_list VARCHAR(20) default '';
UPDATE system_settings SET db_schema_version='1696',db_schema_update_date=NOW() where db_schema_version < 1696;
+32 -4
View File
@@ -538,10 +538,11 @@
# 230523-0827 - Added User inbound_credits feature
# 230617-1605 - Fix for issue when agent goes ready, one of the fixes from Issue #1473
# 230801-0810 - More useful error output for manDiaLskip
# 230927-2037 - Added agent_search_ingroup_list campaign and agent_search_list ingroup options
#
$version = '2.14-431';
$build = '230801-0810';
$version = '2.14-432';
$build = '230927-2037';
$php_script = 'vdc_db_query.php';
$mel=1; # Mysql Error Log enabled = 1
$mysql_log_count=913;
@@ -858,6 +859,8 @@ if (isset($_GET["calls_waiting_vl_twoLABEL"])) {$calls_waiting_vl_twoLABEL=$_G
elseif (isset($_POST["calls_waiting_vl_twoLABEL"])) {$calls_waiting_vl_twoLABEL=$_POST["calls_waiting_vl_twoLABEL"];}
if (isset($_GET["pause_max_url_trigger"])) {$pause_max_url_trigger=$_GET["pause_max_url_trigger"];}
elseif (isset($_POST["pause_max_url_trigger"])) {$pause_max_url_trigger=$_POST["pause_max_url_trigger"];}
if (isset($_GET["inbound_ingroup"])) {$inbound_ingroup=$_GET["inbound_ingroup"];}
elseif (isset($_POST["inbound_ingroup"])) {$inbound_ingroup=$_POST["inbound_ingroup"];}
$DB=preg_replace("/[^0-9a-zA-Z]/","",$DB);
$user=preg_replace("/\'|\"|\\\\|;| /","",$user);
@@ -1253,6 +1256,7 @@ if ($non_latin < 1)
$search = preg_replace('/[^-_0-9a-zA-Z]/','',$search);
$sub_status = preg_replace('/[^-_0-9a-zA-Z]/','',$sub_status);
$user_group = preg_replace('/[^-_0-9a-zA-Z]/','',$user_group);
$inbound_ingroup = preg_replace('/[^-_0-9a-zA-Z]/','',$inbound_ingroup);
$calls_waiting_vl_oneLABEL = preg_replace('/[^-, _0-9a-zA-Z]/','',$calls_waiting_vl_oneLABEL);
$calls_waiting_vl_twoLABEL = preg_replace('/[^-, _0-9a-zA-Z]/','',$calls_waiting_vl_twoLABEL);
}
@@ -1282,6 +1286,7 @@ else
$search = preg_replace('/[^-_0-9\p{L}]/u','',$search);
$sub_status = preg_replace('/[^-_0-9\p{L}]/u','',$sub_status);
$user_group = preg_replace('/[^-_0-9\p{L}]/u','',$user_group);
$inbound_ingroup = preg_replace('/[^-_0-9\p{L}]/u','',$inbound_ingroup);
$calls_waiting_vl_oneLABEL = preg_replace('/[^-, _0-9\p{L}]/u','',$calls_waiting_vl_oneLABEL);
$calls_waiting_vl_twoLABEL = preg_replace('/[^-, _0-9\p{L}]/u','',$calls_waiting_vl_twoLABEL);
}
@@ -18551,7 +18556,7 @@ if ($ACTION == 'SEARCHRESULTSview')
$ALLpostal_code = array();
$ALLvendor_lead_code = array();
$stmt="SELECT agent_lead_search_method,manual_dial_list_id from vicidial_campaigns where campaign_id='$campaign';";
$stmt="SELECT agent_lead_search_method,manual_dial_list_id,agent_search_ingroup_list from vicidial_campaigns where campaign_id='$campaign';";
if ($non_latin > 0) {$rslt=mysql_to_mysqli("SET NAMES 'UTF8'", $link);}
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00374',$user,$server_ip,$session_name,$one_mysql_log);}
@@ -18561,6 +18566,7 @@ if ($ACTION == 'SEARCHRESULTSview')
$row=mysqli_fetch_row($rslt);
$agent_lead_search_method = $row[0];
$manual_dial_list_id = $row[1];
$agent_search_ingroup_list = $row[2];
$searchSQL='';
$searchmethodSQL='';
@@ -18753,6 +18759,27 @@ if ($ACTION == 'SEARCHRESULTSview')
$searchmethodSQL=" and list_id IN($camp_lists)";
}
if ( ($inbound_lead_search > 0) and ( ($agent_search_ingroup_list == 'ENABLED') or ($agent_search_ingroup_list == 'ENABLED_OVERRIDE') ) )
{
if (strlen($inbound_ingroup) > 0)
{
$stmt="SELECT agent_search_list from vicidial_inbound_groups where group_id='$inbound_ingroup' and agent_search_list != '';";
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);}
$igs_to_parse = mysqli_num_rows($rslt);
if ($igs_to_parse > 0)
{
$rowx=mysqli_fetch_row($rslt);
if (strlen($rowx[0]) > 1)
{
if ($agent_search_ingroup_list == 'ENABLED')
{$searchmethodSQL .= " and list_id='$rowx[0]'";}
if ($agent_search_ingroup_list == 'ENABLED_OVERRIDE')
{$searchmethodSQL = " and list_id='$rowx[0]'";}
}
}
}
}
##### BEGIN search queries and output #####
$stmt="SELECT count(*) from vicidial_list where $searchSQL $searchownerSQL $searchmethodSQL;";
@@ -18921,7 +18948,7 @@ if ($ACTION == 'SEARCHCONTACTSRESULTSview')
if (strlen($stage) < 3)
{$stage = '670';}
$stmt="SELECT agent_lead_search_method,manual_dial_list_id from vicidial_campaigns where campaign_id='$campaign';";
$stmt="SELECT agent_lead_search_method,manual_dial_list_id,agent_search_ingroup_list from vicidial_campaigns where campaign_id='$campaign';";
if ($non_latin > 0) {$rslt=mysql_to_mysqli("SET NAMES 'UTF8'", $link);}
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00431',$user,$server_ip,$session_name,$one_mysql_log);}
@@ -18931,6 +18958,7 @@ if ($ACTION == 'SEARCHCONTACTSRESULTSview')
$row=mysqli_fetch_row($rslt);
$agent_lead_search_method = $row[0];
$manual_dial_list_id = $row[1];
$agent_search_ingroup_list = $row[2];
$searchSQL='';
$searchmethodSQL='';
+7 -3
View File
@@ -724,10 +724,11 @@
# 230523-0826 - Added User inbound_credits feature
# 230615-0842 - Added dead_stop_recording feature
# 230810-1652 - Added force_per_call_notes campaign setting
# 230927-2036 - Added agent_search_ingroup_list campaign and agent_search_list ingroup options
#
$version = '2.14-691c';
$build = '230810-1652';
$version = '2.14-692c';
$build = '230927-2036';
$php_script = 'vicidial.php';
$mel=1; # Mysql Error Log enabled = 1
$mysql_log_count=103;
@@ -5900,6 +5901,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
var owner_populate='<?php echo $owner_populate ?>';
var qc_enabled='<?php echo $qc_enabled ?>';
var inbound_lead_search=0;
var inbound_ingroup='';
var VU_agent_choose_ingroups_skip_count=0;
var mrglock_ig_select_ct='<?php echo $mrglock_ig_select_ct ?>';
var agent_select_territories_skip_count=0;
@@ -15770,6 +15772,7 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
// set phone number in search box to number of live inbound call
document.vicidial_form.search_phone_number.value=document.vicidial_form.phone_number.value;
inbound_lead_search=1;
inbound_ingroup = group;
}
else
{
@@ -16508,6 +16511,7 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
document.vicidial_form.MDType.value = '';
document.vicidial_form.MDPhonENumbeRHiddeN.value = '';
inbound_lead_search=0;
inbound_ingroup='';
cid_lock=0;
timer_alt_trigger=0;
last_mdtype='';
@@ -19614,7 +19618,7 @@ function phone_number_format(formatphone) {
}
if (xmlhttp)
{
LSview_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=SEARCHRESULTSview&format=text&user=" + user + "&pass=" + pass + "&conf_exten=" + session_id + "&extension=" + extension + "&protocol=" + protocol + "&phone_number=" + document.vicidial_form.search_phone_number.value + "&lead_id=" + document.vicidial_form.search_lead_id.value + "&vendor_lead_code=" + document.vicidial_form.search_vendor_lead_code.value + "&first_name=" + document.vicidial_form.search_first_name.value + "&last_name=" + document.vicidial_form.search_last_name.value + "&city=" + document.vicidial_form.search_city.value + "&state=" + document.vicidial_form.search_state.value + "&postal_code=" + document.vicidial_form.search_postal_code.value + "&search=" + phone_search_fields + "&campaign=" + campaign + "&inbound_lead_search=" + inbound_lead_search + "&manual_dial_filter=" + agentcall_manual + "&stage=<?php echo $HCwidth ?>";
LSview_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=SEARCHRESULTSview&format=text&user=" + user + "&pass=" + pass + "&conf_exten=" + session_id + "&extension=" + extension + "&protocol=" + protocol + "&phone_number=" + document.vicidial_form.search_phone_number.value + "&lead_id=" + document.vicidial_form.search_lead_id.value + "&vendor_lead_code=" + document.vicidial_form.search_vendor_lead_code.value + "&first_name=" + document.vicidial_form.search_first_name.value + "&last_name=" + document.vicidial_form.search_last_name.value + "&city=" + document.vicidial_form.search_city.value + "&state=" + document.vicidial_form.search_state.value + "&postal_code=" + document.vicidial_form.search_postal_code.value + "&search=" + phone_search_fields + "&campaign=" + campaign + "&inbound_lead_search=" + inbound_lead_search + "&inbound_ingroup=" + inbound_ingroup + "&manual_dial_filter=" + agentcall_manual + "&stage=<?php echo $HCwidth ?>";
xmlhttp.open('POST', 'vdc_db_query.php');
xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8');
xmlhttp.send(LSview_query);
File diff suppressed because one or more lines are too long
@@ -1,4 +1,4 @@
# version: 20230912105201
# version: 20230927090101
users-user User ID <QXZ>This field is where you put the users ID number, can be up to 20 digits in length, Must be at least 2 characters in length. We strongly recommend not reusing user accounts for different users, for reporting accuracy. To disable a user account, set the Active option to -N-.</QXZ>
users-pass Password <QXZ>This field is where you put the users password. Must be at least 2 characters in length, unless the User Password Minimum Length system setting is enabled, which will require a longer password. Only letters and numbers are allowed in user passwords. A medium strength user password will be at least 10 characters in length, and a strong user password will be at least 20 characters in length and have letters as well as at least one number. It is recommended that you use a longer password if possible, stringing together several unrelated words with no spaces, and a number somewhere in the string. The maximum size of a password is 100 characters.</QXZ>
users-force_change_password Force Change Password <QXZ>If this option is set to Y then the user will be prompted to change their password the next time they log in to the administration webpage or the agent screen. Default is N.</QXZ>
@@ -273,6 +273,7 @@ campaigns-qc_comment_history QC Comments History <QXZ>Setting this option to AUT
campaigns-hide_call_log_info Hide Call Log Info <QXZ>Enabling this option will hide any call log or call count information when lead information is displayed on the agent screen. Using one of the SHOW options will show the last X number of calls to a lead in the call log section of the lead info view. Default is N.</QXZ>
campaigns-agent_lead_search Agent Lead Search <QXZ>Setting this option to ENABLED will allow agents to search for leads and view lead information while paused in the agent interface. Also, if the Agent User Group is allowed to view Call Logs then the agent will be able to view past call notes for any lead that they are viewing information on. Default is DISABLED. LIVE_CALL_INBOUND will allow search for a lead while on an inbound call only. LIVE_CALL_INBOUND_AND_MANUAL will allow search for a lead while on an inbound call or while paused. When Lead Search is used on a live inbound call, the lead of the call when it went to the agent will be changed to a status of LSMERG, and the logs for the call will be modified to link to the agent selected lead instead.</QXZ>
campaigns-agent_lead_search_method Agent Lead Search Method <QXZ>If Agent Lead Search is enabled, this setting defines where the agent will be allowed to search for leads. SYSTEM will search the entire system, CAMPAIGNLISTS will search inside all of the active lists within the campaign, CAMPLISTS_ALL will search inside all of the active and inactive lists within the campaign, LIST will search only within the Manual Dial List ID as defined in the campaign. Default is CAMPLISTS_ALL. One of these options with USER_ in front will only search within leads that have the owner field matching the user ID of the agent, the options with GROUP_ in front will only search within leads that have the owner field matching the user group that the user is a member of, the options with TERRITORY_ in front will only search within leads that have the owner field matching the territories that the agent has selected.</QXZ>
campaigns-agent_search_ingroup_list Agent Search In-Group List Restrict <QXZ>If this setting is enabled, and if the agent receives an inbound call, and if the In-Group for that inbound call has the Agent Screen Search List Restrict option enabled, then this will restrict the Agent Lead Search results to only leads in that specific list for that call. The ENABLED_OVERRIDE option will override the existing Agent Lead Search Method and replace it with the List ID restriction only, if applicable. Default is DISABLED.</QXZ>
campaigns-campaign_script Campaign Script <QXZ>This menu allows you to choose the script that will appear on the agents screen for this campaign. Select NONE to show no script for this campaign.</QXZ>
campaigns-clear_script Clear Script <QXZ>This option if enabled will clear the agent SCRIPT tab after a call has been dispositioned by the agent. Default is DISABLED.</QXZ>
campaigns-user_group_script User Group Script Override <QXZ>Enabling this setting will allow the User Group setting for a selected Script to override all other script settings for the agent that are set at the Campaign, List or In-Group levels. If no Script is set at the User Group level, then it will be ignored. Default is DISABLED.</QXZ>
@@ -630,6 +631,7 @@ inbound_groups-closing_time_option_callmenu Closing Time Option Callmenu <QXZ>If
inbound_groups-closing_time_option_voicemail Closing Time Option Voicemail <QXZ>If Closing Time Option is set to VOICEMAIL, this is the voicemail box that the call will be sent to if the Closing Time is reached. In an AGENTDIRECT in-group, setting this to AGENTVMAIL will select the User voicemail ID to use.</QXZ>
inbound_groups-closing_time_option_xfer_group Closing Time Option Transfer In-Group <QXZ>If Closing Time Option is set to IN_GROUP, this is the inbound group that the call will be sent to if the Closing Time is reached.</QXZ>
inbound_groups-closing_time_option_callback_list_id Closing Time Option Callback List ID <QXZ>If Closing Time Option is set to CALLERID_CALLBACK, this is the List ID the call is added to as a new lead if the Closing Time is reached.</QXZ>
inbound_groups-agent_search_list Agent Screen Search List Restrict <QXZ>If this field is populated with a List ID, and the campaign Agent Search In-Group List Restrict setting is enabled, and an agent receives a call from this In-Group, when they use the Lead Search function in their agent screen the results will be restricted to leads within this list ID. Default is blank for disabled.</QXZ>
inbound_groups-agent_alert_exten Agent Alert Filename <QXZ>The audio file to play to an agent to announce that a call is coming to the agent. To not use this function set this to X. Default is ding.</QXZ>
inbound_groups-agent_alert_delay Agent Alert Delay <QXZ>The length of time in milliseconds to wait before sending the call to the agent after playing the on Agent Alert Extension. Default is 1000.</QXZ>
inbound_groups-second_alert_trigger Second Agent Alert Trigger <QXZ>If enabled, this feature will play an audio alert if the trigger conditions are met. The PHONE option will check for a previous phone call from the same customer phone number being handled in this In-Group within a specified recent timeframe, defined by the Second Agent Alert Trigger Seconds setting below. The LEAD_ID option will check for a previous phone call by the same specific customer lead being handled in this In-Group within a specified recent timeframe. If the option has TO in it, then only calls that reached the end of their Drop Seconds timeout will be counted for the trigger. If the option has NQ in it, then calls that were handled No-Agent-No-Queue will also be counted for the trigger. Default is DISABLED.</QXZ>