- Post History
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
on 07-02-2015 04:57 AM
Hi,
One of our requirements from users was chat functionality. The problem with the Chat plugin in SNow is that it aparently doesn't support domain separation.
This workaround updates the queue every 5 seconds and plays a sound every time the queue count increases.
Updated chat queue:
Here's a POC for a simple workaround(in laymans terms - a hack):
1. Create a new Script Include (Client callable: checked, Name: "ChatUtils2"). See attached script - ChatUtils2.js.
2. Create a UI Script(Global: checked). See attached script - ChatQueueRefresher.js.
I presume the correct way to do this would have been using the SNows client-side events and have the Script Include return some XML to feed to the event system.
For example the response from xmpp ping with a new user added to the queue would be (the piles of 'x' are just sys_id-s):
<?xml version="1.0" encoding="UTF-8"?><stream><presence from="chat_queue.xxxxxxxxxxxxxxxxxxxxxxxx" to="sys_user.xxxxxxxxxxxxxxxxxxxxxxxx"><notify-queue _xmlns="http://jabber.org/protocol/workgroup"><servertime>1435836724126</servertime><name>Support Chat Queue</name><count>1</count><oldest>1435836724000</oldest><time>1 Hour 5 Minutes</time><status>active</status></notify-queue></presence><presence from="chat_queue.xxxxxxxxxxxxxxxxxxxxxxxx" to="sys_user.xxxxxxxxxxxxxxxxxxxxxxxx"><notify-queue-details _xmlns="http://jabber.org/protocol/workgroup"><user jid="sys_user.xxxxxxxxxxxxxxxxxxxxxxxx/User Name"><position>1</position><join-time>1435836724000</join-time><time>3923000</time><short-desc>hi</short-desc></user></notify-queue-details></presence><ping sequence="2107"/></stream>
I hope this document helps someone save some time.
Cheers.
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
If the "Answer Next User" button does not work, then in UI Script after this line:
var newUsersWaiting = jQuery('.live_agent_user_list tr').length;
...add
if(newUsersWaiting > 0){
jQuery('.live_agent_help_next').removeClass('disabled');
}