Counting partner enquiries and setting daily maximum.

D

Darren

Hello,



I am trying to design an ASP system which will submit the contents of a
feedback form to a partner, based on a daily maximum number of feedback
forms per day. For example, if partner1 whishes to receive no more than 5
feedback forms per day, then I want the system to check how many forms it
has submitted to partner1 in previous 24 hours and then act accordingly. If
the number has reached the partner maximum, I want it to submit to the next
partner and so on. So, if I have 5 partners each taking 5 forms per day, I
want the system to automatically distribute 5 emails per partner based on 25
feedback forms received in 24 hours.



Any ideas? Here is how I see it working (not real code):



DEFINE PARTNER RECIPIENT:

(e-mail address removed)

(e-mail address removed)

(e-mail address removed)



DEFINE NUMBER OF ENQUIRIES PER 24 HOURS:

PARTNER1: 5 enquiries per 24hrs

PARTNER2: 10 enquiries per 24hrs

PARTNER3: 2 enquiries per 24hrs


USER SUBMIT FORM



If Partner1 Number of Enquiries in last 24 hours <= 5 then submit to
Partner1

Else if Partner2 Number of Enquiries in last 24 hours <= 10 then
submit to Partner2

Else if Partner3 Number of Enquiries in last 24
hours <= 2 then submit to Partner3

ELSE

Submit to overflow partner



Any ideas or tips greatly appreciated. It's the counting of feedback forms
in last 24hrs which is confusing me! I am thinking about inserting each
feedback form to a database with a timestamp, and then having a file read
the table when the submit page loads, check how many leads have gone to
partnerx where time stamp BETWEEN xx/xx/xxxx AND xx/xx/xxxx.



Thanks for any tips!



Gary.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top