MS Teams chat should remain open for 5 days after incident closure

Jessica Maurer
Tera Contributor

Hi everyone,

we don’t want MS Teams chats to be auto-closed as soon as the Active field of an incident is set to false.

Our requirement: the chat should remain available until 5 days after the incident is closed.


The reason is that for major incidents, there is often still conversational traffic even after the incident is officially closed. If the chat closes immediately, our Major Incident Manager would have to manually create a new group chat and import it back into the incident, which is not practical.

 

To solve this, we created a custom close condition on the incident table. I followed the official documentation Configure the close condition, but the result is not working as expected.
However, this does not seem to work as expected (see attached example: incident closed on 01.09. [dd.mm.], condition set to “close 5 days after Close Date”).

 

Close condition:

JessicaMaurer_1-1757326343340.png

 

Closed Incident (even 7 days ago [dd.mm.yyyy]):

JessicaMaurer_2-1757326380571.png

 

Auto-import still active (MS Teams chat is still open and participants not removed):

JessicaMaurer_3-1757326453284.png

 

 

Has anyone implemented something similar or can advise how to correctly configure the condition so that it meets this requirement?

 

Thanks in advance!

2 REPLIES 2

Raguram1
ServiceNow Employee
ServiceNow Employee

@Jessica Maurer 

I dont think so just the condition will work for you, the BR that runs on incident when state changes runs at the current time. Though BR will adhere to the given close condition and will not close the chat at the moment, there is no way for us to come back to the same incident and close it after 5 days.

 

You may want to explore different avenues, maybe a scheduled job that runs daily and triggers the same API that BR (Close Microsoft Teams Chat Flow ) calls. 

Just by adding a condition will not work for your scenario.

Richard22
Tera Expert

Hey Jessica, 

What if you did something like this in Flow Designer:

Whenever a ticket moves to the "Closed" state or "Active = False" then look up chats in the ticket. If chats exist, then set a timer to wait 120 hours, then end the chat and send a final post message to the chat to let the user know the chat is being closed. 

You could then have the business rule execute when all of the conditions of your flow is met, or even set the business rule to trigger when the flow finishes executing instead of triggering on incident update. 

Something like below:

Richard22_1-1757455015244.png