A script that forwards contact form messages arriving at an email account, to different salesmen email addresses based on a probability scale.
When an email comes into the account, the script will check to see if the contact on the contact form has been assigned to a salesman already. If so, the script will send the contact to that particular salesman's email addresses. If not, the contact will be assigned to one of many salesmen randomly depending on each salesman's probability of receiving a contact.
There will be two google doc spreadsheets the script will check: one for the salesmen email accounts and probability; then the other for all contacts and which salesman they are assigned to.
I will need to be able to view all incoming and outgoing messages from the email account's inbox and sent folders. I will also need to be able to access this information through Thunderbird.
I will need to be able to add a large amount of salesmen (at least 50), many email addresses for each salesman (at least 5), and many contacts on the contact spreadsheet (at least 10,000).
I will need to be able to filter both the subject line and body of incoming emails for keywords - so that only those emails are screened and forwarded.