I use a CRM system, Leads come in from a central lead capture page. As leads come in or as a cron job I would like to have leads marked with a 'tag' to be processed by this script to determine if they are located in a territory that is serviced by one of our salesman.
this script would simply change the contact records owner to reflect this new owner.
API Manual for CRM is located at: [login to view URL]
database can be whatever kind you want to store the lookup tables in.