The Zurich release has arrived! Interested in new features and functionalities? Click here for more

Can we make incident in progress if users reply on MS teams chat from conversation integration

atishayxjai
Tera Contributor

Can we make incident in progress if users reply on MS teams chat from conversation integration from MS teams. There is one table sn_tcm_collab_hook_ms_teams_chat whre all chats are stored but not able to get how can we identify that incident caller has messaged on chat not agent.

3 REPLIES 3

Community Alums
Not applicable

@atishayxjai Yes, You can use the Sender ID field in sn_tcm_collab_hook_ms_teams_chat to determine who sent the message. If the Sender ID matches the caller of the incident, you can update the incident state to "In Progress".

You can use following BR script on sn_tcm_collab_hook_ms_teams_chat to achieve these requirement:

 

(function executeRule(current, previous /*null when async*/) {
var incidentId = current.incident; 
var incident = new GlideRecord('incident');

if (incident.get(incidentId)) {
var caller = incident.caller_id; 
if (current.sender_id == caller.sys_id) {
incident.state = 2; 
incident.update(); 
}
}
})(current, previous);

 

Thanks for reply @Community Alums .

 

I dont see any sender_id field on sn_tcm_collab_hook_ms_teams_chat  table that's why I am not able to get any differentiation who has sent message on teams. Is there any other solution to achieve this requirement.

BexT
Tera Contributor

@atishayxjai  did you find a solution to this?