Welcome to Community Week 2025! Join us to learn, connect, and be recognized as we celebrate the spirit of Community and the power of AI. Get the details  

How to change what a VA chat card displays as header?

Nicolas Labrada
Tera Contributor

I'm using a "Record" type card from our Outages table to display outages to the VA users before they talk to a live agent. 
The options I have are:
Card type: Record

Populate by referencing: Table

Table: Outage

Condition: Script (I'm filtering by having certain content in one of the fields of the associated CI)

Fields: some selected fields from the table record.


And that's all I have other than Node Conditions which are not set.
By default, the header of the card is using a field in the record called "Short Description":

SN capture.PNG



How can I choose a different field to use as the title?
I read somewhere about scripted cards but I cannot find any documentation about that.

Thanks


These are the settings:

2.png

1 REPLY 1

Muralidharan BS
Mega Sage

Hi,

 

Yes there is scripted card renderer option, you can try this below,

 

var grIncident = new GlideRecord('incident');
grIncident.addEncodedQuery("caller_id=javascript:gs.getUserID()^active=true^universal_requestISEMPTY");
grIncident.query();
if (grIncident.next()) {
    var title = {url : 'www.google.com', label : 'hi there'};
    var fields = ['number','opened_at'];
    var fieldToRender = new global.VaRecordCardRenderer().createFields(fields, grIncident);
    var s = new global.VaRecordCardRenderer().renderCard(title, fieldToRender);
}
return s;

Output

MuralidharanBS_0-1674983125490.png