Retrieve URL of external site in Engagement messenger

Musab Rasheed
Tera Sage
Tera Sage

Hi,

 

I'm implementing engagement messenger for 8 different external websites, It includes providing a chat feature for 8 different websites. After researching I found out we can use one topic to directly invoke Live chat topic but since 8 different sites are involved hence this needs to be route to different 8 different queues in ServiceNow. I need help to retrieve URL of website from where user is initiating chat so that I can use it and pass to invoke respective queue in Live Chat topic block.

 

Till now I have tried using vaContext.LiveAgent_url but it is not retrieving any URL as per logs I'm printing in below Live chat topic block

 

(function execute() {

gs.log("Check URL paramater "+vaContext.LiveAgent_url);
// Check if Live Agent is available. If so, connect. Otherwise let the user know what to do.
if(vaSystem.isLiveAgentAvailable()) {
vaSystem.connectToAgent();
}
else {
return 'Live agent is not currently available. Please check back later.';
}
})()
 
Let me know how to achieve this. Below is sample topic I have created which will be used in all 8 different engagement messenger setup.
 
MusabRasheed_0-1742292641861.png

 

 
Please hit like and mark my response as correct if that helps
Regards,
Musab
1 REPLY 1

Ankur Bawiskar
Tera Patron
Tera Patron

@Musab Rasheed 

not very sure on this part.

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader