The Now Platform® Washington DC release is live. Watch now!

Help
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Mark Roethof
Tera Patron
Tera Patron

Hi there,

If you are an admin or Virtual Agent admin, you can use variables to customize the behavior of Virtual Agent Topics. On the ServiceNow Docs only a few of these variables are described. You might already have come across some of these while exploring the out-of-the-box Virtual Agent Topics or the Community, though there are lots more!

I'll sum up, which variables and undocumented variables I've come across so far. You will also see some of these used in the Virtual Agent Topic Block articles and share downloads which I'm publishing.

Note: Some of these undocumented variables are very useful, though some might also be unsupported!

 User input variables (vaInputs)

vaInputs.userProvides the display value of the logged-in user's User record. It is possible to apply dotwalking, like "vaInputs.user.first_name".
Example output: "mark.roethof" 


 Script variables (vaVars)

vaVars._interaction_record_sysidProvides the Sys ID of the Interaction which is created automatically and associated with the chat.
Example output: "3127a4802f90a050b0c2d5ea2799b690" 
vaVars._liveagent_disabled_msgSame as vaVars._liveagent_handoff_error_msg. Provides the error message which is shown when there are no agent available.
Example output: "There are no agents available at the moment. Please try again later."
vaVars._liveagent_handoff_error_msgSame as vaVars._liveagent_disabled_msg. Provides the error message which is shown when there are no agent available.
Example output: "There are no agents available at the moment. Please try again later."
vaVars._setup_anything_else_topicProvides the Topic name of the Anything else topic as mentioned in the "Virtual Agent > General Settings > Setup Topics".
Example output: "Anything Else Topic." 
vaVars._setup_closing_topicProvides the Topic name of the Closing topic as mentioned in the "Virtual Agent > General Settings > Setup Topics".
Example output: "Closing conversation." 
vaVars._setup_error_topicProvides the Topic name of the Error topic as mentioned in the "Virtual Agent > General Settings > Setup Topics".
Example output: "Error Handling Topic." 
vaVars._setup_explore_help_topicProvides the Topic name of the Explore help topic as mentioned in the "Virtual Agent > General Settings > Setup Topics".
Example output: "Virtual Agent Capabilities." 
vaVars._setup_fallback_topicProvides the Topic name of the Fallback topic as mentioned in the "Virtual Agent > General Settings > Setup Topics".
Example output: "Fallback Topic." 
vaVars._setup_survey_topicProvides the Topic name of the Survey topic as mentioned in the "Virtual Agent > General Settings > Setup Topics".
Example output: "Virtual Agent Feedback." 
vaVars._setup_welcome_topicProvides the Topic name of the Greeting topic as mentioned in the "Virtual Agent > General Settings > Setup Topics".
Example output: "Dynamic Greeting Topic." 
vaVars._topic_choice_list_msgProvides the value of System Property "com.glide.cs.topic_choice_list_message". My advice would be to NOT alter the value of this System Property when working on a Multi-language instance. Update the Message of the corresponding UI Message instead.
Example output: "I want to be sure I got this right. What item best describes what you want to do?" 
vaVars._topic_currentSame as vaVars._topic_results. Provides details of the current Topic the conversation is in, in JSON format. Details like the Sys ID of the current Topic, Sys ID of the Conversation Task, name of the current Topic.
Example output: "{"sys_id":"5e85248c2f50a050b0c2d5ea2799b6b4", "task":"f327e4802f90a050b0c2d5ea2799b63d", "entities":null, "modelId":null, "name":"Test Topic", "prediction":null, "title":"Test Topic", "type":"normal", "utterance":"test topic"}" 
vaVars._topic_not_found_msgProvides the value of System Property "com.glide.cs.no_topic_found_message". My advice would be to NOT alter the value of this System Property when working on a Multi-language instance. Update the Message of the corresponding UI Message instead.
Example output: "Please try giving me your request in a different way. I'm currently better at understanding short sentences." 
vaVars._topic_postchat_user_idProvides the display value of the logged-in user's User record. Unlike the vaInputs.user, it is NOT possible to apply dotwalking.
Example output: "mark.roethof" 
vaVars._topic_resultsSame as vaVars._topic_current. Provides details of the current Topic the conversation is in, in JSON format. Details like the Sys ID of the current Topic, Sys ID of the Conversation Task, name of the current Topic.
Example output: "{"sys_id":"5e85248c2f50a050b0c2d5ea2799b6b4", "task":"f327e4802f90a050b0c2d5ea2799b63d", "entities":null, "modelId":null, "name":"Test Topic", "prediction":null, "title":"Test Topic", "type":"normal", "utterance":"test topic"}"
vaVars._topic_sorry_msgProvides the value of System Property "com.glide.cs.no_topic_sorry_message". My advice would be to NOT alter the value of this System Property when working on a Multi-language instance. Update the Message of the corresponding UI Message instead.
Example output: "I am sorry but I didn't understand your request."
vaVars._topic_sth_else_optionProvides the value of System Property "com.glide.cs.want_something_else_option". My advice would be to NOT alter the value of this System Property when working on a Multi-language instance. Update the Message of the corresponding UI Message instead.
Example output: "I want something else"
vaVars._topic_strategyNo clue yet.
Found this Script variable within one of the out-of-the-box Topics, which proves a value of "sure". 
vaVars._topic_wrong_msgProvides the value of System Property "com.glide.cs.wrong_topic_message". My advice would be to NOT alter the value of this System Property when working on a Multi-language instance. Update the Message of the corresponding UI Message instead.
Example output: "No problem, let's try again. Select one that matches what you want to do."
vaVars.global_client_modeNo clue yet.
Found this Script variable within one of the out-of-the-box Topics, which proves a value of "NORMAL".


 Context variables (vaContext)

vaContext.deviceTimeZoneSame as vaContext.getDeviceTimeZone(). Provides the timezone from the Device on which the logged-in user is working. So the timezone from the laptop or mobile phone for example. This is NOT the timezone value of the logged-in user's User record.
Example output: "Europe/Amsterdam" 
vaContext.deviceTypeProvides the type of Device on which the logged-in user is working.
Example output: "mweb", "ios", "android" 
vaContext.getDeviceTimeZone()Same as vaContext.deviceTimeZone. Provides the timezone from the Device on which the logged-in user is working. So the timezone from the laptop or mobile phone for example. This is NOT the timezone value of the logged-in user's User record.
Example output: "Europe/Amsterdam" 
vaContext.getRequesterLang()Provides the value of the Language field of the logged-in user's User record.
Example output: "en" 
vaContext.portal Provides the Portal suffix. This Context variables only works instantly when using Service Portal Agent Chat Configuration. If using legacy methods (like embedding the Service Portal widget to the header or footer), this would only work when adding sysparm_portal to the URL.
Example output: "sp" 

 
Below variables can be found in one of more out-of-the-box Topics. Unfortunately, so far I did not get these variables mentioned working.

vaContext.case_sys_id
vaContext.case_number
vaContext.task_number
vaContext.task_tablename
vaContext.parent_case_sys_id
vaContext.providerAppId
vaContext.providerUserId
vaContext.providerUserName
vaContext.task_sys_id

System Variables (vaSystem)

vaSystem.attachRecordToConversation()From the Docs: "This method attaches ServiceNow records that are updated or created during a Virtual Agent conversation to the Related Tasks list in a Virtual Agent interaction record."
Example usage: "vaSystem.attachRecordToConversation('incident', 'f327e4802f90a050b0c2d5ea2788b63d')" 
vaSystem.attachToRecord()From the Docs: "This method attaches an uploaded image to a ServiceNow record."
Example usage: "vaSystem.attachToRecord(vaInputs.file_picker.getValue(), 'incident', 'f327e4802f90a050b0c2d5ea2788b63d')" 
vaSystem.connectToAgent()From the Docs: "This method connects the customer to a live agent." 
vaSystem.getClosingMessage()Same as vaSystem.sendSeparatorMessage(). Provides the value of System Property "com.glide.cs.general.closing_message". My advice would be to NOT alter the value of this System Property when working on a Multi-language instance. Update the Message of the corresponding UI Message instead.
Example output: "Thank you for using our support chat." 
vaSystem.getConversationId()Provides the Sys ID of the Conversation record which is created automatically.
Example output: "32dbbc9a2f1ce850b0c2d5ea2799b68d" 
vaSystem.getGreetingMessage()Same as vaSystem.sendSystemMessage(). Provides the message of UI Message with key "Hi, I'm your Virtual Agent. Let me know how I can help you today.".
Example output: "Hi, I'm your Virtual Agent. Let me know how I can help you today." 
vaSystem.getSearchText() From the Docs: "This method returns the last utterance typed by the user and is used to find the current topic."
Example output: "My mouse isn't working anymore." 
vaSystem.getSurveyVerificationMessage()Provides the value of System Property "com.glide.cs.general.chat_survey_verification_message". My advice would be to NOT alter the value of this System Property when working on a Multi-language instance. Update the Message of the corresponding UI Message instead.
Example output: "Is the summary accurate?" 
vaSystem.getTopicSelectionMessage() Provides the message of UI Message with key "What's your issue or request? Or take a look at what I can help with.".
Example output: "What's your issue or request? Or take a look at what I can help with."  
vaSystem.getTranscript()Provides the contents of the full current conversation up to that point.
Example output: "[07:30] Virtual Agent: G'day Mark.
[07:30] Virtual Agent: Let me know how I can help you today. What's your issue or request? Or take a look at what I can help with.
[07:30] Virtual Agent: Show Me Everything
[07:30] Mark Roethof (SysAdmin): Test Topic
[07:30] Virtual Agent: Test Topic" 
vaSystem.getTranslation() Provides the value of the matching Translated Text record corresponding the Language given. The first parameter concerns the GlideRecord object, the second parameter concerns the Fieldname value, the third parameter concerns the Language value for the translation to retrieve, the fourth parameter concerns the Field of the GlideRecord object which needs to be translated against the Translated Tekst.
Example usage: "vaSystem.getTranslation(gr, 'question', 'nl', gr.question)" 
vaSystem.isAllowTranscriptDownload()Provides a boolean value which corresponds with the value of checkbox Allow Transcript Download on the Chat Setup record.
Example output: "true" or "false"
vaSystem.isLiveAgentAvailable() From the Docs: "This method checks whether a live agent is available to receive a conversation (transferred from the bot)."
Example output: "true" or "false" 
vaSystem.sendSeparatorMessage()Same as vaSystem.getClosingMessage(). Provides the value of System Property "com.glide.cs.general.closing_message". My advice would be to NOT alter the value of this System Property when working on a Multi-language instance. Update the Message of the corresponding UI Message instead.
Example output: "Thank you for using our support chat." 
vaSystem.sendSystemMessage()Same as vaSystem.getGreetingMessage(). Provides the message of UI Message with key "Hi, I'm your Virtual Agent. Let me know how I can help you today.".
Example output: "Hi, I'm your Virtual Agent. Let me know how I can help you today." 
vaSystem.sendTopicPickerControl() This Script variables provides the logged-in user with a list of available Topics. Usage of this Script variable is required if willing to work with utterances.
Example usage: "var greetingMessage = vaSystem.getTopicSelectionMessage();
vaSystem.sendTopicPickerControl(greetingMessage);" 
vaSystem.switchTopic()   Can be used to switch to another Topic. After completion of the Topic switched to, the conversation returns to the Topic switched from.
Example usage: "vaSystem.switchTopic('Topic Name to Switch to');" 
vaSystem.topicDiscovery()Can be used to discover and switch to another Topic. After completion of the Topic switched to, the conversation returns to the Topic switched from.
Example usage: "vaVars.global_search_text = 'Topic Name to Switch to';
vaSystem.topicDiscovery();"  


Below variables can be found in one or more out-of-the-box Topics. Unfortunately, so far I did not get these variables mentioned working.

vaSystem._topic_current
vaSystem.endConversation()
vaSystem.portal

---


And that's it actually. Hope you like it. If any questions or remarks, let me know!

👍
If this post helped you in any way, I would appreciate it if you hit bookmark or mark it as helpful.

Interested in more articles, blogs, videos, and Share projects on Virtual Agent I published?
Virtual Agent


Kind regards,
Mark
2020 ServiceNow Community MVP
2020 ServiceNow Developer MVP

---

LinkedIn

Comments
Eric M
Giga Expert

Nice Article. Thanks for putting all these together. 

Best, 

Eric 

PeterWiles
Mega Guru

Started doing this in my own notes so has just saved me a few hours of my life. 

Thank you.

Mark Roethof
Tera Patron
Tera Patron

Just updated the article a bit with some new found properties. It's now 50+ variables described.

Kind regards,
Mark
2020 ServiceNow Community MVP
2020 ServiceNow Developer MVP

---

LinkedIn
Community article list

Eric M
Giga Expert

Hi @Mark Roethof  do you know if Live agent available looks at all the queues and evaluates if the queue is available for the user. for example we have queues per users country. so we need to make sure this call evaluates based on this users country + plus the schedule defined on the queue.

vaSystem.isLiveAgentAvailable()  From the Docs: "This method checks whether a live agent is available to receive a conversation (transferred from the bot)."
Example output: "true" or "false"
Mark Roethof
Tera Patron
Tera Patron

Hi Eric,

Don't think this is queue specific, and don't know if you could add a parm for this. I used .isLiveAgentAvailable recently at a customer, though just for checking the Live Agent in general.

Kind regards,
Mark
2020 ServiceNow Community MVP
2020 ServiceNow Developer MVP

---

LinkedIn
Community article list

Eric M
Giga Expert

thanks - i'll test it with my team and see what the results look like 

Chris D
Kilo Sage
Kilo Sage

To answer your question briefly: yes, it works that way.

This is way I gather isLiveAgentAvailable() works - from some experience and some educated conjecture:

Connect Support

Remember for Connect Support, you need to effectively hardcode the queue (sys_id) in the topic

  1. [Uncertain] Active check: Is the queue active? T/F
    • It may check if the queue is active, but I've never bothered to test it out. I wouldn't assume this is true, but also wouldn't assume it's false.
  2.  Basic schedule check: Is the current time within the queue's defined Schedule? T/F

    • This I know for a fact.
  3. (If T) Return true

Agent Chat

Remember Agent Chat uses Advanced Work Assignment for routing, so it follows that logic/rules: Channel (Chat) > Queues > Condition > Availability. And you do not (need to) hardcode the queue in the topic.

  1. Sort active chat queues by order. For each chat queue:
  2. Is within schedule (if defined)? T/F
  3. (If T) Meets condition? T/F
  4. (If T) Any agents available? T/F
  5. (If T) Any agents have capacity? T/F
  6. (If any N) Move to the next queue and repeat #2-6
  7. (If T) Return true

 

We haven't done any advanced AWA routing yet - we just have a few queues which are topic-specific so I have them "hardcoded" (interaction context.queue = "[friendly queue name]"), so in our case effectively replicating Connect Support, only one queue will ever match the basic condition, but if you have multiple potential queues matching conditions, it definitely should be smart enough to go through them all - that's the point of AWA.

Chris D
Kilo Sage
Kilo Sage

I'll test this out at some point (low priority), but off-hand, does anybody know if vaContext.deviceType is the way to differentiate MS Teams chats (from Portal chats)?

vaContext.deviceType Provides the type of Device on which the logged-in user is working.
Example output: "mweb", "ios", "android" 

Guessing it is, just because the column in the Conversation table is also called "Device Type" and returns "Microsoft Teams", but it just wasn't in the example.

 

Fwiw, my use case is this: If Portal, I want to add a note to tell users to use the normal non-VA search to find catalog items because it's a stupid waste of their time to use VA to replicate a (poor) catalog search. Note: Our items are too complex to order natively via VA so that's out of the question. If Teams, well, then the OOTB Order Something topic makes sense as-is and actually saves time 😉

Eric M
Giga Expert

Chris, We tested this the other other day with some advanced AWA configure. it works pretty good to check availability within the VA before giving them the option to transfer to a live agent. 

Thanks for mapping out the logic. 

Anyone know if a option exists to check availability and the wait time if they are available?  I would like to say something like " would you like to connect to a live agent? Current wait time is 1 min. Yes, No or be smarter about it " its looks like the agent is available but the wait time is long. would you like to create a incident instead?"

 

Eric 

Chris D
Kilo Sage
Kilo Sage

Ideally/simply/OOTB, no, I don't think so... But thinking somewhat creatively, I haven't tested this (yet), but I think something like this should work - at least for very simple use cases:

  1. Do isLiveAgentAvailable()
    • Afaik, there's no way to find out from this method which queue or agent is available - but it would be valuable (see below)
  2. If yes, query the queue's Target Wait Time
    • Really only works if you know exactly which queue it is, unless you want to manually recreate isLiveAgentAvailable (i.e. works for my 1 Topic/1 Queue use case, but probably not your 1 Topic/1+ Queues)
  3. Present to the customer: "The target wait time is X minutes, would you like to wait or create an incident?"
  4. If "wait", then connectToAgent()
  5. Optionally, have a Max Wait Time set (reasonably low) for the queue as well
    • I need to test this myself because if it really does straight cancel the interaction as it says (well, cancel the "work item"), it's a pretty lame feature. Ideally you'd be able to just continue on the topic path as a fallback, where you can then go the INC-creation route.

 

ServiceNow should definitely have a better, more native way for VA to handle wait times, but understandably, some things about it are tricky. Your last bit, "its looks like the agent is available but the wait time is long", just isn't possible I don't think. Looking at agent availability (which includes capacity) is the best this system can do. How could it know that an agent is available but not actually able to take the chat? This is why you configure the backstops like Capacity, Reassign on Timeout, multiple Assignment Eligibilities, and/or Max Wait Time.

Eric M
Giga Expert

Thanks Chris. I think the Max wait time works like you mentioned it above. i tested it awhile back. it ends up with a bad user experience. we looked into it since we wanted it return to the VA after and give them a option to create a incident once the max timeout is hit. We end up putting in a HI ticket just to make sure we didn't miss anything. no option to return to the VA

Given how complex our AWA queue setup is i'll have to live without trying to tell the customer what the current wait time is before selection to transfer to a agent.

 

Happy Holidays!

Muralidharan BS
Kilo Sage
Kilo Sage

The best Article for VA!

Mary Beth Hutch
Mega Guru

We were recently advised to use vaSystem.didConnectToLiveAgent() to determine whether a conversation was directed to a live agent, but the behavior is odd - it seems to depend on whether or not you use the vertical ellipse to connect, or an actual topic flow? More to come if I figure it out 🙂

Chris D
Kilo Sage
Kilo Sage

Just to confirm, finally putting this to use, and yes, as I expected, it does identify Teams users (and almost certainly Slack as well).

If you need to identify Teams users in a topic, you use:

if(vaContext.deviceType == 'teams')

Travis Rogers
ServiceNow Employee
ServiceNow Employee

Eric,

There is an OOB topic block called Agent Availability that performs this check and provides the outputs below. Below is the script in that topic block. 

(function execute() {
var result = vaSystem.getAgentTopicInfo();
vaVars.agentAvailable = result.agent_available;
vaVars.supportQueue = result.support_queue;
vaVars.waitingTime = result.waiting_time;
})()
I'm currently working on converting that waiting_time variable from milliseconds to a rounded minute for a more user friendly read-back, but hopefully this helps you or others. 

Regards,
Travis
 
p.s. @Mark Roethof I don't see some of these in your list above, so you might include them in the next update of this article 🙂
 
Eric M
Giga Expert

Thanks Travis. We noticed the new add in the Quebec release. thanks for telling everyone about it 

Ram_n Botelho
Tera Contributor

How to use vaVars._topic_current if it is a custom variable instead of a system variable?

Thanks !

Dustin Watkins
Tera Guru

@Mark Roethof 

Awesome post!!

I'm not having much luck with what I'm trying to accomplish, but I think I'm close.  There is a script in OOB topic Search KB that has variable vaInputs.portal. I can just change the script and hard-code the portal and the links work as expected, but I feel like this isn't the best practice.  Any thoughts on the proper way to update that variable correctly without hard-coding it? 

 

Also, just a heads up, the docs link has changed and the one in your original post re-directs to a landing page.  Do you mind updating it?

https://docs.servicenow.com/bundle/paris-now-intelligence/page/administer/virtual-agent/concept/virtual-agent-scripts.html

Mark Roethof
Tera Patron
Tera Patron

Tnx. Updated the URL.

Can you post your question as a new Topic within the Virtual Agent, Natural Language Understanding (NLU) community? More people will spot your question that way, and you more likely to get an answer. Of course if I have time somewhere today, I will look into it also if no one else answered already.

Kind regards,
Mark

Srijan
Kilo Expert

Is there any context variable that will help me to identify the channel type?

Chris D
Kilo Sage
Kilo Sage

Channel type? You mean the device/app used?

vaContext.deviceType Provides the type of Device on which the logged-in user is working.
Example output: "mweb", "ios", "android" 

Somewhat of a misnomer, but I think this is what you're looking for. I've confirmed it works for identifying Teams users - so I'm confident it'd also differentiate for Slack, FB Messenger, and SMS (I think that covers pretty much them all?). mweb = Web Client (i.e. Portal in Browser), iOS/Android = iOS/Android ServiceNow App, etc.

Victor Chen
ServiceNow Employee
ServiceNow Employee

We listened, and we've expanded our documentation to include many of the vaSystem methods mentioned here. Check it out: https://docs.servicenow.com/bundle/sandiego-servicenow-platform/page/administer/virtual-agent/concep...

Kristopfer
ServiceNow Employee
ServiceNow Employee

vaSystem.topicDiscovery() is not the most efficient way to switch topics since it's actually doing topic discovery which is more like a search.  Some customers do this because it also enables the "X" button to close the conversation.  However, it would be better to use either vaSystem.switchTopicByName() or vaSystem.switchTopicById() which switch to the topic directly and also enable the "X" button.  

 

Chris D
Kilo Sage
Kilo Sage

Very true. For a short period of time, switchTopic() was the only option, then ServiceNow "broke" it, and topicDiscovery() became the go-to to topic switching - when this post was created (ah yes, it is labeled Paris) - and in Quebec they finally released the gold standard switchTopicByID() - and switchTopicByName (but why use a name when you can use a sys_id??).

Thanks to the ServiceNow VA team for picking up what Mark started here and formally documenting a lot more than before.

peter_repan
Tera Guru

Does anybody know from where is system populating properties like vaContext.task_sys_id or vaContext.case_sys_id?

Anmol Poddar
Giga Explorer

This Article was helpful. But can you pleas tell me on how to use VaContext.portal in a portal which is configured in the Legacy manner. I did try by puuting the script in the Topic condition but the log for VaContext.portal returns undefined. Any help would be appreciated. Please find the script below:

var applicability = vaContext.portal == 'itportal' ? true : false;
gs.info('applicability'+applicability+' '+ vaContext.portal );
return applicability;
Manal Aquil1
Tera Contributor

WOW, Best thing I read today, Thanks for sharing .

Vaish3
Tera Contributor

Hi all,

If the chat request is routing and no agent accepts the chat then after time out chat just closes with the closing message. In this case we would like to give create INC option to end users. I tried with multiple ways but no luck yet. Is anyone have already worked on this case or have any idea to implement this. 

Kristopfer
ServiceNow Employee
ServiceNow Employee

@Vaish3 If I were to implement this, I guess I would modify the the "Closing Conversation" setup topic.  In that customized topic, you could check vaSystem.liveSupportRequestAbandoned().  If true, you could create a path that prompts to create an incident before closing the conversation.

Vaishnavi25
Tera Contributor

Hi @Kristopfer ,

 

Thanks for your help it worked.

 

I need one more help: 
We have two live agent queues and incidents created for these queues should route to respective assignment group. I'm just stuck here to check from which queue this closing conversation is entering in.

Is there a way? to check that. 

 

For example, to check current topic name we can use 

"vaVars._topic_current" but how can I check previous topic?
Vaishnavi25
Tera Contributor

Hi @Mark Roethof 

@Kristopfer 

Can anyone please help me with above use case. That is how I will get to know from which live agent topic closing conversation has entered. 

 

 

Kristopfer
ServiceNow Employee
ServiceNow Employee

@Vaishnavi25 Unless I'm missing something, the topic name wouldn't help you decide who should receive the incident.  As far as I know, we don't keep track of the queue that *would* have been assigned if connecting to an agent fails.  If you have some logic that is used to determine the queue (often rules or scripts on the AWA queue), I would suggest possibly encapsulating this logic in a script include, which you could then call from the closing conversation topic to simulate that process.

Ishaan Shoor
Mega Sage
Mega Sage

@Mark Roethof Thanks for sharing, Much appreciated! 

Vaishnavi25
Tera Contributor

@Kristopfer @Mark Roethof 

 

Thanks for your Response. As it needs some more Gliding to avoid any breakage client have agreed not to proceed with it. They are ready to Add assignment group manually in above case.

 

Recently when we went live, we saw a weird behavior. In DEV everything is working as expected but in TEST and PROD whenever no agents are active it gives options to end users to create a ticket. In this case if they create ticket, it is getting created but after that we are seeing this message "I'm having technical issues and won't be able to continue this conversation." And if they don't create then also same error and in this both the cases chat is getting "Closed Abandoned".

 

I make sure topics are active and also made some changes and published all the topics in DEV, captured it in update set and moved it to TEST but still no luck. I'm I missing anything here?

It shouldn't be related to my changes/implementation because in DEV everything is perfect. @Kristopfer Can you please help me here. By any chance did Flow changes don't capture in update set which cause such issues in Higher Environments?

 

Regards,

Vaishnavi

 

Kristopfer
ServiceNow Employee
ServiceNow Employee

@Vaishnavi25 So, the "technical issues" message is sort of an indication that there are bigger problems. I would check the syslog and/or node logs as there is likely an underlying exception associated.  I would search for exceptions that include the sys_id of your sys_cs_conversation record for the conversation in error.  If that doesn't give you a clue as to the problem, I would open a case so someone can help you more directly.

Ash44
Tera Contributor

Has anyone utilised the variable vaVars.global_notification_context.

 

I see this one in OOTB topics seems like it is a JSON which would contain the record that the notification is triggered by.

 

Looking to use this one to retrieve the notification record. For a proactive help implementation we are looking into.

Keszia
Tera Expert

Do you know which script we can use to make a topic viewable if users are in a specific sys_user_group?

Chris D
Kilo Sage
Kilo Sage

@Keszia you don't need any of these VA-specific variables and functions, just the common GlideUser function isMemberOf().

You'd put this script in the Topic's Properties > Advanced > Context > Script:

(function execute() {
//using the ootb code example:
    var answer=false;
    if (gs.getUser().isMemberOf('[sys_id]')) {
        answer = true;
    }
    return answer;
//or you can just simplify it with one line :)
  return gs.getUser().isMemberOf('[sys_id]');
})()
Keszia
Tera Expert

Thanks @Chris D but that doesn't seem to work, when I impersonate a user in that group, the topic is hidden.  

Neha Bhosale
Tera Contributor

Hello,

 

I have a requirement where i want to trigger topic discovery i.e. to trigger NLU once user types their query. But here, requirement is when user types a query, it should trigger NLU for only specific 1 topic and if it returns true i.e. if keyword is matching with utterances for that topic, then return true or else trigger AI Search topic to give KAs and request forms. 

 

I am aware we have "vaSystem.topicDiscovery()" to trigger NLU but it will trigger all active topics and tries to match those utterances. Can we limit it to trigger only for one intent?

 

Can anyone help on this pls?

 

Thanks

Version history
Last update:
‎11-01-2020 10:01 PM
Updated by: