Get a first look at what's coming. The Developer Passport Australia Release Preview kicks off March 12. Dive in! 

Forward email action

Pallavi Shinde2
Tera Contributor

Hi All,

 

Need to configure Inbound Email action for Forward type

 

If any email is forward from 3rd party to instance ID then Email body gets added into the existing Incident's Additional comment.

How to achieve this?

 

I have tried but due to different watermark it is not working.

 

Thank you 

 

1 REPLY 1

yashkamde
Kilo Sage

Hello @Pallavi Shinde2 ,

Basically you won't be able to use the watermark for forwarded emails. Instead, configure a custom Inbound Email Action that extracts the Incident number from the subject/body and updates the Incident's Additional comments.

 

Try this script :

//in Inbound Email Action
var subject = email.subject;
var body = email.body_text;

var match = subject.match(/INC\d+/);
if (match) {
    var incNumber = match[0];
    var inc = new GlideRecord('incident');
    if (inc.get('number', incNumber)) {
        inc.comments.setJournalEntry(body);
        inc.update();
    }
}

 

If my response helped mark as helpful and accept the solution.