when comment contains caller's email then incident state should move to work in progress

shweta14
Tera Contributor

Hi Community,

 

I have requirement where needs to update incident state from pending to work in progress.

this is working from portal and from incident form but not from webex.

when comments added from webex it is updating in incident comments but state is not changing.

I want to get email id from that comments and that should matches to caller's email id and then state should move to WIP.

 

how to achieve this? 

3 REPLIES 3

Dhananjay Pawar
Kilo Sage

You can try similar logic in Before Insert and Update BR to check if comment contains callers email id or not and then based on that you can change the state.

 

Thanks.

checking the same thing in Background script but not getting output
 
var gr =new GlideRecord('incident');
gr.addEncodedQuery('numberSTARTSWITHINCXXX');
gr.query();
if(gr.next()){
    var useremail= gr.caller_id.email;
    if(gr.comments.includes(useremail)){
        gs.print('true');
    }
}

Hi,

It is working at my side.