Resolving Slowness / Latency When Populating Connect Chat Windows ( /$ )


The /$ windows display but they continues to load for many seconds or minutes.

Users are accessing URLs such as /$

No slow transactions are visible within the application node logs.

Transaction times are less than one second to complete; however, requests can take many seconds or minutes to populate.

This problem is related to PRB706520 ("In Connect chat, window shows up right away but takes a long time to completely load") and KB0623841/PRB714182 ("Chat takes long time to load after upgrading from Legacy Chat to Connect Support").




Create a before-query business rule on [chat_queue_entry] to limit the query to active records and all records created within the last 30 days. This allows a user to see one month of conversation at a minimum and limits $ from evaluating anything older.

Before-Query Business Rule code

     (function executeRule(current, previous /*null when async*/) { 
             var transaction = GlideTransaction.get();           if (!transaction)                return;               var page = transaction.getPageName();              if (page.indexOf('api/now/connect/support/collaborators/all') != -1)                current.addEncodedQuery('sys_created_on>=javascript:gs.daysAgoStart(30)^ORstateIN1,2');            })(current, previous);


Article Information

Last Updated:2019-08-26 14:54:51