TUESDAY, FEBRUARY 07, 2012

Inbound Email – New, Reply, and Forward

L

ast week i came across an issue where the system was receiving emails that we thought should have been classified as Forwarded emails and processed by a ‘Forward’ inbound email action. Even though all of the emails coming in had ‘Fw:’ as their subject prefix, some of the emails were being classified by the system as ‘New’ for their receive type instead of ‘Forwarded’ as we expected. After a little more investigation we discovered that the back-end code to identify forwarded inbound email actually requires more than just ‘Fw:’ as the subject prefix. The inbound email was being classified correctly because it didn’t meet all of the criteria for a forwarded email. This article contains a summary of the classification criteria for inbound emails. It should come in handy if you’re wondering how Service-now distinguishes between New, Reply, and Forwarded emails.

New:

  • ‘New’ is the default classification for any email coming into Service-now. The system first performs all of the checks to see if an email should be classified as a ‘Reply’ or ‘Forward’ and only classifies the email as ‘New’ if none of the conditions are met.

Reply:

  • Subject Prefix is insignificant (The system doesn’t care if the subject starts with ‘Re:’, ‘Reply:’, or ‘Chicken:’)
  • System looks for watermark in subject and body. If a watermark is found that matches a ticket in the system, then email is classified as a ‘Reply’ receive type.
    If not found, system checks the ‘In Reply To’ header
  • Value of ‘In Reply To’ from ‘Header’ field is tested against the value of ‘Message ID’ field for a message that was sent. If a match is found, then email is classified as a ‘Reply’ receive type.
  • Note: Some email clients do not support ‘In Reply To’ header. In my testing GMail stripped it out, Microsoft Entourage did not. Your mileage may vary based on the email client sending the email. The bottom line here is that the system only knows about the information contained in the email log record. If it isn’t there, then it can’t be acted upon.
  • If ANY of these conditions are met, then the email is classified as a ‘Reply’ receive type and will be processed by ‘Reply’ type inbound email actions.

Forward:

  • Subject Prefix is critical
  • System looks for ‘FW:’ or ‘FWD:’ as the prefix in the subject line (Case sensitivity doesn’t matter)
    In addition, the system also looks for ‘From:’ in the body of the email. This must match exactly!
  • If BOTH of these conditions are met, then the email is classified as a ‘Forward’ receive type and will be processed by ‘Forward’ type inbound email actions.
  • Forward conditions take precedence over reply conditions
  • Tags:  

    Comments

    Posted On
    Apr 12, 2010
    Posted By
    swetha

    Hi,

    We have setup for Inbound emails. Everything seems to be working fine except that the inbound emails are not getting logged in the activity log.

    For the Inbound emails, the target is coming as None.. Is this impacting it anyway??

    Posted On
    Apr 12, 2010
    Posted By
    Mark Stanger

    The target value needs to be defined for the email to be displayed in the activity log. This issue could be caused by a few different things depending on the setup you have. Are the emails coming in reply emails? Do you see a watermark in the subject or body? If you don’t see a watermark, does the header information match anything?

    Posted On
    Apr 13, 2010
    Posted By
    swetha

    Yes the emails are coming in as reply emails.

    I see the watermark in the body but still I am facing the issue.

    When I reply the target field is showing None. It is updating other fields in the form which means system is recognizing it but only problem is that it is not logging in the Activity log. How to solve this issue?

    Posted On
    Apr 13, 2010
    Posted By
    Mark Stanger

    It’s hard to say without working with the actual system and data. I would look to see if any reply emails are getting a target populated or if there are just certain types of emails that have an issue. You could also look at your inbound email actions and see if there might be an issue there. Maybe you could temporarily replace your inbound email action for replies with the one from the Service-now demo instance. Outside of that, you may have to contact Service-now support or ask on the forums for assistance.

    Posted On
    Jul 03, 2011
    Posted By
    James

    Hi Mark!

    Have you created inbound rules for processing emails based on record number? This would be useful feature as many IT organizations already have ID for their incident and vendors incident.

    Regards

    James

    Posted On
    Jul 04, 2011
    Posted By
    Mark Stanger

    @James, I’ve done similar things before but I don’t have anything pre-built. If you think it’s something that would be useful for lots of different people then send me a message via the ‘Contact’ form outlining the idea and process in detail. If I think it’s something people could use and I have time I’ll write a post on it. You can also try asking on the ServiceNow forums.

    Posted On
    Aug 22, 2011
    Posted By
    AdminPro

    Hi Mark,
    Quick question;
    Inbound rules check for SN record number on top of the watermark on incoming emails. This is all good, but it comes with a limitation. The check for SN record number is only limited to the subject line, so if the SN record number is missing from the subject line, it will be treated as a new. My question is:
    Is there a way I can modify this inbound checking to look for the SN record number within the email body as well?! It would be great if there is a way to do this this.

    Thanks much in advance.

    Posted On
    Aug 22, 2011
    Posted By
    Mark Stanger

    There’s no simple way to do this that I’m aware of. What you would need to do is parse out that number from the body of the email and then query for a task with a matching number. Depending on what you found, you could insert or update.

    Posted On
    Nov 22, 2011
    Posted By
    Braydan

    That’s useful info, but I’m wondering if there are any keywords that can be placed in the body of an e-mail to get Service Now to conmplete fields like Service, Classification, Assignment Group and assigned To. I’d like to be able to send an e-mail with the details included so that individual techs receive notification when a client e-mails a request. Then I’d create an e-mail template for the client to complete and simplify the system somewhat. A lot of my clients refuse to log on to Service Now, and just want to be able to e-mail the tech directly.

    Posted On
    Nov 26, 2011
    Posted By
    Mark Stanger

    There are no pre-defined keywords, but it’s fairly simple to set up an inbound email action to key off of name-value pairs. You can check out the default incident inbound actions for examples.

    Leave a Reply


    Notify me of followup comments via e-mail. You can also subscribe without commenting.

Latest Comments

  • Mark Stanger: This linkage all happens for you if you use the task survey plugin. You can look on the wiki for more...
  • Vineeth: I want a way in which if a survey is filled in by the user the response are stored in the survey response...
  • Mark Stanger: This functionality doesn’t connect to an FTP server. See this line in the post above…...
  • Mark Stanger: The report page is back-end XML so there’s no way to directly manipulate the behavior of that...