Dynamic input in Virtual Agent

pandeyved
Tera Contributor

Hi all,

I need help in one use case. In Virtual agent we need to provide user a option to select which will come dynamically from the table.
Detail:
We are showing some topics from Employee Center in our Virtual Agent and As We have connected content for the topics, so we need to display all the connected content from the topics which is available in portal. But instead of statically defining the catalogs mapped to the particular topic we need to show directly from the table. How can we achieve this?

 

Thanks
Vedant

4 REPLIES 4

Mark Roethof
Tera Patron
Tera Patron

Hi there,

 

Have you tried quering the table and displaying those results? What's the issue that you run into doing that?

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

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

LinkedIn

Hi @Mark Roethof 
I tried with Querying with below code:

var options = [];
var hardwareContent = new GlideRecord("m2m_connected_content");
hardwareContent.addEncodedQuery("topic.parent_topic=891e85b01b5ab550134bddf59b4bcb9b^catalog_item!=NULL");
hardwareContent.query();
while(hardwareContent.next())
{
options.push(hardwareContent.catalog_item.getDisplayValue())
}
return options;
})()
But continuously i am getting error that I have technical Issue in Virtual Agent. AT the same time I am running it in Background script I am getting Proper Output. 

When running into the message "I'm having a technical issue", in most cases their is valuable information written to the logs. What information is the logs providing you?

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

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

LinkedIn

Are you using a Dynamic Choice user input? If so, the expected format is a value + label. Also see the example code in the Dynamic Choice script.

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

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

LinkedIn