Auto-close Chat interaction records
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2025 01:33 AM
Hi All,
I am facing an issue where Interaction records of type=Chat are not getting auto closed in below scenario:
1. User starts the chat; in backend Interaction record get created
2. Before user select any option, he closes the window - interaction records always stays in WIP state
I thought OOB this must be taken care through some job, but the interaction record for Live Chat are always in WIP state.
Can some help please help in confirming the behavior and resolving the issue.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2025 01:40 AM
In that case you will have to come up with a custom solution to close that.
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2025 01:55 AM
@Ankur Bawiskar - thanks for the response!
By any chance, do you know if that's expected behavior ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2025 02:02 AM
check this KB
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0963514
there is this scheduled job "Fallback Timeout for interactions in Wrap Up" which wraps up the Interaction.
For your requirement you can create a custom scheduled job
Look for target Interaction records of type Chat left in WIP for more than a set time limit (e.g., 1 hour). The script would update them to a closed state if they have not progressed
var gr = new GlideRecord('interaction');
gr.addQuery('type', 'Chat');
gr.addQuery('state', 'WIP'); // or the numeric equivalent
gr.addQuery('sys_updated_on', '<', gs.minutesAgo(60)); // adjust time/window as needed
gr.query();
while (gr.next()) {
gr.state = 'closed_complete'; // or another appropriate closed state
gr.update();
}
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2025 11:36 PM
Hope you are doing good.
Did my reply answer your question?
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader