Offer user more options when live agent is unavailable

Yasmin
Kilo Guru

Upon transferring a user to a live agent the script detects if there are any live agents available. IF there are no live agents available, VA says "Please try again later". Instead, we would like to offer additional options to the user such as: 

1. Try a new search
OR
2. Submit a case/incident. 

Is there a way to configure this within the set up topic so that everytime the live agent is unavailable, user can select other options? Thank you.

1 ACCEPTED SOLUTION

Community Alums
Not applicable

Hi Yasmin,

As suggested by Vishwa, you can follow the first step and you can remove the else section (I am telling you to remove else section because if the chat is transferred to live agent, else block will not run anyways). Next, in the workflow you can show a static choice of these 2 options(This will run only when the live agent is not available). So, once the user selects:

1) Create a Ticket workflow

2) Show all the topics again

To show all the topics again you have will have to create a Reference Choice and a Script. The reference choice will pick up topics from '' table and code will look like this in reference choice (untested code)

var options=[];
var gr = new GlideRecord('sys_cs_topic');
gr.addEncodedQuery('active!=false^nameNOT LIKE_PRVW')
gr.query();
while(gr.next()){
options.push(gr.name)
}
return options
 

and in Script you can have the following code.

(function execute() {
vaVars.global_search_text = vaInputs.topic_list;
vaSystem.topicDiscovery();
})()

find_real_file.png

 

Let me know if you have any questions. 

Please mark this article as Helpfil if it helped you.

Cheers,

Hardit Singh

View solution in original post

7 REPLIES 7

Thank you for the guidance Hardit. It's working! I set it as a setup topic, si when I access Live Agent support from the 3 dots at the top, it works. But when running any other topics, e.g. Fallback setup topic, it uses the servicenow default vaSystem.connectToAgent() script.

I'm currently in New York. So, If I want my customized Live Agent setup topic to be triggered throughout any of the topics, I would need to customize it on every conversation topic that I create, is that right? OR is there a way to call my curtomized Live Agent setup topic through a script?

Community Alums
Not applicable

Hi Yasmin,

You can create your own custom topic to connect to live agent where you can have any condition you want.

Then go to Collaboration -> Virtual Agent -> General Settings and set the custom topic you want for any Setup.

find_real_file.png

Please mark this comment as Correct Answer if it helped you.

Cheers,

Hardit Singh

Hi Hardit,

Apologies as I might bore you with this.

I am very new with service now but really wiling to learn. I want to deploy VA and similar to the request from other members, I want users to have options (message display) guiding them to create a ticket when agents are not available for live chat.

Version: Orlando

Topic: Virtual Agent

I tried following the logic you shared but I seem not to understand.

1) should I amend the Live agent Support topic ( to be as below) or create a new topic?

find_real_file.png

2) Where precisely should I use the code(s) shared?

 

I will really appreciate a walk through in bits and pieces