Live Agent

ritu_saluja
Tera Expert

Even when the Live Agent are available virtual agent is not routing to a proper queue and showing no agents available message. Please help me on this

1 ACCEPTED SOLUTION

SANDEEP28
Mega Sage

@ritu_saluja Create flow as below

 

SANDEEP28_0-1692778521448.png

 

 

Select chat queue --> 

SANDEEP28_1-1692778595119.png

 

Set queue name -->  put below script in below actual expression

 

(function execute() {
    if (vaInputs.select_chat_queue == "Payroll Case")
      vaVars.LiveAgent_queue = 'HR Payroll Chat';

    if (vaInputs.select_chat_queue == "Lifecycle Events")
      vaVars.LiveAgent_queue = 'HR Lifecycle Events Chat';

    if (vaInputs.select_chat_queue == "Talent Management")
      vaVars.LiveAgent_queue = 'HR Talent Management Chat';

    if (vaInputs.select_chat_queue == "Total Rewards")
       vaVars.LiveAgent_queue = 'HR Total Rewards Chat';

       gs.info('value of queue is '+vaVars.LiveAgent_queue);
  
})()

 

Connect to Agent --> put below script in below actual expression

(function execute() {
   vaSystem.connectToAgent();
})()

 

Also in the condition, you need click on on "Show Related Fields" --> Go to Context --> Interaction context fields and then select "queue". Put the chat queue name as value.

 

Do this for all chat queues

 

SANDEEP28_2-1692779003518.png

 

If I could help you with your Query then, please hit the Thumb Icon and mark as Correct !! 

 

View solution in original post

23 REPLIES 23

Hello @SANDEEP28,

 

Yes I have written this script 

(function execute() {
    if (vaInputs.select_chat_queue == "Payroll Case")
      vaVars.LiveAgent_queue = 'HR Payroll Chat';

    if (vaInputs.select_chat_queue == "Lifecycle Events")
      vaVars.LiveAgent_queue = 'HR Lifecycle Events Chat';

    if (vaInputs.select_chat_queue == "Talent Management")
      vaVars.LiveAgent_queue = 'HR Talent Management Chat';

    if (vaInputs.select_chat_queue == "Total Rewards")
       vaVars.LiveAgent_queue = 'HR Total Rewards Chat';

       gs.info('value of queue is '+vaVars.LiveAgent_queue);
  
})()

in set queue name

please help as it is not working properly.

mabeto97
Tera Contributor

Hi, hopefully this works for anyone who is implementing this 'Live Agent'. The thing that was missing on my end is in te record of the table [awa_presence_state] the one named 'Available' there is a Slush Bucket named 'Service Channels'. Depending your case but in most cases make sure that the Service Channel named 'Chat' is selected, like this:
servicenowLiveAgentFix.png

Hello @mabeto97,

In my case chat is already selected.

ritu_saluja_0-1694150704468.png

Also the other thing is chats are routing correctly in Tokyo Version in my PDI, but my instance is in utah version and I tried the same thing in utah pdi as well but chats are not routing correctly.

My life saver you are! I was pulling my hair for hours why things suddenly broke. Thank you so much.