Jump to content

Recommended Posts

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?

Link to comment
https://forums.phpfreaks.com/topic/176850-rules-based-notifications-in-web-app/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.