Virtual Agent Decision box not working

Meghant Rai
Kilo Guru

Hi All,

 

I have a requirement where I have to show outages on the Virtual agent greeting message:

There's a checkbox field(u_portal_outages) in Core_Company table if checked then the outages from this company can be seen in portal.

I have to check the company of the login user and if the company of logged in user have this field as checked then I have to proceed further to glide the outage table to fetch more details about the outage.

 

Now I am not able to check this field if it's true or not in my virtual agent topic somehow.

 

var company= vaInputs.check_company_of_logged_in_user; (Fetching the sys id of the company of the logged in user)
var gr= new GlideRecord('core_company');
var value='';
gr.addQuery('sys_id',company);
gs.log('Virtual Agent', company);
gr.query();

if(gr.next())
 
{
value= gr.u_portal_outages;
}
vaVars.outage_check= value;
return vaVars.outage_check;
 
Then in the condition field of the decision box I am checking if outage check variable is true or not

 

5 REPLIES 5

So how do the transitions after the decision look like?

 

Kind regards,
Mark

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

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

LinkedIn