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

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 !! 

 

Thankyou for the help @SANDEEP28 

Hello @SANDEEP28,

I have created the flow as above only but now again it is working only for HR Global and not for the other choices even if the agents are available it is again showing no agents available message

Please help

@ritu_saluja How were you able to solve the que only working for the HR Global and not the other ques? I am having the same problem.

SANDEEP28
Mega Sage

@ritu_saluja Have you put condition for each queue ? If there is no condition then only it will default to one queue.