Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Using MS Teams Chat Integration as SLA response

tsutherland
Kilo Sage

We have integrated MS Teams chat with incidents/requests and I would like to make initiating a chat with a customer a stop condition for the response SLA. When initiating a chat, the system puts in work notes (see attachment).

Currently our response SLA stop condition is a business rule that runs when the incident is assigned to a person and that person puts in additional comments, it marks a custom checkbox "responded to." The SLA stops when that checkbox is true. So I considered adding to that business rule or creating a flow, but the only option I'm given on flows or business rules is work notes changes, I can't specify there is something specific IN the worknotes.

Does anyone have any other ideas?

1 ACCEPTED SOLUTION

ServiceNow Tec2
Mega Sage
This has been resolved by ServiceNow Technical Support. Please refer to KB0960805 for more information.

View solution in original post

5 REPLIES 5

tsutherland
Kilo Sage

For those who are curious, this is the business rule I created. We have a true/false variable on our incidents called "responded to" (u_responded_to) that is marked when an incident has been responded to by the assigned user and that is what we look at to complete the response SLA.

find_real_file.png

(function executeRule(current, previous /*null when async*/) {

//gets all journal entries as a string where each entry is delimited by '\n\n'
var notes = current.work_notes.getJournalEntry(-1); 
//stores each entry into an array of strings
var na = notes.split("\n\n");  
                      
for (var i = 0; i < na.length; i++)                 
  gs.log(na[i]);
	
if (na.indexOf("A Microsoft Teams chat was created and messages will be auto imported by System") >= 0);
	current.u_responded_to = true;

})(current, previous);