Page 1 of 1
automatic list reset option to List Modification screen
Posted:
Fri Mar 05, 2010 2:35 pm
by omarrodriguezt
Hello,
I want to be able to automatic reset a list every time that the dial able leads raise to 0.
I have the new version 2.20 and I read that there is an automatic list reset option to List Modification screen.
Can you please enlighten me?
Posted:
Fri Mar 05, 2010 10:58 pm
by williamconley
Reset Times - This field allows you to put times in, separated by a dash-, that this list will be automatically reset by the system. The times must be in 24 hour format with no punctuation, for example 0800-1700 would reset the list at 8AM and 5PM every day. Default is empty.
otherwise, of course, you can run a script every 1,5 or 10 minutes and check and if any campaigns have "0" dialable leads, reset the lists for that campaign.
Thank you
Posted:
Sat Mar 06, 2010 9:48 am
by omarrodriguezt
Thank you for post.
I already read this in the help link, but that means that every time that the lead gets to 0 in this interval the time the list will be reset automatically?
Posted:
Sat Mar 06, 2010 11:45 am
by williamconley
no omar. it means what it says. the auto-reset function is TIMED. not based on the count. sorry to disappoint.
you want it based on the count ... all you have to do is write a script to CHECK the count and reset when 0.
Ok.
Posted:
Mon Mar 08, 2010 7:59 am
by omarrodriguezt
Ok. Thank you william.
I just add a new message in the Vicidial Issue Tracker in order to suggest a new feature that can reset the active lists when dial able leads gets 0.
I was thinking in modify AST_timeonVDADall.php or write a trigger in mysql, any suggestion?
Posted:
Mon Mar 08, 2010 9:12 am
by mflorell
As long as you can guarantee that only one person is using the Real-Time screen that might work, I wouldn't do it though.
Posted:
Mon Mar 08, 2010 9:18 am
by williamconley
i would not put it in one of the agi's or a trigger (it would get used too often)
i WOULD put in a timed perl or bash script (check every 5 minutes).
Ok.
Posted:
Mon Mar 08, 2010 10:38 am
by omarrodriguezt
5 minutes its a lot of time for us.
Just think about this scenario: 40 agents, waiting 5 minutes for a call?
But may be the same script running every minute??
Posted:
Mon Mar 08, 2010 10:51 am
by williamconley
you could try every minute AND you could set it to "reset" when you have less leads in your "list" than you do in your "hopper" (instead of "0).
But watch your load!
If your hopper is set at 500, set it to "reset" your list at 499. Of course, if you're ambitious you could play with setting it to reset when there are still 1000 or more (depending on the size of your lists) especially if you have a method of seeing to it that your lists are called in a way that the lead who has not been called in the longest time is the first one called. If you don't have such a method ... those last leads will never get called, of course, unless you increase your hopper.
remember that the hopper includes all lists in a campaign.
Ok.
Posted:
Tue Mar 09, 2010 6:37 am
by omarrodriguezt
I will try and let you know.
Thank you!
Patch Status Done
Posted:
Mon Apr 12, 2010 9:50 am
by omarrodriguezt
Patch Status: Done
I just added a piece of code in order to have this feature ready.
Matt, would be great if this feature can be added to the next release.
You can see all the files and the details here:
http://www.vicidial.org/VICIDIALmantis/view.php?id=318
Any question feel free to ask.
Re: automatic list reset option to List Modification screen
Posted:
Sun Apr 28, 2013 4:16 pm
by williamconley
We now have a mod that will reset lists when empty!
Requires only a change to the hopper script, no admin changes required. Add the word "auto" to the reset times and it just works. LOL
hopper script at line 1875 in svn Revision: 1912:
- Code: Select all
##### UPDATE the leads to be dialed for this campaign #####
if ( ($campaign_leads_to_call[$i] < 1) && ($rec_ct[$i] < 1) )
{
if ($DB) {print " NO DIALABLE LEADS FOR THIS CAMPAIGN\n";}
if ($VCSdialable_leads[$i] > 0)
{
$stmtA = "UPDATE vicidial_campaign_stats SET dialable_leads='0' where campaign_id='$campaign_id[$i]';";
$affected_rows = $dbhA->do($stmtA);
if ($DBX) {print "CAMPAIGN STATS: $affected_rows|$stmtA|\n";}
#### Added by PoundTeam for Auto List Reset
$stmtA = "UPDATE vicidial_list L inner join vicidial_lists S on S.list_id=L.list_id SET called_since_last_reset='N' where S.campaign_id='$campaign_id[$i]' and upper(S.reset_time) like '%AUTO%';";
$affected_rows = $dbhA->do($stmtA);
$event_string = "|$campaign_id[$i]|Reset Lists: $stmtA|";
if ($DBX) {print "$event_string\n";}
&event_logger;
#### End Added by PoundTeam for Auto List Reset
Only add the "Added by PoundTeam" section, of course, the rest is there for "where do I put this".
Re: automatic list reset option to List Modification screen
Posted:
Thu May 02, 2013 2:39 pm
by omarrodriguezt
Thank you!
The idea we proposed before was added to the Vicidial. Thats community support.
Re: automatic list reset option to List Modification screen
Posted:
Fri May 03, 2013 5:51 am
by DomeDan
I do not really like the idea of a automatically list reset function, but I see that its quite handy if you dont want to get disturbed every time the list runs empty.
I tried it out, but I want a mail to be sent out to team-leaders and managers where Obi-Wan tells them about a disturbance in the force.
When I was testing this out I found that I
have to disable lead recycle for the campaign! because of this is a previous if-statement:
&& ($rec_ct[$i] < 1)Here is the code, added right under williams code as you can see from the first line here:
- Code: Select all
#### End Added by PoundTeam for Auto List Reset
#### Added by DomeDan to send mail if list was reset
use Mail::Sendmail;
%mail = (
From => 'root@localhost',
To => 'domedan@localhost',
Cc => 'domedan@mailinator.com',
Subject => "Auto List Reset for campaign $campaign_id[$i]",
Message => "The list/lists for campaign $campaign_id[$i] was automatically reset due to no dialable leads.\n\nObi-Wan: I felt a great disturbance in the Force, as if $affected_rows of voices suddenly cried out in terror."
);
sendmail(%mail) or die $Mail::Sendmail::error;
if ($DB) {print "Mail sent. Log says:\n", $Mail::Sendmail::log;}
#### End Added by DomeDan to send mail if list was reset
From
root@localhost.site Fri May 3 12:48:02 2013
X-Original-To: domedan@localhost
Delivered-To:
domedan@localhost.siteCc:
domedan@mailinator.comSubject: Auto List Reset for campaign 98
Date: Fri, 3 May 2013 12:48:01 +0200
Mime-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
To:
domedan@localhost.siteContent-Transfer-Encoding: quoted-printable
From:
root@localhost.siteThe list/lists for campaign 98 was automatically reset due to no dialable leads.
Obi-Wan: I felt a great disturbance in the Force, as if 100 of voices suddenly cried out in terror.
Re: automatic list reset option to List Modification screen
Posted:
Fri May 03, 2013 2:12 pm
by omarrodriguezt
Hello DomeDan,
Did you try the patch I submitted?
Re: automatic list reset option to List Modification screen
Posted:
Sat May 04, 2013 2:00 am
by DomeDan
Hi, I didn't read through the post so I missed your patch,
took a fast look now and its seams better because the code is added before && ($rec_ct[$i] < 1)
Re: automatic list reset option to List Modification screen
Posted:
Sat May 04, 2013 8:31 am
by omarrodriguezt
Sounds good!
Thank you.
Vicidial Team, it is possible to include a this code in the next version?
Re: automatic list reset option to List Modification screen
Posted:
Sun May 05, 2013 9:39 am
by mflorell
Would need to have an updated patch file on the issue tracker before we would review it.
Re: automatic list reset option to List Modification screen
Posted:
Mon May 06, 2013 7:05 am
by omarrodriguezt
Sounds good!
Re: automatic list reset option to List Modification screen
Posted:
Tue Jun 04, 2013 9:31 am
by williamconley
Upgrade to auto list reset for those who use call times to limit available leads: This modification will NOT reset the list if the server time is outside the "call_times" for this campaign. The client had this created to avoid nightly resets when the list zero'd. The first 9 lines are there to show where in the hopper script this code should be inserted.
- Code: Select all
##### UPDATE the leads to be dialed for this campaign #####
if ( ($campaign_leads_to_call[$i] < 1) && ($rec_ct[$i] < 1) )
{
if ($DB) {print " NO DIALABLE LEADS FOR THIS CAMPAIGN (Previous: $VCSdialable_leads[$i])\n";}
if ($VCSdialable_leads[$i] > 0)
{
$stmtA = "UPDATE vicidial_campaign_stats SET dialable_leads='0' where campaign_id='$campaign_id[$i]';";
$affected_rows = $dbhA->do($stmtA);
if ($DBX) {print "CAMPAIGN STATS: $affected_rows|$stmtA|\n";}
#### Added by PoundTeam for Auto List Reset
if ($DBX) {print "---------------Campaign $campaign_id[$i] has just hit Zero: checking for Auto Reset ---------------------\n";}
### Check against calltime, extracted/modified from AST_VDsales_export.pl
$within_calltime = 1;
$CThourminute = "$hour$min";
$CTstart = $Gct_default_start;
$CTstop = $Gct_default_stop;
if ( ($wday == 0) && ( ($Gct_sunday_start > 0) && ($Gct_sunday_stop > 0) ) )
{$CTstart = $Gct_sunday_start; $CTstop = $Gct_sunday_stop;}
if ( ($wday == 1) && ( ($Gct_monday_start > 0) && ($Gct_monday_stop > 0) ) )
{$CTstart = $Gct_monday_start; $CTstop = $Gct_monday_stop;}
if ( ($wday == 2) && ( ($Gct_tuesday_start > 0) && ($Gct_tuesday_stop > 0) ) )
{$CTstart = $Gct_tuesday_start; $CTstop = $Gct_tuesday_stop;}
if ( ($wday == 3) && ( ($Gct_wednesday_start > 0) && ($Gct_wednesday_stop > 0) ) )
{$CTstart = $Gct_wednesday_start; $CTstop = $Gct_wednesday_stop;}
if ( ($wday == 4) && ( ($Gct_thursday_start > 0) && ($Gct_thursday_stop > 0) ) )
{$CTstart = $Gct_thursday_start; $CTstop = $Gct_thursday_stop;}
if ( ($wday == 5) && ( ($Gct_friday_start > 0) && ($Gct_friday_stop > 0) ) )
{$CTstart = $Gct_friday_start; $CTstop = $Gct_friday_stop;}
if ( ($wday == 6) && ( ($Gct_saturday_start > 0) && ($Gct_saturday_stop > 0) ) )
{$CTstart = $Gct_saturday_start; $CTstop = $Gct_saturday_stop;}
if ( ($CThourminute < $CTstart) || ($CThourminute > $CTstop) )
{
if ($DB > 0) {print "System Time is outside of Campaign call time: $CThourminute|$Cwday| |$CTstart|$CTstop| \n";}
$within_calltime=0;
}
else
{
$stmtA = "UPDATE vicidial_list L inner join vicidial_lists S on S.list_id=L.list_id SET called_since_last_reset='N' where S.campaign_id='$campaign_id[$i]' and upper(S.reset_time) like '%AUTO%';";
$affected_rows = $dbhA->do($stmtA);
$event_string = "|$campaign_id[$i]|$stmtA|Reset Lists: $affected_rows|";
if ($DBX) {print "$event_string\n";}
}
### End Calltime check
if ($DBX) {print "---------------Campaign $campaign_id[$i] Completed checking for Auto Reset ---------------------\n";}
&event_logger;
#### End Added by PoundTeam for Auto List Reset
This leads to the ability to use more than one "code" to signify whether the call times should apply or not. for instance "auto" vs "autoCT" could be used for auto without call time check and auto WITH call time check, with slight modifications to the code.
Re: automatic list reset option to List Modification screen
Posted:
Sun Jun 28, 2015 6:59 pm
by greenhunter
williamconley wrote:Upgrade to auto list reset for those who use call times to limit available leads: This modification will NOT reset the list if the server time is outside the "call_times" for this campaign. The client had this created to avoid nightly resets when the list zero'd. The first 9 lines are there to show where in the hopper script this code should be inserted.
- Code: Select all
##### UPDATE the leads to be dialed for this campaign #####
if ( ($campaign_leads_to_call[$i] < 1) && ($rec_ct[$i] < 1) )
{
if ($DB) {print " NO DIALABLE LEADS FOR THIS CAMPAIGN (Previous: $VCSdialable_leads[$i])\n";}
if ($VCSdialable_leads[$i] > 0)
{
$stmtA = "UPDATE vicidial_campaign_stats SET dialable_leads='0' where campaign_id='$campaign_id[$i]';";
$affected_rows = $dbhA->do($stmtA);
if ($DBX) {print "CAMPAIGN STATS: $affected_rows|$stmtA|\n";}
#### Added by PoundTeam for Auto List Reset
if ($DBX) {print "---------------Campaign $campaign_id[$i] has just hit Zero: checking for Auto Reset ---------------------\n";}
### Check against calltime, extracted/modified from AST_VDsales_export.pl
$within_calltime = 1;
$CThourminute = "$hour$min";
$CTstart = $Gct_default_start;
$CTstop = $Gct_default_stop;
if ( ($wday == 0) && ( ($Gct_sunday_start > 0) && ($Gct_sunday_stop > 0) ) )
{$CTstart = $Gct_sunday_start; $CTstop = $Gct_sunday_stop;}
if ( ($wday == 1) && ( ($Gct_monday_start > 0) && ($Gct_monday_stop > 0) ) )
{$CTstart = $Gct_monday_start; $CTstop = $Gct_monday_stop;}
if ( ($wday == 2) && ( ($Gct_tuesday_start > 0) && ($Gct_tuesday_stop > 0) ) )
{$CTstart = $Gct_tuesday_start; $CTstop = $Gct_tuesday_stop;}
if ( ($wday == 3) && ( ($Gct_wednesday_start > 0) && ($Gct_wednesday_stop > 0) ) )
{$CTstart = $Gct_wednesday_start; $CTstop = $Gct_wednesday_stop;}
if ( ($wday == 4) && ( ($Gct_thursday_start > 0) && ($Gct_thursday_stop > 0) ) )
{$CTstart = $Gct_thursday_start; $CTstop = $Gct_thursday_stop;}
if ( ($wday == 5) && ( ($Gct_friday_start > 0) && ($Gct_friday_stop > 0) ) )
{$CTstart = $Gct_friday_start; $CTstop = $Gct_friday_stop;}
if ( ($wday == 6) && ( ($Gct_saturday_start > 0) && ($Gct_saturday_stop > 0) ) )
{$CTstart = $Gct_saturday_start; $CTstop = $Gct_saturday_stop;}
if ( ($CThourminute < $CTstart) || ($CThourminute > $CTstop) )
{
if ($DB > 0) {print "System Time is outside of Campaign call time: $CThourminute|$Cwday| |$CTstart|$CTstop| \n";}
$within_calltime=0;
}
else
{
$stmtA = "UPDATE vicidial_list L inner join vicidial_lists S on S.list_id=L.list_id SET called_since_last_reset='N' where S.campaign_id='$campaign_id[$i]' and upper(S.reset_time) like '%AUTO%';";
$affected_rows = $dbhA->do($stmtA);
$event_string = "|$campaign_id[$i]|$stmtA|Reset Lists: $affected_rows|";
if ($DBX) {print "$event_string\n";}
}
### End Calltime check
if ($DBX) {print "---------------Campaign $campaign_id[$i] Completed checking for Auto Reset ---------------------\n";}
&event_logger;
#### End Added by PoundTeam for Auto List Reset
This leads to the ability to use more than one "code" to signify whether the call times should apply or not. for instance "auto" vs "autoCT" could be used for auto without call time check and auto WITH call time check, with slight modifications to the code.
where i can put this
Re: automatic list reset option to List Modification screen
Posted:
Mon Jun 29, 2015 10:01 pm
by williamconley
You only copied some of the post. The parts you didn't copy included the notation that this goes in the keepalive script (which is in /usr/share/astguiclient). Of course, that was written a while ago, so the location to land the code may have changed. You may want to pull the old file and find where it went then and use that to properly locate where that section is in Today's Code unless you happen to have an old server.
Re: automatic list reset option to List Modification screen
Posted:
Tue Jul 05, 2016 3:39 pm
by Noah
UPDATED 9-29-2016
Tweaked the idea from 0 dialable in the hopper for a campaign to 0 dialable in the array of lists for that campaign.
This is NOT a copy and paste piece of code, but a guide to add code to the hopper script if you wanted to engage this Auto reset function in list by list.
The feature uses the same setting field, reset time, if that has AUTO in the field it will engage a reset of called_since_last_reset = N if the dialable leads in that list go to 0.
Something that can be very useful, should be used with caution, depending on the size of your list and the frequency in which the list could be reset.
Each section can be copied and pasted where the below starts with # BEGIN Added by MyCallCloud... and ends with # END Added by MyCallCloud
This is line 2440 today - this section ##### Get count of leads that are dialable ##### currently exists in the hopper script.
##### Get count of leads that are dialable #####
if ($list_order_mix[$i] =~ /DISABLED/)
{
$stmtA = "SELECT count(*) FROM vicidial_list where called_since_last_reset='N' and status IN($STATUSsql[$i]) and ($list_id_sql[$i]) and ($all_gmtSQL[$i]) $lead_filter_sql[$i] $DLTsql[$i] $CCLsql[$i];";
# BEGIN Added by MyCallCloud to reset lists where reset time is like AUTO
$stmtB = "SELECT count(called_since_last_reset),list_id FROM vicidial_list where called_since_last_reset='N' and status IN($STATUSsql[$i]) and ($list_id_sql[$i]) and ($all_gmtSQL[$i]) $lead_filter_sql[$i] $DLTsql[$i] $CCLsql[$i];";
# END Added by MyCallCloud to reset lists where reset time is like AUTO
}
else
{
if (length($list_mix_dialableSQL)<3) {$list_mix_dialableSQL="called_count < 0";}
$stmtA = "SELECT count(*) FROM vicidial_list where called_since_last_reset='N' and ($list_mix_dialableSQL) and ($all_gmtSQL[$i]) $lead_filter_sql[$i] $DLTsql[$i];";
# BEGIN Added by MyCallCloud to reset lists where reset time is like AUTO
$stmtB = "SELECT count(called_since_last_reset),list_id FROM vicidial_list where called_since_last_reset='N' and ($list_mix_dialableSQL) and ($all_gmtSQL[$i]) $lead_filter_sql[$i] $DLTsql[$i] group by list_id ;";
# END Added by MyCallCloud to reset lists where reset time is like AUTO
}
if ($DBX) {print " |$stmtA|\n";}
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
if ($sthArows > 0)
{
@aryA = $sthA->fetchrow_array;
$campaign_leads_to_call[$i] = $aryA[0];
if ($DB) {print " leads to call count: $campaign_leads_to_call[$i]\n";}
if ($DBX) {print " |$stmtA|\n";}
}
$sthA->finish();
# BEGIN Added by MyCallCloud to reset lists where reset time is like AUTO
if ($DBX) {print " |$stmtB|\n";}
$sthA = $dbhA->prepare($stmtB) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtB ", $dbhA->errstr;
$sthArows=$sthA->rows;
if ($DBX) {print " Noah |$stmtB|\n";}
# Update the lists that need to be reset
while ( @row = $sthA->fetchrow_array) {
$called_since_last_reset_N = $row[0];
$lists_with_no_dialable_leads = $row[1];
if ($called_since_last_reset_N >= 0) {
# Update the list table and set all records back to N for lists with 0 leads at N called_since_last_reset for the active list_ids in the array for the campaign
# Statement code below from Poundteam to inner join vicidial_list and vicidial_lists with update called_since_last_reset = N
$stmtA = "UPDATE vicidial_list L inner join vicidial_lists S on S.list_id=L.list_id SET called_since_last_reset='N' where L.list_id=$lists_with_no_dialable_leads and upper(S.reset_time) like '%AUTO%' and $called_since_last_reset_N < S.xferconf_e_number;";
$affected_rows = $dbhA->do($stmtA);
if ($DBX) {print " MyCallCloud Auto Reset List Feature Query |$stmtA|\n";}
if ($DB) {print " List Ids with the dialable leads : $lists_with_no_dialable_leads";}
if ($DB) {print " Count called_since_last_reset: $called_since_last_reset_N\n";}
}
}
$sthA->finish();
# END Added by MyCallCloud to reset lists where reset time is like AUTO
Re: automatic list reset option to List Modification screen
Posted:
Tue Jul 05, 2016 4:04 pm
by mflorell
Could you post this to the issue tracker please?
Re: automatic list reset option to List Modification screen
Posted:
Sat Jan 26, 2019 8:54 pm
by cvillarreal77
hi this patch can apply to vicibox 8.1.2 ?
Re: automatic list reset option to List Modification screen
Posted:
Thu Jan 16, 2020 11:17 am
by ghernandez
Williamconley - was this added to a newer version of vicidial? or do I need to add this manually?
williamconley wrote:Upgrade to auto list reset for those who use call times to limit available leads: This modification will NOT reset the list if the server time is outside the "call_times" for this campaign. The client had this created to avoid nightly resets when the list zero'd. The first 9 lines are there to show where in the hopper script this code should be inserted.
- Code: Select all
##### UPDATE the leads to be dialed for this campaign #####
if ( ($campaign_leads_to_call[$i] < 1) && ($rec_ct[$i] < 1) )
{
if ($DB) {print " NO DIALABLE LEADS FOR THIS CAMPAIGN (Previous: $VCSdialable_leads[$i])\n";}
if ($VCSdialable_leads[$i] > 0)
{
$stmtA = "UPDATE vicidial_campaign_stats SET dialable_leads='0' where campaign_id='$campaign_id[$i]';";
$affected_rows = $dbhA->do($stmtA);
if ($DBX) {print "CAMPAIGN STATS: $affected_rows|$stmtA|\n";}
#### Added by PoundTeam for Auto List Reset
if ($DBX) {print "---------------Campaign $campaign_id[$i] has just hit Zero: checking for Auto Reset ---------------------\n";}
### Check against calltime, extracted/modified from AST_VDsales_export.pl
$within_calltime = 1;
$CThourminute = "$hour$min";
$CTstart = $Gct_default_start;
$CTstop = $Gct_default_stop;
if ( ($wday == 0) && ( ($Gct_sunday_start > 0) && ($Gct_sunday_stop > 0) ) )
{$CTstart = $Gct_sunday_start; $CTstop = $Gct_sunday_stop;}
if ( ($wday == 1) && ( ($Gct_monday_start > 0) && ($Gct_monday_stop > 0) ) )
{$CTstart = $Gct_monday_start; $CTstop = $Gct_monday_stop;}
if ( ($wday == 2) && ( ($Gct_tuesday_start > 0) && ($Gct_tuesday_stop > 0) ) )
{$CTstart = $Gct_tuesday_start; $CTstop = $Gct_tuesday_stop;}
if ( ($wday == 3) && ( ($Gct_wednesday_start > 0) && ($Gct_wednesday_stop > 0) ) )
{$CTstart = $Gct_wednesday_start; $CTstop = $Gct_wednesday_stop;}
if ( ($wday == 4) && ( ($Gct_thursday_start > 0) && ($Gct_thursday_stop > 0) ) )
{$CTstart = $Gct_thursday_start; $CTstop = $Gct_thursday_stop;}
if ( ($wday == 5) && ( ($Gct_friday_start > 0) && ($Gct_friday_stop > 0) ) )
{$CTstart = $Gct_friday_start; $CTstop = $Gct_friday_stop;}
if ( ($wday == 6) && ( ($Gct_saturday_start > 0) && ($Gct_saturday_stop > 0) ) )
{$CTstart = $Gct_saturday_start; $CTstop = $Gct_saturday_stop;}
if ( ($CThourminute < $CTstart) || ($CThourminute > $CTstop) )
{
if ($DB > 0) {print "System Time is outside of Campaign call time: $CThourminute|$Cwday| |$CTstart|$CTstop| \n";}
$within_calltime=0;
}
else
{
$stmtA = "UPDATE vicidial_list L inner join vicidial_lists S on S.list_id=L.list_id SET called_since_last_reset='N' where S.campaign_id='$campaign_id[$i]' and upper(S.reset_time) like '%AUTO%';";
$affected_rows = $dbhA->do($stmtA);
$event_string = "|$campaign_id[$i]|$stmtA|Reset Lists: $affected_rows|";
if ($DBX) {print "$event_string\n";}
}
### End Calltime check
if ($DBX) {print "---------------Campaign $campaign_id[$i] Completed checking for Auto Reset ---------------------\n";}
&event_logger;
#### End Added by PoundTeam for Auto List Reset
This leads to the ability to use more than one "code" to signify whether the call times should apply or not. for instance "auto" vs "autoCT" could be used for auto without call time check and auto WITH call time check, with slight modifications to the code.
Re: automatic list reset option to List Modification screen
Posted:
Tue Jan 21, 2020 9:49 am
by ghernandez
williamconley wrote:We now have a mod that will reset lists when empty!
Requires only a change to the hopper script, no admin changes required. Add the word "auto" to the reset times and it just works. LOL
hopper script at line 1875 in svn Revision: 1912:
- Code: Select all
##### UPDATE the leads to be dialed for this campaign #####
if ( ($campaign_leads_to_call[$i] < 1) && ($rec_ct[$i] < 1) )
{
if ($DB) {print " NO DIALABLE LEADS FOR THIS CAMPAIGN\n";}
if ($VCSdialable_leads[$i] > 0)
{
$stmtA = "UPDATE vicidial_campaign_stats SET dialable_leads='0' where campaign_id='$campaign_id[$i]';";
$affected_rows = $dbhA->do($stmtA);
if ($DBX) {print "CAMPAIGN STATS: $affected_rows|$stmtA|\n";}
#### Added by PoundTeam for Auto List Reset
$stmtA = "UPDATE vicidial_list L inner join vicidial_lists S on S.list_id=L.list_id SET called_since_last_reset='N' where S.campaign_id='$campaign_id[$i]' and upper(S.reset_time) like '%AUTO%';";
$affected_rows = $dbhA->do($stmtA);
$event_string = "|$campaign_id[$i]|Reset Lists: $stmtA|";
if ($DBX) {print "$event_string\n";}
&event_logger;
#### End Added by PoundTeam for Auto List Reset
Only add the "Added by PoundTeam" section, of course, the rest is there for "where do I put this".
williamconley - Where is the location of the hopper script?
Re: automatic list reset option to List Modification screen
Posted:
Tue Jan 21, 2020 4:46 pm
by williamconley
- Code: Select all
locate hopper
That ought to help you locate it.
Re: automatic list reset option to List Modification screen
Posted:
Tue Jan 21, 2020 4:48 pm
by ghernandez
williamconley wrote:- Code: Select all
locate hopper
That ought to help you locate it.
you are the best man...
Re: automatic list reset option to List Modification screen
Posted:
Tue Feb 21, 2023 2:37 pm
by covarrubiasgg
Any chance to have William's Code on future versions of vici?
It is super userful but I am super lazy to patch the hopper on every setup