Reply Type Inbound Email Action
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi Community,
Can anyone please say whether this was the best practice or not in ServiceNow ?If No, what are the issues we face if configured this action . If yes , how can we implement this ? @Ankur Bawiskar @Dr Atul G- LNG
create "reply" inbound email action
and give conditions like "if there is RE in subject " don't create RITM
"if there is NO RE in subject " then create RITM.
Regards,
Tulasi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
what's your exact business requirement?
Ankur
✨ Certified Technical Architect || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @tulasi8
Try this:
Inbound Email Action Configuration
- Name: Conditional RITM from Email
- Table: Requested Item [sc_req_item] (or Global)
- Type: Reply email
- Active: true
- Stop processing: true
(function runAction(current, email, event, logger, classifier) {
var subjectLower = email.subject.toLowerCase();
var containRE = (subjectLower.indexOf('re:') > -1);
if (containRE) {
action.setAbortAction(true);
gs.log("Inbound Email Ignored: 'RE' found in subject line for email: " + email.subject);
} else {
var cart = new Cart();
var item = cart.addItem('YOUR_CATALOG_ITEM_SYS_ID');
cart.setVariable(item, 'description', email.body_text);
var rc = cart.placeOrder(); // Creates the REQ and associated RITM
gs.log("New Request and RITM created from inbound email. Subject: " + email.subject);
}
})(current, email, event, logger, classifier);
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti
