Virtual Agent card

Gal Cohen
Tera Contributor

Hi All,

 

I'm new to the Virtual agent designer in ServiceNow and I'm experiencing some difficulties.

I'm trying to build a card with all the details of an input user, with additional links.  

For example:

 

The problem is that I can't find a way to build it all in one response/card (custom field is not allowed in the "card response").

 

Does anyone have experience building a custom response with all these details? 

Thanks,

3 REPLIES 3

GlideFather
Tera Patron

Hi @Gal Cohen,
can you be more specific about your requirement?

The stated details are supposed to be displayed when, when the conversation starts or after some action is performed??

---
Where the rules are real, you'll find me

Lynda1
Kilo Sage

I would use the Response card to get the information from the user table. Set a variable with the user email then use the link output to build the link.

If they are insistent on everything withing a single response, you need to use the Script Output and build the variables for all of the information needed to be able to display that list of information into a single response card.

I would honestly use the Card then the link script. One because users do not necessarily read, two because it is easier.

We have what is called an ACD ID on the users profiles, I use this to grab onto the ACD ID.

 

(function execute() {
var user = gs.getUserID();

var acd = new GlideRecord("sys_user");
acd.addQuery('sys_id', user);
acd.query();
if(acd.next()){
vaVars.acdID = acd.u_acd_id;
}
})()
 
There is a decision right after this, if yes, the ID is displayed to that user.
For your scenario, you just set a variable for email address, then use that variable within the Output Link