chat queue routing

abhinav_khanna
Kilo Expert

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

1 ACCEPTED SOLUTION

TrevorK
Kilo Sage

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.


View solution in original post

56 REPLIES 56

Hi AKb Zic,



I have written dynamic content page code like this



<?xml version="1.0" encoding="utf-8" ?>


<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">


    <j2:if test="$[(gs.getProperty('glide.live.chat', 'true') != 'false')]">


        <j2:if test="$[gs.isLoggedIn()]">


              <div style="float:left;margin-right:20px;">


                    <div class="live_workqueue_button cms_menu_vertical_blocks_container" style="margin:0;padding:1px 4px;">


             


  <g:evaluate>


   


  var user = new GlideRecord('sys_user');


  user.addQuery('sys_id',gs.getUserID())


  user.query();


  user.next();


  var language = user.u_lang;          


  </g:evaluate>


   


        <j2:if test="${language == 'eng'}">


                          <a href="#" onclick="CustomEvent.fire(LiveEvents.LIVE_EVENT, LiveEvents.LIVE_WINDOW_JOIN_QUEUE_QUERY, '466650d30f5b8200c33445ace1050e63', 'Resolver Team AP'); return false;">


                                <table>


                                      <tr>


                                            <td style="vertical-align:middle;">


                                                  <span class="i32 i32_support"></span>


                                            </td>


                                            <td class="cms_menu_vertical_blocks_title" style="vertical-align:middle;white-space:nowrap;">


                                                  <span class="cms_menu_vertical_blocks_title"><h2>Service Desk Chat</h2></span>


                                            </td>


                                      </tr>


                                </table>


                          </a>


          </j2:if>


      <j2:if test="${language != 'eng'}">



        <a href="#" onclick="CustomEvent.fire(LiveEvents.LIVE_EVENT, LiveEvents.LIVE_WINDOW_JOIN_QUEUE_QUERY, 'adb0213e0f674600c33445ace1050ecd', 'New team'); return false;">


                                <table>


                                      <tr>


                                            <td style="vertical-align:middle;">


                                                  <span class="i32 i32_support"></span>


                                            </td>


                                            <td class="cms_menu_vertical_blocks_title" style="vertical-align:middle;white-space:nowrap;">


                                                  <span class="cms_menu_vertical_blocks_title"><h2>Service Desk Chat</h2></span>


                                            </td>


                                      </tr>


                                </table>


                          </a>


      </j2:if>


                    </div>


  </div>


             


        </j2:if>


  </j2:if>


</j:jelly>



But what happening is I am getting two chats links on the Dynamic content page instead of one. Could you please help me on this...


zica
Giga Guru

Hello Bibin G.


I am really sorry for my late reply, I was not in office these two previous days.


I am using the script above, Do you want further details to how implement this functionnality ?


Please find screenshots of what I have implemented : If I can help you with anything, just let me know, I'd love to help you.




Chat.PNG



Kind regards,


ZA


Hi AKb Zic,


Thanks for the response, I have a requirement very similar to this. In my Case when the user clicks on the Helpdesk Chat button on the ESS View, he need to see a small page where he get to select the Area/unit he wants to chat to, and route it with the selection..


Hi AKb Zic,



The Service desk chart button is coming on ESS page after selecting the Chat Queue in Header page. Now whenever we clicking that button on ESS page it is calling 'cms_header_chat' Ui macro and the chat is redirecting to corresponding chat queue.



Now my question is can we write conditions like based on user's language it should be redirected to corresponding chat queue in the UI macro itself?



Or else we have to do this by using Dynamic content pages?. If we have to do this by dynamic content page then how we have put Service desk chart button in ESS page and how we have to run the script on click of that...


Hi All,



Could you please explain how to implement this by using dynamic content pages with steps