versatilewt Posted October 7, 2009 Share Posted October 7, 2009 I'm programming an application to automate business processes for a company. The system has a lot of notifications required, and I'm trying to think of the best way to set up the notification system. For example, when a customer replies to an email, it gets piped into the system and a sales rep gets an email. When a customer pays, a notification gets sent to the sales rep, the manager, and the vp of the divison. When an order ships, a notification gets sent to the sales rep, the manager, and the fulfillment department. So, my thought is to make a rules table, with the name of the rule for people that get notified in addition to the sales rep. Then, have a n:m table for users to rules, and when a notification should happen, look up the rule name in the db, find who gets notified, and send out the notifications. One thing I'm having an issue with is, how would I make a rule that references the particular sales rep (i.e. I'd make a rule to notify sales rep, but that sales rep would be different on every account - the n:m table for rules->users couldn't directly link to the actual sales rep, i'd have to be like a variable or something) I'm trying to keep this flexible for future considerations of rule changes (say the vp wants to stop getting copied on certain status updates). Any advice on the best way to go about something like this? Quote Link to comment https://forums.phpfreaks.com/topic/176850-rules-based-notifications-in-web-app/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.