Virtual Agent Context Variables
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2023 10:58 AM
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;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-01-2023 12:45 PM
Did you figure this out?