On selecting one choice from Select choice Redirect user to particular link in virtual agent

Nikita35
Kilo Guru

Hi 

I wanted to check possibility of below.

When I select one of the below, It should redirect me to a link directly without clicking anything else.

find_real_file.png

I am thinking of using script action and trying something like setRedirectURL but not sure what exactly to use.

16 REPLIES 16

Mark Roethof
Tera Patron
Tera Patron

Hi there,

Could you explain your question a bit more?

Is it about redirecting to a different Service Portal page? For example your are using your VA widget on your index page, and want to redirect to a certain page on your Service Portal? (don't know if this is possible)

Or is it within your VA topic? That you want to redirect to an other topic? (very good achievable!)

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

Kind regards,
Mark

---

LinkedIn

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

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

LinkedIn

If it's about the second point, redirecting to an other topic instantly: consider the vaSystem.switchTopic parm. We are using this and works fine, only not documented on Docs.

Simon H wrote a nice article on this:
https://community.servicenow.com/community?id=community_article&sys_id=7e8a90cbdb097344200f0b55ca961...

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

Kind regards,
Mark

---

LinkedIn

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

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

LinkedIn

Tried below script in the script action:

however not working.

 

(function execute() {
var html = '';
var gr = newGlideRecord('task');
//if (gr.get(vaVars.sys_id)) {
//var tableName = gr.getValue('sys_class_name');
var fieldList = [];
var cardRenderer = new global.VaRecordCardRenderer(true);

var title = {
url: 'https://www.google.com/',
label: "Computer Login"
};
var fields = cardRenderer.createFields(fieldList, gr);
//var lastComment = cardRenderer.createField('comments', gr, null, cardRenderer.getLastComment(tableName, vaVars.sys_id));
//fields.push(lastComment);
html = cardRenderer.renderCard(title, fields);
 

return html;
})()
 
Not sure if script include is required here, can you please help?

It is like on selecting Computer account it should directly redirect to a link like "www.xyz.com". basically its not a instance link.