homepage Welcome to WebmasterWorld Guest from 54.166.116.36
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / Databases
Forum Library, Charter, Moderator: open

Databases Forum

    
Structure of a Round Robin Lead Distribution System
tec4



 
Msg#: 4500335 posted 6:47 pm on Sep 26, 2012 (gmt 0)

Hi Everyone,

Was wondering what a good approach would be to route leads in a round robin fashion.

I have products for sale in particular cities and each city can have multiple salespeople. How would I go about routing leads between them in an organized fashion?

The approach I can think of, not sure how efficient it is, however:

One method I can think of would be storing the salesperson id in a field in MySQL in the 'cities' table of the salesperson who last got a lead in that city. Then I could randomly assign the next lead to an agent other than the one stored in the DB (if multiple salespeople are in the particular city).

Would that be a good way to do it or is there a better way I could go about it rather than random assignment and more toward a 'round robin' approach?

Thank I'm mainly stuck on the logic behind it.

Thanks for the help!

 

whoisgregg

WebmasterWorld Senior Member whoisgregg us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 4500335 posted 10:20 pm on Sep 26, 2012 (gmt 0)

Random could really come back and bite you in this kind of system. Lead distribution is *very* important to salespeople. Like, lawsuit important.

I would recommend doing it like this:

1. Determine which salespeople are eligible to receive the lead.
2. Get the timestamp of the most recent lead that was assigned to each of those salespeople.
3. Assign the lead to the salesperson who has gone the longest without receiving a lead.

This should be efficient to query the database and an effective and fair way to distribute the leads in a way that will make sense to the users.

tec4



 
Msg#: 4500335 posted 10:56 pm on Sep 26, 2012 (gmt 0)

Okay, okay - that makes a lot of sense and much better than and the thoughts I had wondering around in my head :)

Will actually keep it nice and straight forward too, thanks for pointing me in the right direction!

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Databases
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved