How to make VA bot response link as dynamic (ie. instance dependent links, a link clicked on test instance VA redirects to test instance)

prathvi raj mis
Tera Contributor

Hi,

I need to add links for catalog items in the bot response of VA. I need to make them as dynamic so that when link is clicked on dev environment it redirects to a item in dev and when same thing is accessed using test instance VA it redirects to item in test.

One thing to keep in mind is that I have to do MS teams integration with VA and the links should work dynamic there also.

Any suggestion would help.

Thanks

 

2 REPLIES 2

Gokul Janardana
Kilo Guru

Hi Prathvi,

There are multiple ways of  doing this.

The best and easiest way to do this is to omit <https://instanceName.service-now.com> from your url and just give the rest of the url as a hyperlink. Virtual Agent will automatically prefix the instance url dynamically according to the current instance.

For example if your URL is "https://dev2345.service-now.com/serviceportal", just use "/serviceportal" in the hyperlink.

 

Another way to achieve this is using getProperty() function. You can use gs.getProperty('glide.servlet.uri') to get the current instance URL.

For example if your URL is "https://dev2345.service-now.com/serviceportal", You can create a script variable with a code which returns gs.getProperty('glide.servlet.uri')+"/serviceportal". While doing hyperlink, you can use this variable as hyperlink instead of giving a url.

Please let me know if you need to know more about this.

 

If you find my answer useful for you, please mark it as helpful!

 

Your first option doesn't work with the Teams integration sadly from experience. But thanks for sharing the second option because I didn't think of that one!