File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
Specialized Areas/Fix scripts/Cacel Struck Slack Conversations Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change 1+ /*
2+ This script will mark the struck slack conversation as canceled.
3+ Use Case: Sometimes due to n/w or connecton issue, users are not able to end the conversations using restart or end command from slack.
4+ */
5+ var struckConv = new GlideRecord ( 'sys_cs_conversation' ) ; // conversation table glide record
6+ struckConv . addEncodedQuery ( 'stateINopen,faulted,chatInProgress^device_type=slack' ) ; // Query can ve enhanced based on user (consumer) or date range.
7+ struckConv . query ( ) ;
8+ while ( struckConv . next ( ) ) {
9+ struckConv . setValue ( 'state' , 'canceled' ) ; // set the state to cancel for struck conversation.
10+ struckConv . setWorkflow ( false ) ;
11+ struckConv . update ( ) ;
12+ }
You can’t perform that action at this time.
0 commit comments