So there is an internal email application, that has different installations in the company (various departments).
When an email comes into the system, I need to perform a lookup based on the email address. Each lookup will be different, depending on the department's installation.
e.g. When an email arrives in the accounting department, lookups on the email will be specific to a particular database.
When an email arrives in the sales department, lookups will be specific to our customer database.
Since each user lookup database is different, I need to design a very flexible user lookup mechanism so that department specific code can be easily managed.
What is the best way to design this type of functionality?