Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7685937
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T19:21:50+00:00 2026-05-31T19:21:50+00:00

I have a system which receives leads (they are piped in via email) and

  • 0

I have a system which receives leads (they are piped in via email) and then reformats the leads (capitalises postcodes etc), logs the data in the database and then emails out the lead to a third party.

Now I have another third party coming on board and they want to take leads. I wish to code the system so that it distributes the leads evenly between x (in this case 2) parties throughout the day. One of the parties wants 10 leads per day and the other will have the remainder. I do not want to simply give the first 10 leads to person A and then the rest to the other person. I need to distribute the leads evenly throughout the day. The quality of the leads varies and the time of the day is a factor in determining that quality, hence the desire to distribute evenly throughout day.

I’m trying to think of an algorithm which can help determine who gets the next lead. Obviously all the ‘counts’ can be stored in the database and that can be used to check who has received what and how many etc. Just struggling with coming up with a tidy way of coding this?

I’m expecting approx 50-60 leads per day, however this can vary day to day. Also moving forward the average could increase to 80-90. The person that gets 10 initially will take more eventually and the balance of proportions between person A & B will shift. I will have a setting in the system for recording how many person A wants. Person B will always get the overflow (whilst an overflow exists).

Can anyone help with this? I code in php.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T19:21:51+00:00Added an answer on May 31, 2026 at 7:21 pm

    If you don’t want to just allocate the first 10 to A, and then the remainder to B, then you’ll need to know what your expected lead count is per day. Let us imagine that you get 15 leads per day on average; then you could send two to A, and then 1 to B, on a round-robin basis.

    If you get closer to the end of the day, and A only has 8 leads (i.e. your lead count is likely to be lower for the day) you could send any new leads to A regardless of whose turn it is. Or, maybe you could arrange it so that if A ends up with 9 at the end of day 1, then you’ll tweak the algorithm the next day to give them 11 at the end of day 2.

    Obviously we cannot know enough about your system to give you a definitive algorithm, but that should give you some food for thought. The critical questions are: whether the 10 leads are the bulk of your leads for the day, or just a small fraction; and whether it would be acceptable to deliver an average of 10 leads/day to party A.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need suggestion about YAMI library . I have a system which receives Json
I have a C# service application which receives files via UDP and saves them
I have a system which is receiving log files from different places through http
I have a system which contains multiple applications connected together using JMS and Spring
Currently we have a system which we paid for that pushes information into Excel
I have a remote embedded system which it is telnet-able. How can I download
I have a System.Data.DataTable which is populated by reading a CSV file which sets
I have to build up a system which listens for requests from a GPS
Say I have a couple of java runtime environments running on my system which
I have a problem, I would like to build logging system which will be

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.