- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-14-2020 01:26 AM
We have a list collector field 'requested for'.
Based on the selected users' department, need to trigger notification to different approver group. And in the mail we want the respective requested for user name as well.
Any idea would be helpful.
Thanks!
Madhu
Solved! Go to Solution.
- Labels:
-
Request Management
-
Service Catalog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-15-2020 11:02 PM
Hi Madhu,
So are you saying you are having say 3 users in list collector; these 3 users belong to 3 different department and based on department email should trigger to individual group?
How are you triggering the email? is it from workflow notification activity?
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-14-2020 02:40 AM
Hi Madhu,
I think this can be achieved in an approval group activity in the workflow.
Here just as an example, you need to retrieve the department of the requestor and based on that select your proper approval group.
Then you just need to fill in the answer variable with the proper user/groups in a comma separated format (something like: answer = current.request.requested_for, approval_group1, approval_group2....). You can also return an array with the different approvers. Please check the OOO comments in the code below:
Hope it helps!
Joaquín
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-14-2020 06:46 AM
Hi Joaquin,
Thank you!
In the workflow activity I added like this
Now the notification is going to the approval groups.
But in the notification body, I want to write the respective user's name.
So our case is:
Our user field is a list collector
user: {x,y,z,k}
If the user is selected as x, the dept is x, the approval group should be A
If the user is selected as y, the dept is y, the approval group should be B
And in the notification sent to A, user name should be mentioned as x
in the notification sent to B, user name should be mentioned as y
The question is, is it possible? If yes, how?
With the above logic, the notification is going. But in the notification, right now we are populating whole details of 'user' field, not that specific user for which the approval notification has gone!
Hope my question is clear! Any help is appreciated!
Thanks!
Madhu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-14-2020 10:18 AM
Hi Madhu,
Yes, that should be possible updating the notification that is triggered.
Here an example of the out of the box email notification "Catalog Approval Request". You'd need to specify the conditions in "When to send" tab:
And then specify the body in "What it will contain" tab, making use of the available fields, such as requester, approver...
In your case, I think best option would be to create different notifications where you specify the different conditions and then a common email template that all notifications can use.
Hope it helps!
Joaquín
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-15-2020 11:02 PM
Hi Madhu,
So are you saying you are having say 3 users in list collector; these 3 users belong to 3 different department and based on department email should trigger to individual group?
How are you triggering the email? is it from workflow notification activity?
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader