Need to send different notifications to different types of users
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-29-2024 03:43 PM
Hello! At our organization, our service desk can create requests for 2 different types of users, internal and external. This means the SD will put the user's name in the requested_for field.
we need 2 different sets of notifications for these users. 2 each of created, commented, and completed (1 set for internal, 1 set for external).
The notifications for the internal users are already set & work fine. The notifications to external users need to be different messages, because we don't want the email to contain any links at all. Just basic info to keep the external user informed.
The problem is, conditioning the email notifications to be able to identify if the requested_for is internal or external, so the notifications know which correct email to send. All the external users do not have user id's, but they are all in 1 big group. I have tried so much that I cannot post it all here. These are request notifications are all on the sc_req_item table.
any idea on how to do this so notifications for both sides work appropriately?
Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-29-2024 04:57 PM
Hi @Doug C_,
Do you have a differentiator on each sys_user record to determine internal from external?
If yes, then you can include a condition on each type of notification you send out that references that field and send accordingly.
Hope this helps!
Josh Pirozzi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-29-2024 05:14 PM
There are some differentiators, like externals have a user defined field for their own specific Id & they don't have the internal standardized email addresses, externals also have the snc_external role. I've attempted this a few times but admittedly I don't write script much, and examples I have found always refer to the logged in user, and not the user that might be in the requested for field. I've had no luck with the filter conditions either.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-30-2024 05:19 AM
I also don't have a ton of scripting experience, and typically try to leverage OOB system capabilities when it comes to solving problems.
For this, perhaps you can try:
- External Request Opened on your behalf
- When to send conditions
- Record inserted or updated and only make the Inserted checkbox true
- Filter condition 1: Requested For IS NOT EMPTY
- Filter condition 2: (You'll dot walk to the Roles associated to the Requested For)
- Show related fields
- Requested For > User Fields
- Roles IS snc_external
- When to send conditions
This should explicitly send the 'Request Notification' to those users where the 'snc_external' Role is True.
Hope this helps!
-Josh Pirozzi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-30-2024 06:57 AM
@Josh Pirozzi - I have tried that with no luck because it's my understanding that a user's role must be queried using table sys_user_has_role. So now I'm attempting to script that but no luck so far.