Another one from the inbox – is it possible to send a notification via email based on a profile option (or some other condition)? The requirement is that notifications should always appear in the Workflow work list, but for some notifications, there should be an additional copy sent via email. If the condition is not met, then the notification should only appear in the work list.
Firstly, let’s look at how notifications are displayed. Every notification is automatically available in a Workflow worklist – there is no way to stop that happening. Additionally, as an “optional extra”, you can send the same notification via email, based on the following conditions:
- The Workflow Mailer must be running
- The Workflow Mailer must be configured correctly
- The recipient role has an email address configured for it OR (if sending to a role which has multiple users assigned) the individual recipients have an email address configured
- Either the global preference is set to receive email (and there is no over-riding preference set by the user) OR the user preference has been set to receive email
If any of those are not happening in your system, then the notification isn’t going to be sent as an email, regardless of what you want to happen.
So, it looks as if the only thing you can do is to either enable or disable the sending of an email. BUT, there is an alternative which doesn’t quite meet the requirements, but might do the trick – it depends on what the business requirements are about whether the notification should be emailed or not.
If the business are concerned about sensitive information being emailed out, then there is an attribute which can be used for the message called #WF_SECURITY_POLICY which determines whether the notification should be sent by email or not. If this is set to NO_EMAIL then an email will be generated which tells the user that they need to log into the application to be able to read it. If that is what the business really want, then this is the way forward – if not, then adding the attribute may make the situation worse rather than better.