- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-06-2024 12:45 PM
We have 2 request items that email vendors with the ticket information. Since they are not agents in our system, their reply emails only show up as email received and do not create an additional comment in the RITM. The requester therefore cannot see the email content and does not receive any notifications that their ticket was updated.
The inbound action "Update Request Item" works for the requester's reply emails, but not our vendors since they are not part of the ticket.
What is the best way to handle this? Any thoughts appreciated!
Update Request Item:
gs.include('validators');
if (current.getTableName() == "sc_req_item" && current.canWrite()) {
current.comments = "reply from: " + email.origemail + "\n\n" + email.body_text;
if (gs.hasRole("itil")) {
if (email.body.assign != undefined)
current.assigned_to = email.body.assign;
if (email.body.priority != undefined && isNumeric(email.body.priority))
current.priority = email.body.priority;
}
current.update();
}
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-07-2024 06:39 AM
HI Mary,
Take a look at the script that is getting the email to the right ticket. What you probably need is statement like this:
current.comments = "EXTERNAL EMAIL RECEIVED FROM: " + email.origemail + "\n\n" + email.body_text;
The statement is best placed right before the current.insert() statement. We put the alert that it's from external so that people are aware.
:{)
Helpful and Correct tags are appreciated and help others to find information faster
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-06-2024 01:34 PM
HI Mary,
There are a few things that you might try. The first is to have your inbound action, or something it can access, look for the ServiceNow watermark Ref:MSGxxxx. If found, you can look up that watermark (sys_watermark) which will give you the sys_id of the generating object (source_id). From there, it's just a matter of retrieving that object and adding the comment.
If there is no watermark, you can devise a scheme whereby you go looking for emails that were sent to that vendor and upon finding any, start matching up those to the related items. It's messy but can be done.
Beyond that there are a couple of "sneaky" things that you can do:
- If the number of vendors isn't that big, you can set them up in sys_user so that their email address is recognized but not allow them access to your system. We've done that with vendors who send and receive through a limited number of shared mailboxes.
- Better manage the subject on the emails that you send to the vendors. If you start the subject with something like Our RITMxxxxxxx then you can have your inbound action look at the subject and if it finds Our RItMxxxxxxx, you know to which requested item the message applies.
:{)
Helpful and Correct tags are appreciated and help others to find information faster
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-07-2024 05:13 AM
Thanks John.
There are 2 emails addresses involved. Both are users in our system without login access.
The email is routing to the proper ticket, just not creating the additional comment for requester visibility.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-07-2024 06:39 AM
HI Mary,
Take a look at the script that is getting the email to the right ticket. What you probably need is statement like this:
current.comments = "EXTERNAL EMAIL RECEIVED FROM: " + email.origemail + "\n\n" + email.body_text;
The statement is best placed right before the current.insert() statement. We put the alert that it's from external so that people are aware.
:{)
Helpful and Correct tags are appreciated and help others to find information faster
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-07-2024 07:17 AM
Thanks John.
I believe it's the Update Request Item with current.canWrite() getting in the way.
Thanks for your help!