Page 1 of 1
Lead Recycling and New Priority

Posted:
Tue Aug 18, 2009 2:39 pm
by scottgutman
Is there a way to set new leads to have a higher priority?
I am constantly adding new leads to the list in real time from a website. I need to have those leads called first (LIFO) before any lead recycling leads.
I have the list order set to UP, I would like to call the new ones first, but the lead recycling seems to come first.
How does the Priority column in the hopper work? can i set the priority there?

Posted:
Wed Aug 19, 2009 6:44 am
by mflorell
use DOWN COUNT instead. It will call the leads that have been attempted the least first, which is always the NEW leads.

Posted:
Wed Aug 19, 2009 10:54 am
by scottgutman
Won't lead recycling interfere and inject recycled leads into the mix?

Posted:
Wed Aug 19, 2009 11:27 am
by mflorell
Lead Recycling will always insert leads based upon your Recycle rules, but the NEW leads would be inserted as well.
If you don't like how this behaves I would suggest not using list recycling and just reset the lists when they run out.

Posted:
Wed Aug 19, 2009 3:24 pm
by scottgutman
Actually, I made some change to the AST_VDhopper.pl
I added a new List Order: Up 1st New.
It inserts all new leads first, then recycled leads, then standard leads.
One of the side affects of the change, is that now the script loads exactly the number of leads to bring to total to the hopper level set in the campaign.
The side affect works for all the list orders and the changes "seem" to not affect the other lists that are not using lead recycling. Also, the other list order setting work exactly as they did before, Recycled first, then other.
So far it is working, and after a little debugging I will put the changes on mantis.
I do have a few questions.
What scripts use the list order field besides vdhopper?
How does list mix interact with vdhopper?
What should i look for, to make sure i did not break anything?

Posted:
Thu Aug 20, 2009 9:59 pm
by mflorell
In 2.0.5 only the hopper script uses the lead order field.
List mix basically overrides the list order to fulfill the list mix settings set in that section of the admin page.

Posted:
Mon Sep 07, 2009 10:10 am
by scottgutman
I posted my resolution in mantis:
http://www.eflo.net/VICIDIALmantis/view.php?id=231
The changed script is there as well and available for download.
The script has been in use for 2 weeks and is working very well.
Additionally, I found another bug in the script. The recycling Select SQL statement is missing the order by clause. It took me a while to figure out why the recycling was loading the older lists first.

Posted:
Mon Sep 07, 2009 8:38 pm
by mflorell
I probably should have mentioned this earlier, but have you looked into using the non-agent API?
This lets you insert leads into the system with whatever priority you like through a web-based API. It is very well suited to web-form-generated leads and we have many clients using it to insert leads into the system and have those dialed before any others.
There is a "priority" field in the vicidial_hopper table that allows for this ranking of leads to be dialing within the hopper.

Posted:
Mon Sep 07, 2009 8:57 pm
by scottgutman
The only api I know about is "agc/api.php". But it doesn't look like it has lead loading functions. I don't know if it has more in the SVN, but I am still using 2.0.5.

Posted:
Mon Sep 07, 2009 9:15 pm
by scottgutman
ok, I found the txt doc for /vicidial/non_agent_api.php.
Yes, this would have been helpful in knowing about the priorty column. When i recieve the leads from the website, i have to do some parsing of the data. I send emails, and validate the information and dedupe on the fly. Then i finally insert the leads into the VD table as well as 2 other DB's.
I would not have had to make that many changes in vdhopper. But, then again, i did fix the hopper loading level to be more accurate and the missing order statement in the recycle SQL.
I guess, using the priority field to manage the order of the new leads, i don't have to delete records from the hopper. i was not really keen on doing that.
Now the question is, do I trash the work in vdhopper?
What do you think?
Also, when I find what I think may be a bug, do ou prefer to have it posted in the forum, in Mantis or both?

Posted:
Mon Sep 07, 2009 9:47 pm
by mflorell
I just added the recycle order fix to SVN.
As for bugs, it is best to report them to Mantis, and you can report them in the development forum as well if you like.