
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-18-2022 01:59 AM
Hello
Today, we are using inbound action to put emails in tickets.
I would like to parse the subject of certains emails and put a certain string into a field.
I receive emails from specific email addresses with this reference in the subject SMIT-xxxx and I would like to set the field 'Salesforce ticket reference" to this value in the task table.
Can you help me to achieve this ?
I searched a bit left and right but I'm not sure how to do this , do I have to create a separate inbound action or is it a business rule ?
Thanks
Jérôme
Solved! Go to Solution.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-18-2022 05:15 AM
I managed to do it :
ParseSmit();
function ParseSmit() {
// The subject
var subjectStr = email.subject;
var regExSmit = /SMIT-\d{4}/;
var ciStr = subjectStr.match(regExSmit);
gs.log(ciStr);
current.u_jira_ticket_reference = ciStr[0];
current.update();
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-18-2022 02:04 AM
Hey,
Inbound email is the way to go , follow below article to achieve the same:
Aman Kumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-18-2022 02:09 AM
This is what you need
https://docs.servicenow.com/bundle/quebec-servicenow-platform/page/administer/notification/reference/r_AccessingEmailObjsWithVars.html

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-18-2022 02:13 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-18-2022 03:01 AM
This will not work as I have to update existing records, not creating