Lead filter check if valid

All installation and configuration problems and questions

Moderators: gerski, enjay, williamconley, Op3r, Staydog, gardo, mflorell, MJCoate, mcargile, Kumba, Michael_N

Lead filter check if valid

Postby dhijrwn » Tue Oct 25, 2022 8:17 am

Hi guys.

I have this lead filter where it select new status or status in 'A', 'AA', 'B' 'AB', 'NI', 'N', 'NA', 'NL', 'B', 'DROP' as long they are less than or equal to 3 call count and then it will try it again after 3 hours of attempt.


(status = 'NEW') OR
(
status IN ('A', 'AA', 'B' 'AB', 'NI', 'N', 'NA', 'NL', 'B', 'DROP') AND
called_count <= 3 AND
last_local_call_time < CONCAT(DATE_ADD(CURDATE(), INTERVAL -3 HOUR),' ',CURTIME())
)

or it must be like this?
(
((status IN ('A', 'AA', 'B' 'AB', 'NI', 'N', 'NA', 'NL', 'B', 'DROP')) and
(last_local_call_time < CONCAT(DATE_ADD(CURDATE(), INTERVAL -3 HOUR),' ',CURTIME())) and called_count <= 3) or
(status NOT IN ('A', 'AA', 'B' 'AB', 'NI', 'N', 'NA', 'NL', 'B', 'DROP'))
)

What I want is this.
If a number was dispo as Answering machine or any of that status inside of an IN statement then if the manager manually reset the leads I want the answering machine number to be loaded after 3 hours from the last attempt(example 12:00pm last called it must be loaded at 3:00pm even the manager reset the list).
I copied the last condition from the DROP72HOUR entry.
Cluster setup i7-9700 cpu @ 3.00ghz 32GB ram 1xDB WEB ARCH 11xTEL 4core
ViciBox v.9.0.3 ISO VERSION:2.14-853a BUILD: 220328-1420
SVN: 3595 DB Schema: 1657 | Asterisk 13.29.2-vici
Zoiper 5 | VICIPhone| No Digium/Sangoma Hardware
dhijrwn
 
Posts: 149
Joined: Tue Jan 07, 2020 6:12 am

Re: Lead filter check if valid

Postby jamiemurray » Wed Oct 26, 2022 7:20 am

I tend to do mine like this so it's easier to read and amend without having to spend too much time thinking about it and gives a bit more control over the time different statuses are retried or even the call count at which they have to be under to dial.

Be careful though if making it too complicated on systems with large lead counts within the active lists, it can cause the hopper script to take time to complete during which time the vicidial_list table is locked. This prevents answered calls from being delivered to agents that are ready and the agent screens freeze up if the action they are trying to perform involves updating a lead. It's worth after putting the filter live (without dialing in progress, running the hopper script manually to see how long it takes, if it takes more than a few seconds, you will start seeing issues during production dialing time.

Code: Select all
(
   (
      (status IN ('A','AA','AB','B','DAIR','PDROP','RING','PU','N','NA','AL','AM') AND last_local_call_time < DATE_SUB(NOW(), INTERVAL '3' HOUR) AND called_count <= 10)
      OR
      (status IN ('FASRB','FASNA','FASIA','FASVM') AND last_local_call_time < DATE_SUB(NOW(), INTERVAL '15' MINUTE) AND called_count <= 10)
      OR
      (status IN ('NOTAVA') AND last_local_call_time < DATE_SUB(NOW(), INTERVAL '1' DAY) AND called_count <= 5)
      OR
      (status IN ('NIBEG','HANGUP','DCMX') AND last_local_call_time < DATE_SUB(NOW(), INTERVAL '7' DAY) AND called_count <= 5)
      OR
      (status IN ('NI','CALLBK') AND last_local_call_time < DATE_SUB(NOW(), INTERVAL '30' DAY) AND called_count <= 5)
      OR
      (status IN ('DROP') AND last_local_call_time < DATE_SUB(NOW(),INTERVAL '3' DAY) AND called_count <= 5)
   )
      OR status IN ('NEW','AFTHRS')
)
Skype: live:support_71847 | Tel: (US) +1 646 647 8850 (CA) +1 613 900 6456 (MX) +52 55 9990 3550 (UK) +44 1324 285022 (ES) +34 922 937 384
Managed Hosting - No tech skills required | VoIP Termination & DID numbering | https://jmurraysolutions.com
jamiemurray
 
Posts: 172
Joined: Fri Jan 11, 2013 4:12 pm
Location: Tenerife, Canary Islands


Return to Support

Who is online

Users browsing this forum: Google [Bot] and 58 guests