connect to chat queue from the Virtual Agent servicenow

Poojitha10
Kilo Expert

I have virtual agent setup in HR portal and IT portal (configured in Header/Footer Body HTML Template) . clicking on "connect live agent" from HR portal should redirect to HR queue and from IT portal it should redirect to IT queue.

Note: I found this KB article to configure queue in instance https://hi.service-now.com/kb_view.do?sysparm_article=KB0743849 but I couldn't able figure out the instance for virtual agent widget configured in portal Footer.

Please help to configure this.

find_real_file.png

@Mark Roethof , I really need your expert advice in this I just stuck in this part please do help me to figure out the solution.

Here is my chat setup:

find_real_file.png

1 ACCEPTED SOLUTION

Imam Pasha1
Giga Guru

Hi Poojitha,

Please try the below solution:

1.Remove the queues which you have given for both IT and HR in chat setup and give just global queue.

2.go to greeting topic and add below code in script action:

(function execute() {
vaVars.greeting_message = vaSystem.getGreetingMessage();

if(!vaContext.portal){
returnfalse
}
elseif(vaContext.portal=='sp'){

return vaVars.LiveAgent_queue='d50bdb2fdb501010b45e9444ca96192a'; //pass you IT portal chat queue sys_id

}
elseif(vaContext.portal=='esc'){
return vaVars.LiveAgent_queue='fde232209f22120047a2d126c42e70ab';//pass your HR chat queue sys_id

}

})()

 

Kindly mark as accepted solution if it resolved your issue or If my answer helped you in any way, please then mark it as helpful.

 

Regards,

Imam Pasha

View solution in original post

6 REPLIES 6

If still wanting to do this through the header or footer, you can add options like below:

<widget id="sn-va-sp-widget" options='{"button_color":"#FF0000"}'></widget>

If my answer helped you in any way, please then mark it as helpful.

Kind regards,
Mark
2020 ServiceNow Community MVP
2020 ServiceNow Developer MVP

---

LinkedIn
Community article list

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn

Imam Pasha1
Giga Guru

Hi Poojitha,

Please try the below solution:

1.Remove the queues which you have given for both IT and HR in chat setup and give just global queue.

2.go to greeting topic and add below code in script action:

(function execute() {
vaVars.greeting_message = vaSystem.getGreetingMessage();

if(!vaContext.portal){
returnfalse
}
elseif(vaContext.portal=='sp'){

return vaVars.LiveAgent_queue='d50bdb2fdb501010b45e9444ca96192a'; //pass you IT portal chat queue sys_id

}
elseif(vaContext.portal=='esc'){
return vaVars.LiveAgent_queue='fde232209f22120047a2d126c42e70ab';//pass your HR chat queue sys_id

}

})()

 

Kindly mark as accepted solution if it resolved your issue or If my answer helped you in any way, please then mark it as helpful.

 

Regards,

Imam Pasha