Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

Virtual Agent Context Variables

Raj64
Tera Guru

Hello,

I've created a new context variable (LiveAgent_route). When I open Advanced Work Management and set up a queue, this variable doesn't show up as defined. I have the following code. The bolded line shows "undefined" in the log. Any ideas what I'm doing wrong?

 

function executeCondition( /* glide record */ current) {
var contextTable = current.getValue('context_table');
var interactionBlobRecord = new GlideRecord(contextTable);
interactionBlobRecord.addQuery('sys_id', current.getValue('context_document'));
interactionBlobRecord.query();

if (interactionBlobRecord.next()) {
var jsonBlob = JSON.parse(interactionBlobRecord.getValue('value'));

gs.log("Chat Queue EN: " + jsonBlob.LiveAgent_route + "XXX" + jsonBlob.liveagent_route);

if (jsonBlob.liveagent_route == 'qn1') {

return true;
}
}
return false;

1 REPLY 1

LM5
Tera Contributor

Did you figure this out?