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

The language field we are using is custom field that's why I have written like this. The redirection is coming different for two chat buttons but we should get only one button and whenever if users clicks that it should redirect to corresponding assignment group..


Do you have it set to "Two Phase" for the Dynamic Content Block?


(I think in Fuji it's off by default)



You are running your "if" statements in the second phase (that is what "j2" means, "j" would just be first phase). Running it all without using Two Phase will cause multiple links like you are experiencing.


Yes you are right, after setting two phase it is working fine.



Can we implement this functionality without hard-coding sys_id and group names?


You could use a query to populate those fields if that works easier for you. I would think for most people Chat Queues rarely change, but if you require that then you would have to develop a query to identify which sysid's/group names to use. Remember to weight the risk of using a dynamic query for this versus hard coding, as using a dynamic query could potentially fail and leave you with no links.




Or are you asking if you can just skip putting those two values in altogether? That I cannot answer - I have never tried that. Our queues are static so we hard code them.


Hi Trevor Kuebler,



Is this possible to get the URL of chat link so that whenever user hits that URL it should open Chat window to chat directly instead of clicking chat button