- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-14-2014 11:03 AM
Hi all,
On the ess portal I want to give a custom link on the page which when clicked opens up the "chat" dialog box and the chat is routed to the correct assignment group based on the users country.
Any idea how to achieve that. I can not hard code the sys_id in the chatqueue function. I want something dynamic which pops up the end user chat on Click.
Regards
Abhinav Khanna
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-15-2014 11:48 AM
My initial thought would be that you want to create an "inbetween" piece that either accepts their country as input or takes one from their profile. This piece then redirects to the appropriate Chat Queue based on the result.
While I am not a CMS expert, my thoughts are that a simple way to do this would be through a dynamic content block. The user would enter their country (defaults to their profile country maybe?) and click Chat. The code in the background would then determine the appropriate Chat Queue to send it to and then just redirect to the chat queue link.
We only have one Chat Queue, and we fire it through our dynamic content block in this fashion:
CustomEvent.fire(LiveEvents.LIVE_EVENT, LiveEvents.LIVE_WINDOW_JOIN_QUEUE_QUERY, 'CHAT_QUEUE_SYS_ID','CHAT_QUEUE_NAME');
I see no reason why there could not just be a little logic before to determine which Chat Queue to fire into.
On the surface, this does not seem too challenging to develop from a technical point of view, however what will be challenging is the UI/UX around this feature.
I am sorry I do not have the code developed for this, as we only use the one Chat Queue but I hope this helps. If you need anything else please post back.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2015 12:42 PM
Your dynamic content page would look like this (exactly what we are using, with the exception of removing our info):
<script>
function startChat()
{
if(document.getElementsByClassName('gb_mw').length == 0)
{
CustomEvent.fire(LiveEvents.LIVE_EVENT, LiveEvents.LIVE_WINDOW_JOIN_QUEUE_QUERY, 'SYS ID OF QUEUE','Name of Queue');
}
}
setTimeout(startChat,200);
</script>
<a href="#" onclick="startChat();"></a>
You can embed whatever logic you want in there. For example, you may want to do a glide query on the user to determine their location, then the "if" structure will direct them based on their location to the specific chat queue*.
If there are pieces of the code that do not make sense I would be happy to explain.
To answer your previous question - yes, you can also do this out of your UI Macro.
*(a switch statement would be much better than an if for something like that, but the example I know those are not as common so you can get it working with if/else then look to improve)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-01-2017 12:02 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-02-2015 07:49 AM
Hello Bibin G,
There are many different ways to do that, How I will proceed ?
- First step : I will create a spefic page for the chat. how to do that ? In Content Management >> Pages >> New >> Give a name (example : name : Portal - Portal - Chat, URL suffix : Chat_splash)
- Second step : Content management >> Navigation Menus >> I will create a service desk chat bloc (name : service desk chat, Redirect to : The specified URL). Scroll down untill 'Menu items' and click into new button (Give a name : active Queues, Menu section : choose Service desk chat, Redirect to: A content Page, Detail Page : Portal - Portal - Chat).
- Third step : Go into Pages >> Open the Portal - Portal - Chat Pages >> Edit Page >> Add content (at top right of your screen) >> Search into Content Blocks, your dynamic content,
Above is the first way to implement this feature.
In my previous screenshots, you will have the second way to implement this functionnality.
I would rather choose for the second way than the first one to implement this feature (because of the design).
Let me know if you need further information and I remain to your disposal.
Hopefully that will help you.
Kind regards
ZA
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-15-2020 10:29 AM
Thanks a lot Zica. 🙂
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-25-2015 07:42 AM
If i understood correctly your script, depending on the language of users, you want to display either Service Desk Chat' or 'Resolver Team AP' chat.
I think this is happening because the condition you are using (var language = user.u_lang) is not taken in account.
Could you please try again your script by changing :
Line 13 ; var language = user.u_lang to var language = user.preferred_language; (should be the field name which is preferred_language)
Line 16 and line 30 : <j2:if test="${language == 'en'}"> (should be the value of the English language)
Let me know please if it is working and/or if you need more information.
Kind Regards
ZA
@Mark correct/helpful or just like the answer