- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-08-2015 08:19 AM
I'm trying create a new inbound action that will update a ticket from a user. User who is not in registered in the system, it can be anybody. So it's not really a reply to email, it's more of a new email with ticket or request number. Any suggestions?
Name: New Hire equipment Shipping update
Target table: "New Hire Asset..."
Type: New -- ??
Condition: email.subject.startsWith("NHA0")
gs.include('validators');
if (current.getTableName() == "New_hire_Asset") {
current.u_email_body = "reply from: " + email.origemail + "\n\n" + email.body_text;
}
emailbody = email.body_text.trim().replace('<br>','');
current.update();
~Peter
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-08-2015 11:24 AM
Hi Peter,
In this case, because the email is not classified as a reply "current" will represent a new record in the table for which the inbound action is configure. In order to update the appropriate record, you will need to add code to your inbound action to find and update the correct record using GlideRecord based on values you check for in the subject or body of the email depending on what you are expecting it to contain.
Hope this helps.
-Jose
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-08-2015 09:00 AM
Peter,
If its new email sent to Service Now then you need to have some unique identifier in the email which will tell you which record it needs to update.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-08-2015 11:07 AM
Thanks Mani for your response. We'll have some sort of communication out to users who will send this e-mail. Can we go by condition - email.subject.startsWith("NHA0") and does a look up? or add keypair Sample: 'Ticket:NHA00421' ? or anything starting with 'NHA0' do a look up?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-08-2015 11:26 AM
Peter,
Yes, since you have the ticket number you can use a GlideRecord to do the lookup and update record.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-08-2015 11:24 AM
Hi Peter,
In this case, because the email is not classified as a reply "current" will represent a new record in the table for which the inbound action is configure. In order to update the appropriate record, you will need to add code to your inbound action to find and update the correct record using GlideRecord based on values you check for in the subject or body of the email depending on what you are expecting it to contain.
Hope this helps.
-Jose