- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-30-2023 11:44 PM - edited ‎12-01-2023 01:12 AM
Write an inbound email action to process any incoming email and check following and assign the SC_Task to sender:-
If task is unassigned, sender is part of assignment group & first 3 text of body or subject is "trt".
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-01-2023 12:00 AM - edited ‎12-01-2023 12:01 AM
Hi @Admin7267
Let's define an Inbound Email Action in the Catalog Task [sc_task] table.
Type: Reply
Conditions: Subject/Body startswith trt
In the action script, you can validate the assignment group is not empty, the assigned to is empty and the current user is a group member > assign to the current user.
Sample below.
(function runAction(/*GlideRecord*/ current, /*GlideRecord*/ event, /*EmailWrapper*/ email, /*ScopedEmailLogger*/ logger, /*EmailClassifier*/ classifier) {
if(!gs.nil(current.assignment_group) && gs.nil(current.assigned_to) && gs.getUser().isMemberOf(current.getValue('assignment_group'))){
current.assignment_group === gs.getUserID();
current.update();
}
})(current, event, email, logger, classifier);
Cheers,
Tai Vu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-01-2023 12:00 AM - edited ‎12-01-2023 12:01 AM
Hi @Admin7267
Let's define an Inbound Email Action in the Catalog Task [sc_task] table.
Type: Reply
Conditions: Subject/Body startswith trt
In the action script, you can validate the assignment group is not empty, the assigned to is empty and the current user is a group member > assign to the current user.
Sample below.
(function runAction(/*GlideRecord*/ current, /*GlideRecord*/ event, /*EmailWrapper*/ email, /*ScopedEmailLogger*/ logger, /*EmailClassifier*/ classifier) {
if(!gs.nil(current.assignment_group) && gs.nil(current.assigned_to) && gs.getUser().isMemberOf(current.getValue('assignment_group'))){
current.assignment_group === gs.getUserID();
current.update();
}
})(current, event, email, logger, classifier);
Cheers,
Tai Vu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-01-2023 12:08 AM
Thank you @Tai Vu for looking into it and replying, Actual requirement is
For all unassigned SCTASK when an email notification goes to the assignment group members upon saving n assignment group on the record.
Any members of the same assignment group when replying to the notification email with a subject line or in body as 'trt' then the record should get assigned to the same person who has responded to it.
Objectives : To ensure the assign to field of the RITM and CTASK is automatically populated on the record when replying to an email notification.
Is there a way to test this changes?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-01-2023 12:50 AM
Hi @Admin7267
Yes the inbound action above will assign to the sender (current user) who replied to email associated to a catalog task.
In your scenario, you can define an Email Response Template, where you will set the Subject/Body starts with the TRT keyword. Then, embed as a hyperlink to the Notification that sends to the assignment group. So if one of the recipients (members) reply to that email, it should assign the task to that user.
If you don't know how to define an Email Template Response, you can refer to the post below, I captured detail steps by steps to build it for the reopen incidents case.
Reopen and Close incident links in the resolved incident email notification
Cheers,
Tai Vu