Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

VIrtual Agent Topic visibility user specific

marcinkopiec
Giga Contributor

Hello, is there any way to make a topic visible for specific users and not visible for others?

In details, I need to make it visible if the "company" attribute from the user record has specific value.

Should it be done within topic properties script condition? Is there a kind of variable that can be used (similar to "vaContext.liveagent_portal" one but dedicated to logged in user)?

 

Regards

Marcin 

1 ACCEPTED SOLUTION

Muralidharan BS
Mega Sage

Hi Marcin,

yes there are options to make it visible for only specific users. 

1. Go to VA designer

2. Open topic, go to properties

3. open the script section and paste the value

find_real_file.png

 

(function execute() {
    if (vaInputs.user.company == 'name of company of sysid')
        return true;
    else
        return false;
})()

if the company name is a reference then pass the sysid or else string value. You can also use getDisplayValue() to get the company name. 

Thanks

View solution in original post

10 REPLIES 10

Muralidharan BS
Mega Sage

Hi Marcin,

yes there are options to make it visible for only specific users. 

1. Go to VA designer

2. Open topic, go to properties

3. open the script section and paste the value

find_real_file.png

 

(function execute() {
    if (vaInputs.user.company == 'name of company of sysid')
        return true;
    else
        return false;
})()

if the company name is a reference then pass the sysid or else string value. You can also use getDisplayValue() to get the company name. 

Thanks

Works perfectly fine.

Thanks a lot Murali.

You've welcome

We are currently in Zurich version and this is not working out. vaInputs object itself is not available in Script section within a topic properties. Is there any other way around to achieve this?